Parallax HM55B Compass and using it on uneven ground.
Martin_H
Posts: 4,051
I have a Parallax HM55B Compass which Ive used on my kitchen floor. Now that Ive built the 4x4 robot and the weather is getting better I want to try it outside. But Ive heard that uneven ground induces errors in the compass readings. An accelerometer can correct a compass using this equation:
Xh = XM * cos(Pitch) + ZM * sin(Pitch)
Yh = XM * sin(Roll) * sin(Pitch) + YM * cos(Roll) - ZM * sin(Roll) * cos(Pitch)
But this requires a three axis compass to obtain the Z magnitude, and the HM55B is 2 axis. So I can either ignore this source of error or use a fudge factor for the Z component. For inclines less than about 15 degrees it looks like the impact of the Z component is negligible, so Im thinking I can just ignore it.
Anyone else use the HM55B outside on uneven ground? How did it work?
Xh = XM * cos(Pitch) + ZM * sin(Pitch)
Yh = XM * sin(Roll) * sin(Pitch) + YM * cos(Roll) - ZM * sin(Roll) * cos(Pitch)
But this requires a three axis compass to obtain the Z magnitude, and the HM55B is 2 axis. So I can either ignore this source of error or use a fudge factor for the Z component. For inclines less than about 15 degrees it looks like the impact of the Z component is negligible, so Im thinking I can just ignore it.
Anyone else use the HM55B outside on uneven ground? How did it work?