Compass accuracy dilemma

Posted by mob1lejunkie on Stack Overflow See other posts from Stack Overflow or by mob1lejunkie
Published on 2010-05-04T22:51:05Z Indexed on 2010/05/04 23:08 UTC
Read the original article Hit count: 243

Filed under:
|
|

I need to build compass for my application.

From reading the documentation it seems there are two reasonable ways of doing this:

  • Sensor.TYPE_ORIENTATION method: This is the easy way of doing it. The problem with this is it is not accurate. When I compare my reading with Snaptic Compass it is about 10-15 degress off which for my purposes is unacceptable.
  • Sensor.TYPE_ACCELEROMETER, Sensor.TYPE_MAGNETIC_FIELD and getRotationMatrix() in conjunction with remapCoordinateSystem() and getOrientation() method: The documentation says this "is usually more accurate". The problem is regardless of the delay I register with listener the compass goes crazy even when the device is stationary on flat surface.

Any suggestions for solving this problem will be greatly appreciated.

© Stack Overflow or respective owner

Related posts about android

Related posts about compass