(1) MCIN method

The experimental site is the fifth floor of No.1 Building and No.2 Building of the College of Automation Engineering. The experimental trace and indoor experimental scene are shown in Figure 13. The experimenter started from position <sup>1</sup> (0, 0) and walked counterclockwise to collect two rounds of data. The experimenter experiences the reference point in the order of <sup>1</sup> <sup>2</sup> <sup>3</sup> <sup>4</sup> <sup>5</sup> <sup>6</sup> <sup>7</sup> <sup>8</sup> <sup>1</sup> <sup>3</sup> <sup>4</sup> <sup>5</sup> <sup>9</sup> <sup>7</sup> <sup>8</sup> <sup>1</sup> . Additionally, the trace included multiple "entering the house" behaviors. The actual movement time in the experiment is 451.74 s.

**Figure 13.** Indoor experiment scene and experiment trace. (**a**) Indoor experiment scene. (**b**) Reference points.

The trace solved by the MCIN method and the positioning error of the reference point experienced 15 times are shown in Figure 14. The mean error of the reference point position is 1.98 m, and the maximum error is 4.16 m. For Figure 14b, if the MCIN method based on inertial navigation only is adopted, the navigation error will gradually diverge. Due to the uncertainty of course error divergence, the navigation solution results of some paths in a closed path will show smaller errors.

**Figure 14.** Two dimensional trace and absolute value of positioning error based on MCIN method. (**a**) Two dimensional trace. (**b**) Absolute value of positioning error.

#### (2) The initial position and heading of pedestrian are known

The distribution of sampled particle is shown in Figure 15. The step length and heading change of the particles obey the Gaussian distribution. Initially, the particles are distributed in the range near the starting point, where red represents "illegal particles" and blue represents passable "legal particles".

**Figure 15.** Sampling particle distribution and motion trace under the condition of known initial position and heading. (**a**) Particle distribution at the initial moment. (**b**) Particle distribution and trace during motion.

Figure 16 shows the motion trace and positioning error under the condition that the initial position and heading are known. In Figure 16a, the red line represents the motion trace solved by the MCIN method, and the blue line represents the trace with IMAPF method. It can be seen that the IMAPF can well correct the position of the navigation system over time. Figure 16b is the absolute value curve of the positioning error under the condition of known initial position and heading, which clearly shows the effectiveness of the algorithm in correcting the error. The MCIN method can effectively restrain error divergence.

Table 6 shows the error comparison under the condition that the initial position and heading are known. It can be seen from the data in the table that the method proposed in this paper can effectively restrain error divergence compared to the MCIN method.

**Figure 16.** Navigation trace comparison and curve of absolute value of positioning error with known initial position and heading. (**a**) Positioning trace comparison diagram. (**b**) Absolute value of positioning error.

**Table 6.** Error comparison under the condition that the initial position and heading are unknown.


(3) The initial position and heading of pedestrian are unknown (adaptive particle number)

The distribution of sampled particles is shown in Figure 17. Initially, particles are uniformly distributed throughout the map, with red representing "illegal particles" and blue representing passable "legal particles". Starting from the 114th step, the general location of the pedestrian is searched. With the continuous movement of the pedestrian, the navigation and positioning function is finally provided for the pedestrian. There is a possibility of symmetry in the indoor structure, and pedestrians may not know in advance. According to the structural characteristics of indoor rooms, corridors, etc., the global search can be realized as soon as possible by increasing the path complexity.

Figure 18 is the comparison diagram of positioning trace under the condition of unknown initial position and heading. In Figure 18a, the red line represents the trace of the MCIN method, and the blue line represents the trace of IMAPF method. It can be seen that with the increase of time, IMAPF method can well correct the position of the navigation system. Figure 18b shows the absolute value curve of the positioning error under the condition that the initial position and heading are unknown. As the pedestrian keeps moving, navigation and positioning functions are gradually provided with map constraints. After 114 steps, functions of navigation and positioning can be provided for pedestrians in the map. Figure 18b shows the absolute value of the positioning error calculated according to the final navigation and positioning results, so the errors of the first two reference points are not considered. It can be seen that the algorithm is effective in correcting errors, which can be limited in a certain range and do not diverge over time. The mean error of IMAPF method is 1.06 m, and the maximum error is 1.33 m.

Figures 16b and 18b show the absolute value of navigation error using the IMAPF method in this paper. In general, the navigation error of IMAPF method is constrained in a small range, which is better than MCIN.

It can be seen that the IMAPF method studied in this paper performs better than the MCIN method for pedestrian navigation, whether the initial position and heading are known or not.

**Figure 17.** Distribution of sampled particles and motion trace with unknown initial position and heading. (**a**) Particle distribution at initial moment. (**b**) Particle distribution and motion track of the 58th step in the motion process. (**c**) Particle distribution and motion track of the 114th step in the motion process. (**d**) Particle distribution and motion track of the 190th step in the motion process.

**Figure 18.** Navigation trace comparison and curve of absolute value of positioning error with unknown initial position and heading. (**a**) Positioning trace comparison diagram. (**b**) Absolute value of the positioning error.

(4) The initial position and heading of pedestrian are unknown (fixed particle number)

In order to compare the computational efficiency and error value between the fixed particle number and the adaptive particle number, under the condition of unknown pedestrian initial position and heading, the fixed number of particles is 2000, 10,000, 50,000 and 100,000, respectively. Table 7 is the error statistics table of different particle numbers.


**Table 7.** Statistics of positioning errors with different particle numbers under experimental conditions.

Figure 19 shows the pedestrian motion trace obtained by different particle numbers. Comparing the navigation results of five different particle numbers, the adaptive particle number method proposed in this paper is close to the navigation positioning error value when the fixed number of particles is 50,000. The error is small when the number of fixed particles is smaller, but the calculation time of the adaptive particle number method is reduced about 4.7 times lower compared to the calculation time of 50,000 fixed particles.

**Figure 19.** Pedestrian motion trace calculated with different particle numbers under experimental conditions.
