Question
I've just been developing my application with the ADIS16400 and having
difficulty figuring out the magnetometers. The gyroscopes and accelerometers
are fine. I have them working in a kalman filter and the performance is
exceptional. The magnetometers however are not working as expected. I have made
sure the Soft Iron and Hard Iron factors have all been set to the default
values. If I turn the sensor 180 degrees about an axis, the perpendicular axes
do not read the negative values of their previous values. The scales of the
axes are also a bit confusing as they don't seem to be the same. If I rotate
the sensor, the sensors do not read the same values even if they are pointing
in the same direction. I cannot operate the kalman filter without the
magnetometers and there's not much in the manual about them.
Answer
This requires an understanding of the earth’s magnetic fields and what to
expect, based on location (longitude, latitude, altitude). For example, the
magnetic field will travel at an angle that isn’t parallel or perpendicular to
the earth’s surface, so a 180 degree turn that is on the earth’s surface, will
not produce an equal, but opposite result. This may be a good starting point:
http://en.wikipedia.org/wiki/Earth%27s_magnetic_field