Android Accelerometer event interpretation

Viewed 28

I'm trying to figure out in what direction (roughly) a phone has moved over a period of a couple of seconds. Is it possible ?

I'm using the gyroscope to track what direction the phone is facing. This seems to be working fine as a couple of tests confirm that the application can track the phone's orientation relatively accurately.

What I want to do..

I get the accelerometer reading x,y,z and the timestamp.

Using the equation v = v0 + a*t

I can caluclate the change in velocity of the device. Then using the phones orientation (calculated from the gyroscope) I can rotate those vectors to match the initial orentiation of the device. Then using the velocity I can estimate the direction of motion.

However the problem I'm facing is with the acceleromter as I'm unsure of data I'm receiving from the accelerometer. I want to know if this 'raw data' I'm receiving is modified in anyway before it reaches the application level is it the average acceleration over a short period of time ? or is it the instantaneous acceleration ?

Documentation:

https://source.android.com/devices/sensors/sensor-stack https://developer.android.com/guide/topics/sensors/sensors_overview : 'You can access sensors available on the device and acquire raw sensor data by using the Android sensor framework.' https://developer.android.com/reference/android/hardware/SensorManager

0 Answers
Related