Perhaps not a trivially easy way...
Convert the acceleration readings to a vector (magnitude and angles). Subtract g from the magnitude of the vector. Convert the modified vector back to (x,y,z).
I find that the inclusion of gravity is helpful because it lets me use accelerometer readings as de facto orientation readings, when there is no separate orientation sensor.
Best Answer
Best Answerfor velocity i would go with a vector as said :
convert xyz readings to a distance using this formula :
var movement_total = Math.round((Math.round(10000 * Math.sqrt(accelerometer.x * accelerometer.x + accelerometer.y * accelerometer.y + accelerometer.z * accelerometer.z)) / 100))
then do this at a time T1 then at a time T2, substract the first measure to the second will automatically remove the gravity from the equation.
edit : physicists would correct, it's not a distance since it's acceleration that is measured, but it will work.
Thanks,
I don't think I am following though. The equation seems to be calculating the actual acceleration. What do the 10000 and 100 represent?
If acceleration is a constant 5m/s/s(accelerometer readings of 3,4,0). Are you saying the calculation measured ove1 second should be
5*1 - 5*0 = 5.
So the velocity is 5m/s?
Best Answerso the x10000 / 100 is only there to round to 2 digits after 0 (with math.round function), not useful in your case.
For your case, let's say that acceleration is 5m/s^2 as you said, basically after one second, your device would have move 5 meters from the starting point so the calculation is right (5m/s). The difficult part is to get to distances when acceleration is null, which depends on initial velocity and direction.
For accounting for direction, I would calculate the delta of each coordinate acceleration, so a deceleration would be taken into account.
Best AnswerThe issue I have there then is that Fitbit includes gravity. So instead of acceleration readings of 3,4,0 the reading would be 3,4,9.8 which works out at an acceleration of 11m/s/s and a velocity of 11m/s according to the above.
Best Answeryes true- so the only solution is to get orientation, in order to know where the g value should be corrected at t0 and t1. Then
From what I know, the Ionic is the only one with orientation/gyroscope
Best Answer