Abstract The positioning technology based on ultra-wideband ranging has been widely applied in the field of indoor positioning due to its excellent localization capabilities. However, mixed line-of-sight (LOS) and non-line-of-sight (NLOS) indoor environments severely constrain positioning accuracy. To address this issue, we propose an innovative algorithm based on the adaptive unscented Kalman filter (AUKF) and interactive multiple model (IMM), designed to significantly enhance positioning accuracy in mixed indoor environments by mitigating the impact of NLOS errors and inaccurate process noise. Firstly, recognizing the distinct characteristics of ranging errors in indoor environments, we develop LOS and NLOS ranging models separately. Based on these models, the unscented Kalman filters are constructed for LOS and NLOS environments to accurately simulate the mixed LOS/NLOS indoor environments. Secondly, determining the statistical characteristics of process noise is challenging, often leading to degraded filter performance. We address this issue by proposing an environment-based AUKF algorithm, which significantly enhances the robustness and accuracy of the positioning system. Finally, the environment-based AUKFs are integrated into the IMM framework to constrain NLOS errors and achieve precise positioning effectively. Simulation, open-source dataset validation and experimental results demonstrate that the proposed algorithm significantly improves the accuracy and stability of mobile target positioning in mixed LOS/NLOS indoor environments.