• After 15+ years, we've made a big change: Android Forums is now Early Bird Club. Learn more here.

possible to build a speedometer using only the accelerometer?

GizmoDuck

Lurker
I'm tinkering around with trying to build a speedometer using only the accelerometer for use when I go snowboarding. I can read values from the accelerometer but I'm not sure how I would derive the velocity.

I was thinking of taking the square root of (X^2 + Y^2 + Z^2) where X, Y, and Z are the values reported by the accelerometer in each axis but that only would only give me the amplitude of acceleration at any given instant. I could multiple that by the sampling frequency to get my instantaneous velocity but this approach fails when I'm moving at a constant speed. Any ideas?
 
maybe when the acceleration drops to 0 use the last known velocity as the current speed until the acceleration changes again. can the accelometer read negative acceleration or tell when you are slowing down? maybe you can also reference the gps and use both as a test for speed?
 
Rate of acceleration over time should give you speed. That's how the old G-Tech meters worked for knowing when you hit 60 MPH or your trap speed at the end of the 1/4 mile. All it used was internal accelerometers, so you should be be able to do something similar with your phone. May not be the best for watching to know your speed, but should be OK for logging speeds, I would think. Might not be as accurate as GPS, but should work OK.
 
Back
Top Bottom