J jscoulter Member Licensed User Longtime User Jun 25, 2012 #1 Hi All. Is it possible to use the accelerometer to determine your speed (KMH or MPH) instead of using the GPS? if so, whats the calculation I need to use? Thanks, Jeremy
Hi All. Is it possible to use the accelerometer to determine your speed (KMH or MPH) instead of using the GPS? if so, whats the calculation I need to use? Thanks, Jeremy
Erel B4X founder Staff member Licensed User Longtime User Jun 25, 2012 #2 Theoretically you can calculate the speed by aggregating the acceleration values. The problem is that the error will also be aggregated. I haven't tried it by I'm pretty sure that the results will be too inaccurate. Upvote 0
Theoretically you can calculate the speed by aggregating the acceleration values. The problem is that the error will also be aggregated. I haven't tried it by I'm pretty sure that the results will be too inaccurate.
derez Expert Licensed User Longtime User Jun 25, 2012 #3 V = V0 + a*t for each axis and the total speed is sqrt(vx^2 + vy^2 +vz^2) it can be done with a timer of dt time like this at start: vx0 = 0 vy0 = 0 vz0 = 0 v = 0 sub timer_tick vx = vx0 + ax * dt vy = vy0 + ay*dt vz = vz0 + az * dt v = sqrt(vx^2 + vy^2 +vz^2) vx0 = vx vy0 = vy vz0 = vz end sub Last edited: Jun 25, 2012 Upvote 0
V = V0 + a*t for each axis and the total speed is sqrt(vx^2 + vy^2 +vz^2) it can be done with a timer of dt time like this at start: vx0 = 0 vy0 = 0 vz0 = 0 v = 0 sub timer_tick vx = vx0 + ax * dt vy = vy0 + ay*dt vz = vz0 + az * dt v = sqrt(vx^2 + vy^2 +vz^2) vx0 = vx vy0 = vy vz0 = vz end sub
klaus Expert Licensed User Longtime User Jun 25, 2012 #4 You have no chance to get a reliable speed value in integrating the acceleration value. Best regards. Upvote 0
You have no chance to get a reliable speed value in integrating the acceleration value. Best regards.