# S-PDR: SBAUPT-Based Pedestrian Dead Reckoning Algorithm for Free-Moving Handheld Devices
## 4 Experimental Setup  
Testing was carried out using a Samsung S8 smartphone, while reference inertial measurements and solution was provided by the Xsens MTi G-710 which is considered to be a high-grade MEMS sensor with better performance than the MEMS sensor equipped in a smartphone. The Xsens Mti G-710 is reported to have a 10\({}^{\circ}\)/h gyro bias stability, roll and pitch accuracy of 0.2\({}^{\circ}\) in static mode and 0.3\({}^{\circ}\) in dynamic mode, and azimuth of accuracy 0.8\({}^{\circ}\) when no magnetic distortion exist [100]. As a reference, the Xsens has an on-board processing option that provides a full navigation solution. The on-board processing provides full positional and attitude estimates that were used to recreate a PDR-based solution in comparison to the solution from S-PDR.  
The setup and device reference frames are presented in Figure 18. Magnetometer calibration to compensate for the cross magnetic field distortion of both devices was applied for each of the tests described below, and initial alignment between the devices was carried out to accurately project the solution and measurements of both devices to the same frame. First, each device was calibrated using the six-position static test for accelerometer calibration and using a precision rate table for gyroscope calibration. Once the smartphone sensors and Xsens sensor have been calibrated separately, the devices were attached as shown in Figure 18. For each of the tests described below, a 2-min spherical data window is collected before the test starts and is used for the magnetometer ellipsoid fitting calibration to compensate for the magnetic interference between the two devices. To find the misalignment between the two devices, static data for 20 min were collected from the devices while attached. The data were compensated for biases and scale factors derived from the calibration procedures and used to find the transformation matrix from each of the two devices to LLF. Note that the static data is collected every time the devices are detached and reattached to compensate for any alignment changes. Finally, the misalignment matrix between the two devices was derived by multiplying the two transformation matrices as shown in Equation (16). Where \(R_{LLF}^{Xsens}\) is the alignment matrix from LLF to the Xsens frame, and \(R_{LLF}^{\text{S8}}\) is the alignment matrix from LLF to the Samsung S8 phone frame, and \(R_{XSense}^{\text{S8}}\) is the resulting alignment matrix between the two devices.  
\[R_{XSense}^{\text{S8}}=R_{LLF}^{\text{S8}}*\left(R_{LLF}^{Xsens}\right)^{-1} \tag{16}\]  
Two tests were designed with preplanned trajectories to evaluate the performance of S-PDR under different conditions. The tests were designed to reflect the cases where GNSS is degraded or even denied such as indoor, or near buildings with high reflective surface structures. Sample set 1 takes place indoor on the second floor of Engineering G building (ENG) of University of Calgary, with the purpose of testing the effects of magnetic interference. The test trajectory is shown in Figure 19. Sample set 2 takes place outdoors beside a steel building structure between CCIT, Engineering D (END), and Engineering E (ENE) buildings on the University of Calgary campus, where the purpose is to test the feasibility of using S-PDR as an alternative to GNSS when the satellite signals will have a high error due to multipath and refraction while being used in a non-stable magnetic field. The trajectory is shown in Figure 20.