Search code examples
mathaccelerometerphysics

How to compute the velocity & distance from Tri-Axial Accelerometer Data?


I'm having sample data of tri-axial accelerometer as listed below:

Timestamp, AcceX, AcceY, AcceZ
0.0, -0.96, -0.69, -1.24
0.1, ............

I want to determine velocity and distance traveled by the object with accelerometer.


Solution

  • Determining the velocity and position from an accelerometer is much harder than it might at first seem.

    Depending on your specific needs, there might be a way to form an estimate that would work, but it is generally a very inaccurate approach, and almost worthless given what's usually available on a phone. With specialized equipment one can do much better.

    First problem: gravity will be recorded as an acceleration and it's hard to remove (so you at least need a gyro too).

    Second problem: to get distance and velocity you need to integrate your acceleration so small errors will accumulate.

    To find out more, search for "dead reckoning". See, for example, the first google hit i got, which seems to explain the issues well enough.