Inbuilt sensor calibration functionality in Android

亡梦爱人 提交于 2019-12-11 06:32:09

问题


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.


回答1:


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.



来源:https://stackoverflow.com/questions/42632370/inbuilt-sensor-calibration-functionality-in-android

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!