Saturday, April 23, 2011

[android-developers] Ignoring magnetic field sensor, calibrating the accelerometer

I'm trying to use the accelerometer sensor for a game.

1) I am currently ignoring the magnetometer and using a static value
for the magnetic field vector. My reasoning is that the magnetometer
is subject to interference and will likely give more varied values
than the accelerometer, so I'd like to not use it if possible. I'm
also not sure that it is necessary for most motion-based game
control. Does this make sense?

2) I'm attempting to get a baseline accelerometer value, but it
appears as if the sensor returns a junk/default value for a given axis
unless a change is detected along that axis. So it seems as if I can't
get an accurate baseline value while the phone is lying perfectly
still -- am I understanding this right? Is there any way to work
around this problem?

Thanks.

--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to android-developers@googlegroups.com
To unsubscribe from this group, send email to
android-developers+unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home


Real Estate