I am working on an application which utilizes accelerometer and magnetometer data and their fused data to function. Now there's an inherent need when it comes to magnetometer to re-calibrate it regularly. The sensor gets uncalibrated due to a phenomena called hard iron effect. My application requires very accurate sensor data (which the hardware is capable of delivering but noise and uncalibrated values create a roadblock). I also know that there are inbuilt calibration functions running in background on android because many a times (not always) when magnetometer is showing wrong values it gets corrected by itself without an input from the user (like 8-shaped motion). I would like to know how frequently does android perform this calibration and is there a need for me to write my own auto-calibration code. The other possibility is if possible call this inbuilt calibration function at some frequency within my application. Android documentation I have gone through provides very little information on this.
Asked
Active
Viewed 584 times
1
-
Related question: http://stackoverflow.com/q/34012677/295004 – Morrison Chang Mar 06 '17 at 18:12
1 Answers
0
SensorEvents
has a field called accuracy
that changes for magnetometers on the devices I have tested. This may be a good indication on whether the event you receive should be used or now.

Pablo Baxter
- 2,144
- 1
- 17
- 36