Accelerometer and the samplin rate

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


Sponsored Links
 Hello,

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,
SensorManager.SENSOR_DELAY_FASTEST);

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
inside.

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
SensorEvent.
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. Iphone like album cover

anyone has experience on developing iphone like album cover with a set
of images?
or there is already an api in android?

-- 

2. Request for improved App Widget functionality

I see a lot of requests for things like animations and EditText
functionality within AppWidgets, which are currently either not
supported or very difficult to do, hence created an enhancement
request in the Android Code.

http://code.google.com/p/android/issues/detail?id=9580

Please "star" this issue if you have been affected by this and/or
would like to see improvements.

I see AppWidgets as one of the great differentiators over the iPhone,
and believe that Google should keep ahead of the curve on this.

Cheers
James

-- 

3. Attach debugger to a process running in the emulator via eclipse.

4. Manually create links

5. Paging bos anto sby

6. Can i remove my status bar notification without opening my app?

7. Intercepting the Android phone dialer