简体   繁体   English

平滑 Android 设备上的罗盘值

[英]Smoothing the values of the Compass on Android devices

In my Android Application there's a cube which uses the compass to rotate, but the compass returns sometimes for a very small time a value which is completely different to the other values.在我的 Android 应用程序中,有一个使用指南针旋转的立方体,但指南针有时会在很短的时间内返回一个与其他值完全不同的值。 Is there a way to solve it or must i write an Method to smooth the values.有没有办法解决它,或者我必须编写一个方法来平滑这些值。

you must implements a LowPassFilter, but if you need a more precision you must use a Sensor.TYPE_ROTATION_VECTOR.您必须实现 LowPassFilter,但如果您需要更高的精度,则必须使用 Sensor.TYPE_ROTATION_VECTOR。

Shannon - Nyquist You could have aliasing issues with 50-60Hz power. Shannon - Nyquist 使用 50-60Hz 电源可能会出现混叠问题。 High sampling rates and filter afterwards.高采样率和过滤后。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM