Interpret android accelerometer values to get phone's translation along axes in real world

4k views Asked by At

I did search but I could not find an answer; When interpreting android accelerometer values, how can one translate these values into real world phone translation along X/Y/Z axes?

I hope it makes sense - I just can't get a grip on exactly how do we get rid of gravity? Do we need to?

I was thinking if we take the magnitude of the 3D vector that is returned by accelerometer - it would be 9.8 or greater, and then we subtract gravity to get the actual acceleration magnitude. But then would the vector returned by the accelerometer event be inaccurate due to motion of the phone + direction of gravity distributed across all 3 axes...

Please help!

Thanks

1

There are 1 answers

8
Dan On BEST ANSWER

Disclaimer: I do not know any Android specifics, it's likely also handset specific. I merely speaking from a physics background.

You will need to integrate acceleration to velocity, and integrate velocity to displacement (position).

You will suffer from integrational drift. Each time you integrate, an integration constant will be introduced. Multiple integrations compound this error.

You will also need to worry about angular acceleration. ie. What happens when the handset is rotated, but remains in the same physical location?

There are ways to help reduce these sources of error.

If there are multiple accelerometers you can compare them, to try and determine any angular components.

If there are gyro's, you can use the gyro's to help cancel out the angular components.

If the compass is accurate enough, you can try to cancel at least the components in the horizontal plane.

GPS can be used to try and remove displacement integration errors. When the GPS says you are stopped, zero out the integration constants.

You will need to start looking at numerical integration and filtering algorithms. Without hardware acceleration, this could be computationally expensive.

At which point you really need to start asking yourself, does your problem really need precise displacement measurements? Will GPS displacement suffice? Can you achieve the same result with only acceleration?

You should try reading up on:

http://en.wikipedia.org/wiki/Inertial_navigation_system