Abstract:A new algorithm is proposed in this work, to solve the disadvantages of UWB(Ultra-wideband) in the complex indoor environment, such as low positioning and navigation accuracy, serious effect of NLOS(Non-line-of-sight) error, and inability to provide target attitude information, which takes position, velocity, quaternion, bias errors of accelerometer and gyroscope as state vectors, fuses UWB and IMU(Inertial measurement unit) measurement information through EKF(Extended Kalman filter) algorithm, corrects velocity, position, quaternion with the bias errors of accelerometer and gyroscope, the quaternion after filtering to calculate the rotation matrix and attitude information. Then, the residual error is used to calculate the measurement noise factor, the residual matrix is composed, and the covariance matrix of the observation noise is dynamically adjusted to suppress the influence of NLOS error on positioning and navigation. The results show that the positioning and navigation algorithm based on the combination of UWB and IMU improves the accuracy of 88.6% compared with the LS-Taylor algorithm in the complex indoor environment, which enhances the system's ability to resist NLOS error, improves the dynamic positioning accuracy, and can get more accurate attitude information, which has better practicability and robustness.