0

The formula for calculating acceleration from accelerometer values is sqrt(accelerometer.x^2 + accelerometer.y^2 + accelerometer.z^2).. But this does not give the direction in which the acceleration is happening. If there is a method that could even evaluate that if the acceleration was positive of negative?

I have a reference frame from which I am calculating all these values. All I need is the direction/positive or negative acceleration.

nr5
  • 4,228
  • 8
  • 42
  • 82
  • Doesn't make sense to say that the acceleration is positive/negative as it is just a vector. Maybe you want to ask whether the speed increases / decreases ? Or maybe you want to know about the acceleration in a particular direction ? (say vertical acceleration) ? – vib Apr 14 '15 at 08:45
  • yes acceleration/decceleration in the direction of motion. Actually the GPS won't give the speed info. with the frequency of accelerometer updates (0.01). I need the acceleration in the vehicle's frame of reference, not the device frame of reference... – nr5 Apr 14 '15 at 08:51
  • Acceleration is a vector: it has both magnitude and direction. The components (ax, ay, az) represent the vector. Your formula is for the magnitude of the vector; the normalized components give the direction. – duffymo Apr 14 '15 at 09:30
  • Is this question related ? http://stackoverflow.com/questions/5464847/transforming-accelerometers-data-from-devices-coordinates-to-real-world-coordi – vib Apr 14 '15 at 13:19

0 Answers0