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. " Inject event permission "

Hi all,

when I look all the available permission in the android manifest file,
I can see the INJECT EVENTS PERMISSION.. When I try to use this
permission (note am not using any API's). Its is saying " Not granting
the permission android.permission.INJECT_EVENTS to mypackage.pack

Si I am wondering why they given that permisiion in the list then why
the Android System not granting that permission to my application.

What is the secret behind this permissions game????


2. Headset Input event

What event ID does android expect when a headsets key is pressed and
release.  On the G1 i noticed it was KEY_MEDIA event  but it doesn't
seem to work on the more recent releases

3. How to create transparent Window without starting a new activity

4. what is maximum size of application database allowable in Android?

5. Count Down Timer in list view

6. what is maximum size of application database allowable in Android?

7. When another activity is called from main activity, The calling activity get destroyed?