I have 2 separate tilt-compensated magnetometer setups. One is an Invensense 9250, the other is a simpler LSM303. All I'm trying to do is compute a tilt-compensated compass heading. I've taken both sensors through standard calibration procedures that take out hard and soft iron offsets. Both produce nonsensical values (such as a full \$360^{\circ}\$ rotation going through a displayed range of \$200^{\circ} - 300^{\circ}\$. I'm reasonably certain that my math is correct. One thing I am seeing on both is that looking at raw magnetometer values, and moving the sensor without rotation a few inches above my desk noticeably changes one of the axes. The same shows itself in the computed values, with the heading changing by as much as \$20^{\circ}\$.

Having replicated this on two completely different systems, I'm starting to wonder if there's an environmental effect? I've got a glass/aluminum desk with an Apple Cinema display on it, and that's about it. Could those things be drastically affecting my magnetometer values?


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.