1

所以我一直在构建一个利用磁罗盘和手机方向等的 AR 引擎。在这个过程中,我构建了一个免费的愚蠢的 AR Compass,在测试中我意识到 90% 的时间它工作得很好!但有时磁罗盘传感器停止响应..我发现的每个文档都在谈论用户使用他们的设备制作数字 8 以重新校准罗盘.. 这有时有效但并非总是如此.. 有没有办法以编程方式重置罗盘? 在冰淇淋三明治上测试 nexus prime!

埃利德尔

4

1 回答 1

7

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),

于 2012-07-02T20:46:13.467 回答