I'm a using a embedded MEMS 3-axis magnetometer. With 'embedded' I mean that I am using an Android device with a magnetometer. I am not doing the low-level control myself, only retrieving measurements. From the information I have already found, I know that a magnetometer can suffer from a hard-iron offset and soft-iron distortion.
As far as I understand, hard-iron offset is caused by magnetic fields that have a constant position relative to the magnetometer, so for example other electronics in the same device. This would make the offset (almost) constant.
Soft-iron will cause the measured magnetic strength to warp into a ellipse instead of a circle, and is caused by nearby materials that don't generate a magnetic field by themselves, but to change the 'direction' of the local field.
My magnetometer shows a near-perfect circle with an offset when turning 360 degrees while holding the device parallel to the floor (I am only interested in 'yaw/azimuth') and plotting the vectors that represent the measured magnetic 'direction'. This would, as far as I know, indicate a hard-iron offset.
My problem is that the direction of the offset vector seems to randomly change every time I run my program, the center of the circle can be in all 4 quadrants of the plane parallel to the floor and I haven't figured out any consistency yet!
Am I misunderstanding how hard-iron offsets work, and is it normal that it can change direction? If so, what can be the cause of these changes?
Best Answer
Try doing the experiment outside away from any iron.