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?
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.
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