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. Creating complex queries for SQLite

Hi! I'm using the Android's media library intensively, and I was
asking myself whether it is possible or not to query the database more
freely than using the ContentProvider class. Would it be possible to
query directly the database that is stored in the filesystem (/data/
data/com.android.providers.media/databases/internal.db)? For instance,
I may need to create queries with subqueries and using various sqlite
commands. Is this possible?
Thanks!

-- 

2. Eclipse never sees AVDs anymore

I recently upgraded to Helios and installed the latest and greatest
SDK, ADT, and everything else I could think of.  Eclipse no longer
sees the AVDs when launching (debugging) the app.  I tried deleting
all my old AVDs and making new ones, but it's just hopeless, nothing
fixes the problem.  It simply can't see the AVDs.

I've set my run configuration target to manual (instead of
automatic).  When I attempt to run or debug my app, I get the dialog
with two sections, one on top of devices and one below for AVDs.  The
top section shows my phone plugged in my USB and I can run on the
phone just fine, but the lower section (Launch a new Android Virtual
Device) doesn't list anything.  I can easily verify that the AVDs
exist by going WindowMenu->AndroidSDKAndAVDManager.  It shows my AVDs
with green checkmarks.  If I launch an AVD from that dialog, I can
then run on it, but it appears in the top section of the launch
dialog, with the "devices" (with my phone), the lower portion for AVDs
remains empty.

It's frustrating to have to manually launch the AVD now.  I certainly
did not have to do this before.  I'm running Eclipse Helios, with ADT
8.0.1.v201012061207-82219.

Any ideas?

-- 

3. Android : Why NUMBER_KEY return the number in reverse order

4. Gingerbread vs Froyo

5. How to handle the GPS properly through multiple activities ?

6. Problem with AnimationDrawable

7. mms video streaming