本帖最后由 smileage 于 2014-3-29 15:29 编辑
楼主,我使用了你的代码,发现IMU方式算出的Yaw的稳定性很差,而AHRS的稳定性较好(1度以内变化)。
这是什么原因造成的呢?
下面是IMU方式出来的数据,跳动大
221.5
223.7
224.4
226.5
224.4
225.7
219.1
222.4
224.3
AHRS方式,数据稳定
161.4
161.6
161.6
161.6
161.4
161.4
161.2
161.3
161.3
161.4
161.5
161.5
161.5
161.7
161.8
161.7
161.7
161.8
161.8
161.8
161.8
162.1
161.9
161.8
我看了mx\my\mz的原数据,的确跳动是挺大的,这也解释了IMU方式为什么跳动大。
但是为什么AHRS没有出现这个问题呢?这个想不通 mx=-28.000000, my=-98.000000, mz=-114.000000
mx=-28.000000, my=-96.000000, mz=-114.000000
mx=-26.000000, my=-99.000000, mz=-111.000000
mx=-38.000000, my=-97.000000, mz=-109.000000
mx=-38.000000, my=-93.000000, mz=-106.000000
mx=-34.000000, my=-100.000000, mz=-110.000000
mx=-38.000000, my=-97.000000, mz=-111.000000
mx=-29.000000, my=-99.000000, mz=-116.000000
mx=-25.000000, my=-96.000000, mz=-117.000000
mx=-32.000000, my=-94.000000, mz=-107.000000
mx=-29.000000, my=-95.000000, mz=-109.000000
mx=-32.000000, my=-96.000000, mz=-117.000000
mx=-32.000000, my=-96.000000, mz=-112.000000
mx=-31.000000, my=-97.000000, mz=-109.000000
mx=-25.000000, my=-96.000000, mz=-119.000000
mx=-37.000000, my=-98.000000, mz=-107.000000
mx=-32.000000, my=-91.000000, mz=-117.000000
mx=-33.000000, my=-97.000000, mz=-109.000000
mx=-34.000000, my=-91.000000, mz=-107.000000
mx=-30.000000, my=-94.000000, mz=-112.000000
mx=-29.000000, my=-99.000000, mz=-109.000000
mx=-29.000000, my=-99.000000, mz=-113.000000
mx=-32.000000, my=-98.000000, mz=-105.000000
mx=-29.000000, my=-95.000000, mz=-111.000000
mx=-29.000000, my=-93.000000, mz=-109.000000
mx=-31.000000, my=-102.000000, mz=-116.000000
mx=-31.000000, my=-95.000000, mz=-109.000000
mx=-29.000000, my=-99.000000, mz=-111.000000
mx=-30.000000, my=-98.000000, mz=-110.000000
mx=-34.000000, my=-100.000000, mz=-110.000000
mx=-31.000000, my=-99.000000, mz=-109.000000
mx=-31.000000, my=-102.000000, mz=-111.000000
mx=-33.000000, my=-97.000000, mz=-109.000000
|