Compensating compass lag with the gyroscope on iPhone 4

后端 未结 4 1848
逝去的感伤
逝去的感伤 2020-12-04 08:27

I\'ve been experimenting with the compass and gyroscope on iPhone 4 and would like some help with an issue I\'m having. I want to compensate for the slowness of the compass

4条回答
  •  挽巷
    挽巷 (楼主)
    2020-12-04 09:07

    The direction of the yaw axis vector is undefined when in zero gravity (or free fall, or close enough).

    In order to do synchronization while in motion, you need to create a filter for your "horizontal" value that has the same lag/delay response characteristics as the magnetic compass. Either that, or wait until motion stops long enough for both values to settle before recalculating the offset.

提交回复
热议问题