A smart phone PDR indoor positioning algorithm that integrates adaptive step size and map matching is proposed to address the problems of the step size estimation model in the classic PDR algorithm being unable to adapt to the differences between different individuals and the inac-curate estimation of the heading angle of internal sensors in mobile phones.This algorithm is based on the Weinberg model and introduces the adjacent peak time difference function to improve the adaptability of the step size model.The dual threshold method is used for step frequency detec-tion,and the Kalman filter is used to optimize the heading angle after map matching,ultimately a-chieving accurate indoor pedestrian positioning.The experimental data shows that the closed-loop error of the proposed algorithm for the total distance is 0.58%,which is 73.29%lower than using only adaptive step length and 59.21%lower than using only map matching.The cumulative error for a 72-meter journey is 4.848 meters,which is 28.21%lower than the classical PDR algorithm.The improved algorithm significantly improves positioning accuracy,and the closed-loop error and cumulative error are smaller.The experimental results indicate that the algorithm has good engi-neering application value.