compass calibration

半城伤御伤魂 提交于 2019-12-13 02:08:53

问题


So i have been building an AR engine that makes use of the magnetic compass and phone orientation ect.. In the process i built a free stupid AR Compass and in testing i realize that 90% of the time it works GREAT! but occassionally the magnetic compass sensor stops responding.. every doc i have found talks about the user makeing a figure 8 with their device to recalibrate the compass.. and this works SOMETIMES but not always.. is there a way to reset the compass programmatically? testing on ice cream sandwhich nexus prime!

eliddell


回答1:


The compass cannot be reset programmatically because of the way calibration works.

The compass works by detecting small changes in the magnetic field around it. When you wave it in a figure of 8 pattern, the changes are to fast and too much, which resets it. This causes it to recalibrate. However, there are some cases in which recalibration will not help. These are usually when you are standing next to high voltage power lines, or next to a piece of metal, or are inside a car that has a lot of static in it (especially the area next to the dashboard),



来源:https://stackoverflow.com/questions/11300837/compass-calibration

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