Abstract:In the application of MEMS inertial measurement devices, the study of effective multi-sensor data fusion algorithms is one of the key technologies for improving attitude estimation accuracy and enhancing anti-interference capability. To address the challenges of low attitude estimation accuracy and the susceptibility of magnetometers to magnetic interference, this paper proposes an attitude estimation algorithm that combines Mahony filtering with the cubature Kalman filter. First, the magnetometer and accelerometer data are used to construct an error correction term to compensate for gyroscope data. Additionally, keyframe techniques are employed to actively compensate for data affected by magnetic interference. The corrected preliminary attitude quaternion is then used as the state information for constructing the Cubature Kalman Filter. Next, the attitude estimates from the magnetometer and accelerometer are used as the observation data, and an adaptive measurement noise covariance matrix is established based on the residual information from the magnetometer data, in order to mitigate the influence of magnetic interference on the attitude estimation. Vehicle-mounted experiments demonstrate that the proposed algorithm significantly improves the accuracy of attitude estimation. Compared to conventional methods, the accuracy of roll, pitch, and yaw angles is enhanced by 45.3%, 50.2%, and 32.8%, respectively. Therefore, the proposed algorithm exhibits excellent performance in suppressing gyroscope drift and resisting magnetic interference.