Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Magnetic Field Sensor calibration on ANDROID

Tags:

android

I'm making an application that works as a compass..

I'm using the accelerometer and the magnetic field sensors to compute the azimuth angle through, sensor.getOrientation().

I'm searching for something that can improve the magnetic field sensor accuracy, since I'm getting it state of accuracy as UNRELIABLE!

Any one knows anything about this?I'm looking for something that can be either hardcoded or for instance just physically moving the phone until it gets calibrated!

like image 885
Mark Avatar asked May 18 '11 16:05

Mark


People also ask

How do I calibrate my phone magnet sensor?

To calibrate your device move it a far away as you can from any magnetic interference (cars, computers etc). You should then wave your device in a figure of 8 pattern rotating it in different directions as you do this. If your device is very hot you may need to wait for it to cool down.

How do I calibrate my Android sensor?

Place your device on its back on a flat surface and then select "Calibrate." Keep your phone steady during calibration, during which the green circles move. The process is complete when the circles stop moving.

Does Android phone have magnetic sensor?

Does your Android phone have a magnetometer? Yup, chances are that it does as most Android devices do. Even if you have an old or a cheap phone, there's likely a magnetometer inside of it. And, there are a lot of apps out there that make use of that magnetometer to display a digital compass on your phone's screen.


1 Answers

This is not a final answer (I don't know anything for sure), but my understanding from online posts is that waving the phone around in a figure of 8 a few times while the compass is in use is supposed to trigger automatic recalibration. This is what the google maps app suggests, for example. I don't know whether this is dependent on application functionality (something in maps that detects the waving by accelerometer and triggers a recalibration), or something in the android stack, or something specific to per-phone implementations. Try it and see!

Eg discussion: http://androidforums.com/epic-4g-support-troubleshooting/217317-cant-get-compass-calibrate.html

This reference appears to suggest this per-axis / figure-8 rotation process is built-in functionality: http://m.eclipsim.com/gpsstatus/

And here another article that claims this is built-in functionality, and that you don't even need to be running a compass-consuming app for the recalibration to work: http://www.ichimusai.org/2009/06/20/how-to-calibrate-the-htc-magic-compass/

like image 192
Tao Avatar answered Sep 22 '22 15:09

Tao