Combining a Modified Particle Filter Method and Indoor Magnetic Fingerprint Map to Assist Pedestrian Dead Reckoning for Indoor Positioning and Navigation

Although advancement has been observed in global navigation satellite systems and these systems are widely used, they cannot provide effective navigation and positioning services in covered areas and areas that lack strong signals, such as indoor environments. Therefore, in recent years, indoor positioning technology has become the focus of research and development. The magnetic field of the Earth is quite stable in an open environment. Due to differences in building and internal structures, this type of three-dimensional vector magnetic field is widely available indoors for indoor positioning. A smartphone magnetometer was used in this study to collect magnetic field data for constructing indoor magnetic field maps. Moreover, an acceleration sensor and a gyroscope were used to identify the position of a mobile phone and detect the number of steps travelled by users with the phone. This study designed a procedure for measuring the step length of users. All obtained information was input into a pedestrian dead reckoning (PDR) algorithm for calculating the position of the device. The indoor positioning accuracy of the PDR algorithm was optimised using magnetic gradients of magnetic field maps with a modified particle filter algorithm. Experimental results reveal that the indoor positioning accuracy was between 0.6 and 0.8 m for a testing area that was 85 m long and 33 m wide. This study effectively improved the indoor positioning accuracy and efficiency by using the particle filter method in combination with the PDR algorithm with the magnetic fingerprint map.


Introduction
Outdoor positioning performance has approached perfection due to the global navigation satellite system (GNSS). Moreover, in the past decade, research and development was focused on indoor positioning [1]. According to the 2015 US survey, approximately 70%-80% of the population use mobile personal navigation services through smartphones [2]. Thus, there is a potential for developing indoor positioning and navigation conducted using a mobile phone. GNSS signals are affected by the shadowing of building indoors. Moreover, Wi-Fi, iBeacon, and RFID require additional infrastructure and regular maintenance, which is expensive. The inertial navigation system (INS) and pedestrian dead reckoning (PDR) algorithms do not require the collection of external signals. However, errors accumulate rapidly over time when these algorithms are used. Moreover, the accuracy of image positioning is high, but the image processing method is complex and requires high-performance hardware. Magnetic positioning does not require additional hardware equipment, but its accuracy is lower than that of image positioning. Each of the aforementioned technology has its own advantages and disadvantages. Currently, there is no single technology The Microsoft Indoor Localization Competition of 2016 reported the accuracy of fusion of geomagnetism and Wi-Fi was better than many other positioning methods [4]. This is meaning geomagnetic signal map is expected to exceed the traditional Wi-Fi to distinguish fingerprints in different locations [5]. The use of magnetic field measurements, unlike typical Wi-Fi or Bluetooth positioning measurements, are unaffected by moving humans, providing more time-invariant location information [5]. Based on the aforementioned factors, a smartphone magnetometer was used in this study to collect magnetic field data for constructing indoor magnetic fingerprint maps, and an acceleration sensor and a gyroscope were used to record the position of a mobile phone and detect the number of steps taken by a user with the smartphone. All obtained information was input into the PDR algorithm to calculate the position of the smartphone [6][7][8]. Compared with other wireless positioning systems, PDR has an easier operation and a lower cost for common users because no additional equipment is required. However, PDR results estimated from inertial measurement unit (IMU) data have errors that are accumulated over time. Thus, many methods have been proposed for correcting PDR positioning errors, such as combining various sensors and wireless devices for error correction [2,3] and conducting algorithmic advancements for obtaining heading direction and step length estimations [9][10][11][12][13][14][15][16]. This study optimised the PDR algorithm by using the difference magnetic fingerprint between real-time measurement and magnetic fingerprint map data to calculate the weight then put in a particle filter method (in this study call modified particle filter) to get the position of user. It does not need extra devices just using a smartphone to achieve indoor navigation.

Methodology
Three types of sensors were used in this study-a gyroscope, an accelerometer, and a magnetometer. Data from the three sensors were used for calculating heading direction, conducting step detection, and creating magnetic maps, respectively ( Figure 1). The Microsoft Indoor Localization Competition of 2016 reported the accuracy of fusion of geomagnetism and Wi-Fi was better than many other positioning methods [4]. This is meaning geomagnetic signal map is expected to exceed the traditional Wi-Fi to distinguish fingerprints in different locations [5]. The use of magnetic field measurements, unlike typical Wi-Fi or Bluetooth positioning measurements, are unaffected by moving humans, providing more time-invariant location information [5]. Based on the aforementioned factors, a smartphone magnetometer was used in this study to collect magnetic field data for constructing indoor magnetic fingerprint maps, and an acceleration sensor and a gyroscope were used to record the position of a mobile phone and detect the number of steps taken by a user with the smartphone. All obtained information was input into the PDR algorithm to calculate the position of the smartphone [6][7][8]. Compared with other wireless positioning systems, PDR has an easier operation and a lower cost for common users because no additional equipment is required. However, PDR results estimated from inertial measurement unit (IMU) data have errors that are accumulated over time. Thus, many methods have been proposed for correcting PDR positioning errors, such as combining various sensors and wireless devices for error correction [2,3] and conducting algorithmic advancements for obtaining heading direction and step length estimations [9][10][11][12][13][14][15][16]. This study optimised the PDR algorithm by using the difference magnetic fingerprint between real-time measurement and magnetic fingerprint map data to calculate the weight then put in a particle filter method (in this study call modified particle filter) to get the position of user. It does not need extra devices just using a smartphone to achieve indoor navigation.

Methodology
Three types of sensors were used in this study-a gyroscope, an accelerometer, and a magnetometer. Data from the three sensors were used for calculating heading direction, conducting step detection, and creating magnetic maps, respectively ( Figure 1). Android Studio was used for developing the test environment and for transferring data from sensors. Sensor data were transferred to a computer through a mobile entity. Then, MATLAB (Mathworks, Natick, MA, USA) was used for compiling the algorithm and illustrating results. In other words, sensor data collection and PDR algorithm compilation were performed using Android Studio and MATLAB, respectively.

Accelerometer Data and Pace Detection
When a smartphone is placed on a flat surface, accelerometer data contain intense vibrations, which represent noise. Therefore, accelerometer data have to be smoothed using a filter. Ning compared the accuracies of the Savitzky-Golay (SG) filter and fast Fourier transform (FFT) for Android Studio was used for developing the test environment and for transferring data from sensors. Sensor data were transferred to a computer through a mobile entity. Then, MATLAB (Mathworks, Natick, MA, USA) was used for compiling the algorithm and illustrating results. In other words, sensor data collection and PDR algorithm compilation were performed using Android Studio and MATLAB, respectively.

Accelerometer Data and Pace Detection
When a smartphone is placed on a flat surface, accelerometer data contain intense vibrations, which represent noise. Therefore, accelerometer data have to be smoothed using a filter. Ning compared the accuracies of the Savitzky-Golay (SG) filter and fast Fourier transform (FFT) for smoothing pace detection data [16]. The result revealed that the SG filter is more accurate than FFT. Moreover, as the pace increased, the rate could be reduced to 1.1% [16]. The SG filter was proposed in 1964 [17] and has been widely used for smoothing data and filtering noise. The advantage of this filter is that the shape of data and the width of each wave are retained while filtering noises. Thus, during the data smoothing process, the number of waves of smoothed data is equal to that of raw data.
Consequently, Equation (1) is used in this study for computing the resultant acceleration force of the three axes (Acc value ), and the SG filter was selected for smoothing data: In Figure 2, the vertical axis presents acceleration values, the horizontal axis presents the time axis, and the red line denotes the result of smoothed data. Although the shapes of smoothed data do not vary to a great extent, some incorrect peaks have to be filtered using time setting and the wave crest threshold (green line). The wave crest threshold is the average of the total acceleration, 9.8528 m/s 2 . Moreover, the points at which every complete waves and the threshold value firstly intersect are viewed as the timing when feet are overlapped during walking and as the time points of estimating directions. smoothing pace detection data [16]. The result revealed that the SG filter is more accurate than FFT. Moreover, as the pace increased, the rate could be reduced to 1.1% [16]. The SG filter was proposed in 1964 [17] and has been widely used for smoothing data and filtering noise. The advantage of this filter is that the shape of data and the width of each wave are retained while filtering noises. Thus, during the data smoothing process, the number of waves of smoothed data is equal to that of raw data. Consequently, Equation (1) is used in this study for computing the resultant acceleration force of the three axes ( ), and the SG filter was selected for smoothing data: In Figure 2, the vertical axis presents acceleration values, the horizontal axis presents the time axis, and the red line denotes the result of smoothed data. Although the shapes of smoothed data do not vary to a great extent, some incorrect peaks have to be filtered using time setting and the wave crest threshold (green line). The wave crest threshold is the average of the total acceleration, 9.8528 m/s . Moreover, the points at which every complete waves and the threshold value firstly intersect are viewed as the timing when feet are overlapped during walking and as the time points of estimating directions. Signals before and after smoothing using the SG filter and the threshold (blue: raw data, red: after smoothing, green: threshold).

Heading Direction Calculation
Heading direction calculation is very important then high-density data are required to compute rotation angles at every moment. Data are obtained in terms of the angular velocity of the axis (as shown in Figures 3 and 4). The angle was the first-order integral of the angular velocity, and the concurrent angle changes were identified through the integration of the sampling time and angular velocity data (Equation (2)) [18]. Therefore, the obtained data have to be converted into the corresponding angle format while calculating the rotation of the z axis for calculating follow-up coordinates.

=
(2) Figure 2. Signals before and after smoothing using the SG filter and the threshold (blue: raw data, red: after smoothing, green: threshold).

Heading Direction Calculation
Heading direction calculation is very important then high-density data are required to compute rotation angles at every moment. Data are obtained in terms of the angular velocity of the axis (as shown in Figures 3 and 4). The angle was the first-order integral of the angular velocity, and the concurrent angle changes were identified through the integration of the sampling time and angular velocity data (Equation (2)) [18]. Therefore, the obtained data have to be converted into the corresponding angle format while calculating the rotation of the z axis for calculating follow-up coordinates.

Step Length
The estimation of the step length is often based on the length of the leg and the walking frequency [19]. However, considering the reality, the user does not know his or her leg length or walking frequency. Therefore, this study designs a function "Step Count" key in the program after walking a known distance, the program will record the current time and acceleration value, in the follow-up processing to determine the number of steps that users walk during this period, using Equation (3) to initially calculate the user's step length, as the basis for subsequent positioning calculation:

Pedestrian Dead Reckoning
PDR is a relative positioning technology that estimates the positions of users through moving distances and direction observations that are conducted from the initial positions of users by using inertial sensors ( Figure 5).

Step Length
The estimation of the step length is often based on the length of the leg and the walking frequency [19]. However, considering the reality, the user does not know his or her leg length or walking frequency. Therefore, this study designs a function "Step Count" key in the program after walking a known distance, the program will record the current time and acceleration value, in the follow-up processing to determine the number of steps that users walk during this period, using Equation (3) to initially calculate the user's step length, as the basis for subsequent positioning calculation:

Pedestrian Dead Reckoning
PDR is a relative positioning technology that estimates the positions of users through moving distances and direction observations that are conducted from the initial positions of users by using inertial sensors ( Figure 5).

Step Length
The estimation of the step length is often based on the length of the leg and the walking frequency [19]. However, considering the reality, the user does not know his or her leg length or walking frequency. Therefore, this study designs a function "Step Count" key in the program after walking a known distance, the program will record the current time and acceleration value, in the follow-up processing to determine the number of steps that users walk during this period, using Equation (3) to initially calculate the user's step length, as the basis for subsequent positioning calculation: Step Length = Distance Step (3)

Pedestrian Dead Reckoning
PDR is a relative positioning technology that estimates the positions of users through moving distances and direction observations that are conducted from the initial positions of users by using inertial sensors ( Figure 5).

Step Length
The estimation of the step length is often based on the length of the leg and the walking frequency [19]. However, considering the reality, the user does not know his or her leg length or walking frequency. Therefore, this study designs a function "Step Count" key in the program after walking a known distance, the program will record the current time and acceleration value, in the follow-up processing to determine the number of steps that users walk during this period, using Equation (3) to initially calculate the user's step length, as the basis for subsequent positioning calculation:

Pedestrian Dead Reckoning
PDR is a relative positioning technology that estimates the positions of users through moving distances and direction observations that are conducted from the initial positions of users by using inertial sensors ( Figure 5).  PDR can be expressed as follows: where (X t , Y t ) and (X t−1 , Y t−1 ) represent coordinates at time t and (t − 1), respectively. Here,ŝ [t−1,t] represents the moving distance from (t − 1) to t, which was defined as the length of a user's step in this study. Moreover, Ψ [t−1, t] indicates a user's moving direction at (t − 1) which was defined as user's heading direction in this study.

Magnetic Field Intensity Values and Fingerprint Recognition Elements
A magnetic signal has an obvious disadvantage that less number of fingerprint recognition elements are available for use. When the relationship between the coordinate system of the acceleration sensor and international terrestrial reference system (ITRS) is uncertain, the directions of gravity can only be detected using an acceleration sensor. However, the number of the fingerprint recognition elements of the sensor decrease to two-gravitational direction and horizontal direction. In Figure 6, blue arrows represent the coordinates of a mobile sensor, the orange arrows represent the coordinates of the ITRS, M denotes the magnetic direction, and m represents the magnetic component of the reverse direction of acceleration.
where ( , ) and ( , ) represent coordinates at time t and (t − 1), respectively. Here, ̂ , represents the moving distance from (t − 1) to t, which was defined as the length of a user's step in this study. Moreover, , indicates a user's moving direction at (t − 1) which was defined as user's heading direction in this study.

Magnetic Field Intensity Values and Fingerprint Recognition Elements
A magnetic signal has an obvious disadvantage that less number of fingerprint recognition elements are available for use. When the relationship between the coordinate system of the acceleration sensor and international terrestrial reference system (ITRS) is uncertain, the directions of gravity can only be detected using an acceleration sensor. However, the number of the fingerprint recognition elements of the sensor decrease to two-gravitational direction and horizontal direction. In Figure 6, blue arrows represent the coordinates of a mobile sensor, the orange arrows represent the coordinates of the ITRS, M denotes the magnetic direction, and m represents the magnetic component of the reverse direction of acceleration. Though the relationships between sensor coordinates system, ITRS, and the true north are unknown, the components of XY plane are the same, despite the true north. This study employs the INS signal and magnetic field intensity values to calculate the angle ( ) between the directions of the magnetic field and gravity through Equation (5) and to determine magnetic components in the direction of gravity and the horizon [20]:

Magnetic Field Positioning
The inspiration for magnetic positioning was attained from the fact that animals rely on the magnetic field of the Earth to locate their destination. Moreover, an indoor environment has steel structures that provide a unique spatially varying environmental magnetic field that is used for positioning. Animals use the magnetic field of the Earth in a similar manner, but the spatial scale is smaller [21]. In positioning and navigation applications, the magnetic field is used to determine the azimuth angle or heading direction [22]. However, a magnetic field anomaly exists in indoor M m Though the relationships between sensor coordinates system, ITRS, and the true north are unknown, the components of XY plane are the same, despite the true north. This study employs the INS signal and magnetic field intensity values to calculate the angle (θ) between the directions of the magnetic field and gravity through Equation (5) and to determine magnetic components in the direction of gravity and the horizon [20]:

Magnetic Field Positioning
The inspiration for magnetic positioning was attained from the fact that animals rely on the magnetic field of the Earth to locate their destination. Moreover, an indoor environment has steel structures that provide a unique spatially varying environmental magnetic field that is used for positioning. Animals use the magnetic field of the Earth in a similar manner, but the spatial scale is smaller [21]. In positioning and navigation applications, the magnetic field is used to determine the azimuth angle or heading direction [22]. However, a magnetic field anomaly exists in indoor environments. Thus, determining the accurate heading direction is difficult. Fingerprint recognition methods can use these magnetic field anomalies constructively [20]. In fact, the more obvious the abnormality is, the more unique is the magnetic "fingerprint," the more features are attained in the fingerprint, and the better is the positioning result. Gozick et al. collected 2000 data samples by using mobile phones with built-in magnetometers, identified some landmarks, and created a magnetic map of multiple floors in a building [22].

Particle Filter
Issues, such as the possibility of having similar magnetic values in places that are far apart, how to determine the current location of a user, and how to set the search range of fingerprint identification, should be discussed. Le Grand and Thrun directly used information collected using a mobile device for obtaining the particle state at each time breakpoint (t) and for determining the current state of a user by assigning appropriate weights to parameters, such as velocity v, angular velocity ω, location (x, y), and direction θ (Equation (6)) [23]: Xie et al. (2015) used a mobile device to collect information for determining the particle state. In their study, the velocity v and angular velocity ω data were eliminated, and instead, step l data were used as the basis for calculating the next coordinate by using Equation (7) to cause the particle to enter the next time breakpoint state. The step length that best conforms to the user's current state can be determined by adding the Gaussian distribution noise (G θ and G l ), increasing the particle search range, assigning appropriate weight through collected magnetic values, and by finally weighting the step state to its expectations [24].
In the study conducted by Xie et al. (2015), weight is computed by comparing the magnetic value of each particle obtained through observation and the value in the magnetic field database for calculating the covariance matrix. Finally, Equation (8) is used to assign a different weight to each particle, where w is the weight, z is the observation measurement, s is a certain state in the magnetic field database, and n is the order of z. Here, V represents the covariance matrix obtained after comparing observed magnetic value and the value in the database for each particle [24]: The particle filter method was used to avoid any difference between values obtained during the establishment phase of the fingerprint map database and positioning stages. Moreover, fingerprint differences were used to assign appropriate weights to each particle for obtaining coordinates and orientation that best match the user's state. Information required at the beginning of the positioning process includes the initial position, orientation, and step length. The step length estimation is often based on users' leg lengths and walking frequencies. However, in a practical scenario, users usually do not know their leg length or walking frequency. Thus, the step length of users can be estimated by calculating the number of steps taken between two points. In this study, a function was designed in the programme to allow a user to walk a particular distance. Then, in follow-up processing steps, the number of steps in the route and the user's step length were calculated. Weight is a crucial parameter in the particle filter method. Equation (8) is proposed by Xie et al. 2015 [24], when it used in this study's testing area encountering a significant turn will not be able to carry out. After examination found that is the weighting problem. It will overweight the position near the wall then cannot make the turn. Therefore, this study modified the weighting model and named the modified particle filter. The modified particle filter weighting model is shown in Equation (9): In the weight distribution conducted using Equation (9), z t and z t+1 represent the magnetic fingerprint values at t and t + 1 collected at testing area, respectively, and obv s t i and obv s t+1 i denote the t and t + 1 coordinates of magnetic fingerprint values in the magnetic field fingerprint map database. This weighting model is the absolute value of the inverse value of the difference between the actual magnetic fingerprint observed t and t + 1 time positions and the difference in the magnetic fingerprint database.
During the particle filter calculation, each step state may be updated due to the orientation and step accumulation error or the relationship with the wall; thus, some particles will be estimated to be in the magnetic fingerprint map database where there is no data, such as those of a wall, room, or elevator. Therefore, a resampling mechanism should be incorporated in the algorithm. Particles that are not in the walking range of a user or appear at an impossible location should be removed, and remaining particles should be resampled. Resampled particles should not be excessively concentrated at a certain position. Therefore, sampling should be conducted at the weighted average position of remaining particles by using the normal distribution method so that the estimated trajectory can be reversed to the normal trajectory. Finally, all particles are calculated using the weighted average method (Equation (10)), including x coordinates, y coordinates, azimuth angle, and step size [20]:

Study Area and Data Collection
This study used a combination of the particle filter method and magnetic field maps to assist PDR for indoor positioning. Thus, it is necessary to collect indoor magnetic field fingerprint data for creating an environmental magnetic field fingerprint map database. Then, the modified particle filter method that is proposed in this study was used. In this method, the magnetic field fingerprint database and PDR were used together for indoor navigation. Results collected in the experimental area and magnetic field fingerprint database are introduced in this section.

Experimental Area
The experimental area of this study was the sixth floor of the general building of the National ChengChi University, Taipei, Taiwan (Figure 7). The testing area size is 33 m × 85 m.

Magnetic Field Fingerprint Map Results
The application of a programming interface that was developed in Android Studio is presented in Figure 8. The interface also determines the number of steps and calculates the step length. The raw data of the magnetic field fingerprint values were collected at a spacing of 40 cm apart along the corridor by a Samsung S8 smartphone in this study. It obeyed Potortì et al.'s proposed standard procedure [25]. The interpolation method was used to create three magnetic fingerprint maps, which in the gravitational direction, horizontal direction, and resultant direction of the magnetic field. The indoor magnetic field data of all corridors on the sixth floor of the general building were collected. Moreover, the interpolation method was used to create three magnetic maps of the magnetic fingerprint map (Figure 9).

Magnetic Field Fingerprint Map Results
The application of a programming interface that was developed in Android Studio is presented in Figure 8. The interface also determines the number of steps and calculates the step length. The raw data of the magnetic field fingerprint values were collected at a spacing of 40 cm apart along the corridor by a Samsung S8 smartphone in this study. It obeyed Potortì et al.'s proposed standard procedure [25]. The interpolation method was used to create three magnetic fingerprint maps, which in the gravitational direction, horizontal direction, and resultant direction of the magnetic field. The indoor magnetic field data of all corridors on the sixth floor of the general building were collected. Moreover, the interpolation method was used to create three magnetic maps of the magnetic fingerprint map (Figure 9).

Magnetic Field Fingerprint Map Results
The application of a programming interface that was developed in Android Studio is presented in Figure 8. The interface also determines the number of steps and calculates the step length. The raw data of the magnetic field fingerprint values were collected at a spacing of 40 cm apart along the corridor by a Samsung S8 smartphone in this study. It obeyed Potortì et al.'s proposed standard procedure [25]. The interpolation method was used to create three magnetic fingerprint maps, which in the gravitational direction, horizontal direction, and resultant direction of the magnetic field. The indoor magnetic field data of all corridors on the sixth floor of the general building were collected. Moreover, the interpolation method was used to create three magnetic maps of the magnetic fingerprint map (Figure 9).

Magnetic Field Fingerprint Map Results
The application of a programming interface that was developed in Android Studio is presented in Figure 8. The interface also determines the number of steps and calculates the step length. The raw data of the magnetic field fingerprint values were collected at a spacing of 40 cm apart along the corridor by a Samsung S8 smartphone in this study. It obeyed Potortì et al.'s proposed standard procedure [25]. The interpolation method was used to create three magnetic fingerprint maps, which in the gravitational direction, horizontal direction, and resultant direction of the magnetic field. The indoor magnetic field data of all corridors on the sixth floor of the general building were collected. Moreover, the interpolation method was used to create three magnetic maps of the magnetic fingerprint map (Figure 9).

Positioning Results
In the positioning process, the particle filter method was combined with the PDR algorithm to determine the position and value of the magnetic fingerprint. Then, the result was matched with the experimental area magnetic fingerprint database to find the best position ( Figure 10).
In this section, we compared and analysed the results of different weighting methods of the particle filter-Xie's method [24] and the modified weighting method proposed in this study. The testing route is displayed in Figure 11. The route has two different angles (90 • and 45 • ) and left and right turns. A route with a width of less than 2 m is a challenging route because an accurate positioning accuracy is required to complete the entire route. In this study, some checkpoints (yellow circles) were set up on the way not only to confirm the closure difference at endpoints (green circles) but also to check if there are excessive offsets in the path.

Positioning Results
In the positioning process, the particle filter method was combined with the PDR algorithm to determine the position and value of the magnetic fingerprint. Then, the result was matched with the experimental area magnetic fingerprint database to find the best position ( Figure 10).
In this section, we compared and analysed the results of different weighting methods of the particle filter-Xie's method [24] and the modified weighting method proposed in this study. The testing route is displayed in Figure 11. The route has two different angles (90° and 45°) and left and right turns. A route with a width of less than 2 m is a challenging route because an accurate positioning accuracy is required to complete the entire route. In this study, some checkpoints (yellow circles) were set up on the way not only to confirm the closure difference at endpoints (green circles) but also to check if there are excessive offsets in the path.

Comparison of Different Methods
Ten participants followed the designed route in a sequence. Then, Xie's method and the proposed modified particle filter method were used to compute the locations of participants. The computation results are presented in Tables 3 and 4.

Comparison of Different Methods
Ten participants followed the designed route in a sequence. Then, Xie's method and the proposed modified particle filter method were used to compute the locations of participants. The computation results are presented in Tables 3 and 4.  Tables 2 and 3 reveal that the mean closure error of Xie's method is 1.305 m and of the modified particle filter method is 0.871 m. The cumulative distribution functions of the two methods are illustrated in the same graph that is shown in Figure 12. Under a closure error of 1 m, location errors obtained using the modified particle filter method and Xie's method are 85% and 75%, respectively. Tables 2 and 3 reveal that the mean closure error of Xie's method is 1.305 m and of the modified particle filter method is 0.871 m. The cumulative distribution functions of the two methods are illustrated in the same graph that is shown in Figure 12. Under a closure error of 1 m, location errors obtained using the modified particle filter method and Xie's method are 85% and 75%, respectively.

Results of the Modified Particle Filter Method
Based on the comparison results of Xie's method and the modified particle filter method, an experiment was conducted in which 15 participants, including male and female participants, walked back and forth along the design route of the experimental area. All data were processed using the modified particle filter method, and results are shown in Table 5 and Figures 13 and 14. The results of the male participants were poor. Moreover, the average positioning error for male participants was approximately 1 m and that for female participants was in the range of 0.6 to 0.7 m.

Results of the Modified Particle Filter Method
Based on the comparison results of Xie's method and the modified particle filter method, an experiment was conducted in which 15 participants, including male and female participants, walked back and forth along the design route of the experimental area. All data were processed using the modified particle filter method, and results are shown in Table 5 and Figures 13 and 14. The results of the male participants were poor. Moreover, the average positioning error for male participants was approximately 1 m and that for female participants was in the range of 0.6 to 0.7 m.

Conclusions
The results of this study reveal that the indoor positioning accuracy is in the range of 0.6 to 0.8 m when the proposed method is used. As shown in Table 6, the proposed method is better than other related studies. In this study, the modified particle filter method and indoor magnetic field map were combined to optimise the PDR algorithm. This combination not only reduces the construction cost but also improves the positioning efficiency and accuracy.

Conclusions
The results of this study reveal that the indoor positioning accuracy is in the range of 0.6 to 0.8 m when the proposed method is used. As shown in Table 6, the proposed method is better than other related studies. In this study, the modified particle filter method and indoor magnetic field map were combined to optimise the PDR algorithm. This combination not only reduces the construction cost but also improves the positioning efficiency and accuracy.

Conclusions
The results of this study reveal that the indoor positioning accuracy is in the range of 0.6 to 0.8 m when the proposed method is used. As shown in Table 6, the proposed method is better than other related studies. In this study, the modified particle filter method and indoor magnetic field map were combined to optimise the PDR algorithm. This combination not only reduces the construction cost but also improves the positioning efficiency and accuracy.