**2. Materials and Methods**

#### *2.1. Proposed System Scheme*

In order to solve the error divergence problem of pedestrian navigation and positioning system for a long time, on the premise of no other external sensors, a pedestrian navigation and positioning method based on the combination of indoor IMAPF is proposed to constrain and correct the position and heading change information calculated by the navigation system through the constraint relationship between the indoor map information and the position and heading calculated by the inertial navigation. The frame of the designed integrated navigation and positioning method is shown in Figure 1.

**Figure 1.** General scheme of the indoor pedestrian navigation and location method based on the IMAPF method.

The algorithm proposed in this paper is as follows: Firstly, through the dead reckoning module [30], a PNS based on foot-mounted ZUPT is established, and the navigation system is corrected by taking the difference between the heading change of foot and heading change of waist in one step as the observation, taking the physical distance between two adjacent zero velocity intervals as the step length, and then the heading change is obtained by integrating the waist angular velocity with time. Then, through the indoor map processing module, the indoor architectural plan is binarized, and then the image is simplified to obtain the available map. Establish a PF model, input the step length, heading change and indoor map obtained from the above two modules into the PF. First, initialize the position and heading of the particle set respectively according to the known or unknown initial position and heading of pedestrian navigation, detect whether particles "going through the wall", delete "illegal particles" or retain "legal particles", and calculate the particle normalization weight according to the sequential importance sampling. Secondly, the effective value of the particles is calculated to determine whether resampling is required. When resampling is required, the adaptive particle number is calculated to update the current state estimation value. Then the pedestrian position at the current time is solved, and the motion trace obtained from the solution is projected into the indoor map.
