Shop OBEX P1 Docs P2 Docs Learn Events
Parallax HM55B Compass and using it on uneven ground. — Parallax Forums

Parallax HM55B Compass and using it on uneven ground.

Martin_HMartin_H Posts: 4,051
edited 2012-03-22 11:24 in General Discussion
I have a Parallax HM55B Compass which I’ve used on my kitchen floor. Now that I’ve built the 4x4 robot and the weather is getting better I want to try it outside. But I’ve 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 I’m thinking I can just ignore it.

Anyone else use the HM55B outside on uneven ground? How did it work?
Sign In or Register to comment.