Methods, apparatus, and systems directed to calibrating a magnetometer. Among such are methods that use only the horizontal components of magnetometer measurements. Then, planar calibrated magnetic field output measurements can be used in sensor fusion with data from gyroscope(s) and accelerometer(s). In other embodiments, heading information from the planar calibrated magnetic field is fused with the heading calculated from gyroscope integration. Other such methods include any of generating combined information including 6-axis fusion information and magnetometer information; accumulating values for any of a first matrix [T] and a first vector [U] according to the combined information; generating a second matrix [K] according to any of a pseudo-inverse of the first matrix [T] and the first vector [U]; generating any of a scale and skew matrix and an offset according to the first matrix [K]; and calibrating the magnetometer according to any of the scale and skew matrix and the offset.
展开▼