Aimed at overcoming the problems of cumulative errors and low positioning accuracy in single Inertial Navigation Systems (INS), an Optimal Enhanced Kalman Filter (OEKF) is proposed in this paper to achieve accurate positioning of pedestrians within an enclosed environment. Firstly, the errors of the inertial sensors are analyzed, modeled, and reconstructed. Secondly, the cumulative errors in attitude and velocity are corrected using the attitude fusion filtering algorithm and Zero Velocity Update algorithm (ZUPT), respectively. Then, the OEKF algorithm is described in detail. Finally, a pedestrian indoor positioning experimental platform is established to verify the performance of the proposed positioning system. Experimental results show that the accuracy of the pedestrian indoor positioning system can reach 0.243 m, giving it a high practical value.