Abstract:Aiming at the problem that the accuracy of the orientation estimation is affected by the gyroscope bias error in the orientation estimation system and the interference from surrounding local magnetic disturbances, a quaternion-based adaptive Kalman filter (q-AKF) algorithm is proposed in this paper. The algorithm utilizes the gyroscope outputs to establish the state equation of attitude error angle and construct the adaptive measurement noise covariance matrix with the outputs of the magnetometer. The simulation results show that the attitude error angle obtained by the q-AKF is less than 0.5°compared with the UKF algorithm and the EKF algorithm. Using the q-AKF algorithm to compensate the magnetometer can effectively suppress the gyro bias error, improve the precision of attitude algorithm in magnetic interference environment, which has high engineering application value.