Issue:-
- I am developing a application which
needs a new acceleration datum every 5
millisecond.
My Approach:-
- I have created a remote service
which only reads the acceleration
data from SensorManager. - I had also set the read rate to
“DELAY FASTEST” while initialize the
SensorManager. - Then i use IPC to communicate too my
main application to get these
reading.
Problem:-
- If i put a log inside
onSensorChange() event i receive a
new sensor data every 20 ms time. But i need data every 5 ms.
Question ?
-
Is there any better method to read
the senor data faster. -
Is there any way i can poll the
senor data rather that waiting for
the event handler to trigger the
event?
Please help me to find a better solution to read the data in 5 ms time or poll the acceleration data.
As I understand it, the accelerometer is very noisy and not suitable for fast operations. See the GoogleTech talk on sensor fusion at http://www.youtube.com/watch?v=C7JQ7Rpwn2k for a more authorative explanation and what you can do about it. Short explanation: Use the gyro for high speed events and the acceleromenter to correct the drift.