Abstract:The triaxis magnetometer and triaxis accelerometer are indispensable vector field sensors in attitude and heading reference system (AHRS), and its error correction is based on the method or ellipsoid fitting. The major defect of this method is that it cannot compensate the misalignment between the sensor coordinate system and the carrier coordinate system. When the sensors rotate around a fixed axis, both the projections of geomagnetic vector and gravity vector on the rotating axis are constant. By using this property, the abovementioned defect of ellipsoid fitting method can be overcome, and the magnetometer and accelerometer can be completely calibrated. The experiment results show that the improved correction method can reduce the attitude and heading errors to less than 1°, and the operation is simple, which is convenient for onsite calibration of AHRS.