Objective In order to solve the problem of the low accuracy of the measurement system.Methods An improved trace Kalman filter(UKF)and extended Kalman filter(EKF)were applied to the posture filtering al-gorithm for the drill.Based on the quaternionic theory of rotating coordinate transformation and the principle of gyro measurement,this method established the nonlinear observation equation and state equation of the drill atti-tude sensor data,transformed and changed the measurement data with quaterninion,and finally eliminated the error in the inertial sensor data.The UKF algorithm used the UT transform to approximate the probability density distribution of the nonlinear function without ignoring the high term order,therefor it had a good calculation accu-racy for the statistics of the nonlinear distribution compared with the EKF algorithm.Results The simulation showed that the peaks and standard deviation of UKF were less than that of EKF.Conclusion With more accuracy significantly higher than that of the EKF filtering algorithm,the improved UKF filtering algorithm removes more effectively the interference noise in the inertial sensor,which is conducive to improving the measurement accura-cy of the inertial sensor of the microelectromechanical system(MEMS)and improving the drilling efficiency.