Accelerometer and the samplin rate

by outi » Fri, 14 Jan 2011 21:27:51 GMT

Sponsored Links

does anybody know, why the sensor sampling rate is fluctuating between
85 and 115 Hertz [Hz] ?
I tested my accleretation sensor app up to 60 seconds. And I
calculated the mean sampling rate. In any continous I get an another
mean sampling rate...

I'm using the SENSOR_DELAY_FASTET constant:

sensorManager.registerListener(accelerationListener, sensor,

Thank you for your replies!


Re: Accelerometer and the samplin rate

by ip332 » Sat, 15 Jan 2011 02:22:24 GMT

 First of all it all device dependent because SENSOR_DELAY_FASTEST has
value 0ms in Android git but 10ms - Samsung Galaxy S.
Using 0ms should result in close to 100% CPU usage so some sensors
drivers have internal logic to prevent such case and add some delay

On the other side "sampling rate" is the frequency of measurements
when it seems like you are trying to check how often do you get
You should use timestamps inside sensor event if you are interested in
the stability of the sampling rate.
With respect to the unstable rate you get updates from the
SensorManager - this is not a bug, but a feature (explicitly described
in the SensorManager documentation).


Sponsored Links

Other Threads

1. I can't configure my google account on Android.

Android 2.2.1

I can't configure my google account on Android.

i did the same (as shown on pictures):

after Step 3:
Setup could not finish
Unable to open connection to server

What should I do?


2. Making an app backward compatible.

Hi guys. Im a newbie to android development. I managed to get source
code for a piano application. The application is built for version
1.6. But i want to make it work in 1.5(cupcake). It shows some error
and im foreced to close the app when i try to run in 1.5. Is there
anything i can do so as to make it work in 1.5 ?? please help... :(


3. I require Code for profile changing

4. Service is not started automatically at app startup

5. Calendar Day of Year issue

6. AMR format

7. bluetooth printer on apps