Okay, so let me get this straight, i’ve been thinking about this for 2 weeks and barely have a conclusion
So how we get stroke rate is by measuring acceleration by use of a 3 axis analog accelerometer. The accelerometer being analog and all, gives a waveform where the origin point, or long average, is more than zero. In addition, the values might be choppy, large amounts of inaccuracy.
problem 1: choppy values.
Solution: implement an smoothing function
Problem 2: origin not 0
Solution: subtract long average
Problem 3: 3-axis
Solution: summation by Pythagoras theorem
But now arises a new problem where Pythagoras theorem always produces a positive value
Problem 4: pythagoras theorem always positive
Solution: find axis with largest value, if axis more than origin, result is positive, if less than, result negative
So after all that, the waveform is something useable. Next is to read it, find the peaks…