1. Check out our app, Forums for Android! Download and leave feedback here!

possible to build a speedometer using only the accelerometer?

Discussion in 'Android Apps & Games' started by GizmoDuck, Oct 17, 2010.

  1. GizmoDuck

    GizmoDuck New Member
    Thread Starter
    5

    Oct 17, 2010
    1
    0
    5
    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?
     

    Advertisement

  2. firechicken

    firechicken Active Member
    16

    Aug 23, 2010
    34
    3
    16
    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?
     
  3. Hrethgir

    Hrethgir Well-Known Member
    163

    Feb 16, 2010
    1,684
    225
    163
    Male
    Intel fab tech
    Salem, OR
    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.
     
  4. completefailur

    5

    Feb 15, 2011
    5
    0
    5

Share This Page

Loading...