我正在尝试找出如何开始在 iPhone 上实现传感器融合。我从 David Sachs 的演讲开始:
Android 设备上的传感器融合
说明性的,它没有显示任何代码(这是有道理的)。我已经看到了 GLGravity (提取重力矢量)和AccelerometerGraph 示例,但我需要一些帮助或至少是指导如何结合加速度计、陀螺仪和罗盘输入,使结果与 David 展示的类似。
谢谢
I'm trying to find out how could I start to implement sensor fusion on the iPhone. I've started from this talk from David Sachs:
Sensor Fusion on Android Devices
Although David's talk is very illustrative, it doesn't show any code (it makes sense). I've seen both the GLGravity (to extract the gravity vector) and the AccelerometerGraph examples, but I need some help or at least guidance on how to combine the accelerometer, gyroscope and compass inputs so that the result is similar to what David shows.
Thanks
发布评论
评论(1)
更新:自 2015 年 5 月 19 日起,在移动设备上自行实现传感器融合没有任何意义:Android (SensorManager 位于
Sensor.TYPE_ROTATION_VECTOR
下)和 iPhone (核心运动CMAttitude
下的 )提供了自己的。(2011年5月5日的原始答案)
我已经为Shimmer 2 基于此手稿。我强烈推荐它。
传感器融合通常通过卡尔曼滤波器来实现。
然而,不存在“程序员用卡尔曼滤波器”这样的东西。卡尔曼滤波器很难理解。如果您不理解它,您将无法正确实施和使用它。就用上面的手稿吧。
UPDATE: As of May 19, 2015, there is no point in implementing sensor fusion yourself on mobile devices: Both Android (SensorManager under
Sensor.TYPE_ROTATION_VECTOR
) and iPhone (Core Motion underCMAttitude
) offers its own.(The original answer from May 5, 2011)
I have implemented sensor fusion for Shimmer 2 devices based on this manuscript. I highly recommend it.
Sensor fusion is often achieved by Kalman Filter.
However, there is no such thing as "Kalman Filter for programmers". Kalman filter is difficult to understand. You won't be able to implement and use it correctly if you do not understand it. Just use the above manuscript.