RTK with the Assistance of an IMU-Based Pedestrian Navigation Algorithm for Smartphones

Real-time kinematic (RTK) technique is widely used in modern society because of its high accuracy and real-time positioning. The appearance of Android P and the application of BCM47755 chipset make it possible to use single-frequency RTK and dual-frequency RTK on smartphones. The Xiaomi Mi 8 is the first dual-frequency Global Navigation Satellite System (GNSS) smartphone equipped with BCM47755 chipset. However, the performance of RTK in urban areas is much poorer compared with its performance under the open sky because the satellite signals can be blocked by the buildings and trees. RTK can’t provide the positioning results in some specific areas such as the urban canyons and the crossings under an overpass. This paper combines RTK with an IMU-based pedestrian navigation algorithm. We utilize attitude and heading reference system (AHRS) algorithm and zero velocity update (ZUPT) algorithm based on micro electro mechanical systems (MEMS) inertial measurement unit (IMU) in smartphones to assist RTK for the sake of improving positioning performance in urban areas. Some tests are carried out to verify the performance of RTK on the Xiaomi Mi 8 and we respectively assess the performances of RTK with and without the assistance of an IMU-based pedestrian navigation algorithm in urban areas. Results on actual tests show RTK with the assistance of an IMU-based pedestrian navigation algorithm is more robust and adaptable to complex environments than that without it.


Introduction
Over the past two decades, GNSS has been evolving rapidly [1]. The U.S. government has promoted the Global Positioning System (GPS) modernization program, adding the second civil signal on L2 frequency (L2C) and the third civilian signal on L5 frequency (L5). As of 24 April 2019, there were a total of 31 operational satellites in the GPS constellation, not including the decommissioned, on-orbit spares [2]. Europe is developing the Galileo system to provide global services. Up to 12 February 2019, there were a total of 22 satellites in operation [3]. Galileo navigation signals are transmitted in the following four frequency bands: E1, E5a, E5b, and E6 bands. The frequency of E1 is equal to that of L1 of GPS (1575.42 MHz), while the frequency of E5a is equal to that of L5 of GPS (1176.45 MHz) [4].
RTK was first proposed as a differential positioning technology that processes both the pseudorange and carrier phase measurements of GPS to provide cm-level accuracy in real time [5]. RTK involves at least one stationary receiver and at least one movable receiver. The stationary receiver, which is called the base station, plays the role of the reference to calculate the position of the movable receiver, which is called the rover [6]. Solving the ambiguity of the carrier phase is one of the most important procedures of RTK. The revolution of GNSS improves the performance of RTK thanks to the increasing number of visible satellites and civilian signals. Utilizing other constellations in addition to GPS improves spatial distribution and reduces problems caused by obstructions, which improves the accuracy and availability of RTK, as shown for GPS/Galileo [7], Samsung S8 utilizing single-frequency measurements [26]. The carrier phase measured by the Xiaomi Mi 8 could also be used for precise point positioning (PPP) [27].
Users of smartphones are often pedestrians in urban areas. They are more likely to walk through an urban canyon, which is a narrow street with very tall buildings on both sides. They also often walk under overpasses. These overpasses and obscurations can cause the receiver to lose track of the signals, therefore leading to the loss of the carrier phase for many seconds [28]. During that time, RTK cannot provide valid positioning results. The outage of signals hinders all kinds of GNSS positioning methodologies. One common way to improve this is to integrate GNSS with the inertial navigation system (INS). INS is based on an IMU, which consists of gyroscopes and accelerometers, enabling computing velocity, attitude, and position. A hybrid IMU containing magnetometers can also be called a magnetic, angular rate, and gravity (MARG) sensor, which gives more accurate orientation [29]. Assisting GNSS with INS can reduce acquisition time and improve immunity to noise and interference [30]. When it comes to RTK, ambiguity resolution and cycle slip detection benefit from INS aiding [31,32]. Single-frequency multi-constellation RTK tightly coupled with INS performs better than dual-frequency RTK without INS in urban areas [33]. We can couple RTK with INS to assist ambiguity resolution and resist noise, but no position output can be gained frequently in GNSS-challenged environments and GNSS-denied environments. The positioning results are provided by the INS during the GNSS outage [34]. However, INS based on an MEMS-IMU that suffers from large drift cannot provide satisfactory positioning results for a long period of time [35].
Navigation algorithms based on inertial MEMS sensors are divided into two types in general: pedestrian dead reckoning (PDR) algorithms and INS-based algorithms [36]. PDR estimates the position by counting steps and estimating stride length and heading. Many algorithms, such as peak detection and zero-crossing counting, can be used to detect and count steps [37]. After successfully detecting a new step, PDR uses a kind of step length model to estimate the moving distance of a pedestrian [38]. AHRS algorithms can be used to improve the accuracy of estimating the heading angle, which improves the PDR's performance [39,40]. INS uses strapdown mechanical equations to estimate position, velocity, and attitude. INS-based algorithms utilize some pseudo-measurements to correct the estimate of position, velocity, biases of sensors, and attitude [41]. For example, a foot-mounted INS has explicit stance phases. The velocity should be zero during the stance phases so the ZUPT algorithm can be used to utilize the zero-velocity to reduce the long-term drifts of IMU [42]. PDR algorithms and INS-based algorithms can be coupled for a more accurate estimate of heading and position [36].
In this paper, we collect observation measurements through a Xiaomi Mi 8. We compare the performance of single-frequency RTK with that of dual-frequency RTK based on the Xiaomi Mi 8 in both static mode and dynamic mode. We also compare the performance of RTK based on the Xiaomi Mi 8 with that based on a dual-frequency NovAtel receiver equipped with an OEM617-CDS-R0G-550 card. Here, we utilize RTKLIB [43] to take the measurements. We also provide a method to assist RTK with an IMU-based pedestrian navigation algorithm for smartphones. Considering GNSS outage and MEMS-IMU integrated into our smartphone, we adopt the Madgwick algorithm, which is one kind of AHRS algorithm to provide the initial attitude of our smartphone and utilize the ZUPT algorithm to aid INS to provide positioning results during GNSS outage.
The rest of the paper is organized as follows: In Section 2, the RTK algorithm, the Madgwick algorithm, the ZUPT algorithm, and the procedure of collecting data are introduced in detail. The performance comparison among RTK using the Xiaomi Mi 8, using the NovAtel receiver, and RTK with the assistance of an IMU-based pedestrian navigation algorithm are described in Section 3. Conclusions and future work are summarized in Section 4.

Implementation of RTK
We used RTKLIB to analyze the single-frequency and dual-frequency RTK performance based on the Xiaomi Mi 8. In this section, we introduce the theory of RTKLIB [43,44].

EKF Formulation
RTKLIB is based on the extended Kalman filter (EKF). The EKF is a nonlinear version of the Kalman filter (KF), which can help solve nonlinear state estimation. A discrete nonlinear system at epoch t k can be described with two formulas: Here,x k and y k are the estimated state vector and measurement vector at epoch time t k , respectively. w k and v k are the process and observation noises, which are both assumed to be multivariate Gaussian noises with zero mean and covariance Q k and R k , respectively. u k is defined as the control vector. We can utilize the process function f to compute the predicted state at epoch t k−1 from the state at epoch t k and utilize measurement function h to compute the predicted measurement at epoch t k from the predicted state at epoch t k . We define two Jacobian matrices F k k−1 and H k as the matrix of partial derivatives of function f and function h, respectively: The procedure of EKF can be divided into two parts at each epoch: predicting and updating. Predicting aims to provide predicted state estimatex − k and covariance estimate P − k as follows: Updating aims to provide updated state estimatex k and updated covariance estimate P k as follows: 2.1.2. Theory of RTK RTK is a differential positioning methodology that utilizes the double-differencing pseudorange and carrier phase. We present the principle of triple-frequency RTK for the sake of generality. We can use single-frequency RTK or dual-frequency RTK in practical applications. We define state vector x and measurement vector y as follows: where r r and v r are the position and velocity of the rover, respectively; B i is the L i single-differencing carrier-phase biases. Φ i and P i are the double-differencing phase-range and pseudorange measurements on the L i band, respectively. When it comes to the predicting procedure, we can define F k k−1 as Equation (12), considering basic kinematics theory and the consistency of the carrier biases if there is no loss of lock: When it comes to the updating procedure, we can define the measurement function h(x) as Equation (13), assuming there are m satellites in view: where: In the two equations, λ i is the wavelength of the L i bands. ρ 1k rb is the double-differencing pseudorange of the 1st satellite and the kth satellite.
We define D as the single-differencing matrix: We utilize e k r to stand for the LOS vector from the receiver antenna to the kth satellite in ECEF. We can define E as: Finally, we can write H k as:

Introduction of the Madgwick Algorithm
The Madgwick algorithm can help provide attitude estimation with both IMU and MARG sensors. This algorithm introduced by Madgwick at the 2011 IEEE International Conference on Rehabilitation Robotics is one kind of AHRS algorithm [29,45]. The Madgwick algorithm employs a quaternion to describe the attitude.

Introduction of the Quaternion
We used a four-dimensional complex number called the quaternion to stand for the attitude of a rigid body relative to a coordinate frame in the three-dimensional space. For example, A Bq reflects the attitude of frame B relative to frame A ( Figure 1). We can compute the quaternion with the angle θ between frame B and frame A: Here, r stands for the orientation of the angle. We use A Bq * to denote the conjugate of A Bq , which represents the attitude of frame A relative to frame B. We can define A Bq * as: We can define S ω as a quaternion that is formed with the components of the ω b nb , assuming ω b nb is the angular rate: Then, we can write the quaternion differential equation as: Here, S ω t is the angular rate measured at time t; S Eq is the estimate of the attitude quaternion of the Earth frame relative to the sensor frame at time t − 1; and S Eqω,t is the quaternion derivative, which reflects the change rate of the quaternion. ⊗ is defined to denote quaternion multiplication. Then, we can compute the estimate of the attitude quaternion at time t, assuming ∆t is the sample interval: This quaternion is calculated with the measurements of gyroscopes.

Theory of the Madgwick Algorithm
We can calculate the quaternion with the measurements of gyroscopes, as mentioned above. We can also calculate the quaternion with the measurements of the accelerometers and magnetometers. Suppose we had a predefined reference vector Ed in the field of the Earth frame. We can compute the reflect of the vector in the sensor frame using the quaternion: We can also get the value of vector Sŝ in the measured field of the sensor frame. We can define an objective function to represent the difference between Sd and Sŝ as follows: The most accurate quaternion should go with the minimum of the objective function. Therefore, this is an optimization problem that can be solved using gradient descent, as Equation (28) shows: In Equation (28) µ, stands for the variable step-size. The objective function is formed with two sub-functions solving the measurements of accelerometers and magnetometers, respectively. When it comes to the measurements of accelerometers, we substitute Eĝ and normalized accelerometers measurements Eâ for Sd and Sŝ , respectively, as shown in Equations (29) and (30). Then, we can get the first sub-function, as shown in Equation (31).
When it comes to the measurements of magnetometers, we substitute the Earth's magnetic field Eb and normalized magnetometer measurements Eâ for Sd and Sŝ , respectively, as shown in Equations (32) and (33). Then, we can get the second sub-function, as shown in Equation (34).
Then, we can form the objective function with two sub-functions as follows: Then, we can calculate the quaternion using the gradient descent algorithm as Equation (36) shows: Here, we have two quaternions. One of them is calculated using the angular rate, while the other one is practically calculated utilizing the measurements of the accelerometers and magnetometers. The proper fusion of the two separate quaternions can be more accurate. Different weights can be applied to each quaternion to get the fusion as Equation (37) shows: Proper γ t , µ t , and some deformation can help us get Equations (38) and (39) to calculate the fused quaternion.
β in Equation (39) stands for the divergence rate of S E q ω because of the drift.

Introduction of ZUPT Aiding INS
ZUPT is widely used in INS-based pedestrian navigation. ZUPT is based on a foot-mounted IMU, which means we must fix the IMU on our foot. The ZUPT aiding INS can be divided into two procedures: zero-velocity detection and updating state with virtual measurements [46,47].

Zero-Velocity Detection
The walking process of pedestrians can be modeled as a repeating sequence of heel strike, stance, push off, and swing. The velocity of our foot should be zero during the stance phase when the foot is bearing the weight of the whole body. The zero-velocity can be utilized as a "virtual measurement" to correct the IMU's attitude, velocity, and position if we can detect the occurrence of the zero-velocity. While there are many approaches to help detect zero-velocity, we chose the generalized likelihood ratio test (GLRT) to derive the detector [48]. The IMU is considered stationary at epoch k if Equation (40) is satisfied.
In Equation (40), f k is the mean of accelerometer measurements over the time window W k of length N samples adjacent to epoch k. σ f and σ ω reflect the error of accelerometer and gyroscope, respectively. f i and ω i are the samples at epoch i in the window.

Updating the State with Virtual Measurements
We used KF to predict and update states. The predicting can be described as Equation (41), considering we chose the position, velocity, and the attitude quaternion as state variables.
In Equation (41), x k is the position, v k is the velocity, and q k is the attitude quaternion. q −1 k is the conjugate of q k . f k and ω k are measurements in three dimensions. Ω(·) is the quaternion updating matrix, which is relative to the angular rate and angle. We can obtain the virtual residual Z k when the zero-velocity occurs as Equation (42) shows.
Then, we can calculate the Kalman filter feedback assuming K k is the Kalman gain to correct the states as Equation (43) shows.

RTK with the Assistance of an IMU-Based Pedestrian Navigation Algorithm
We walked through an urban canyon. RTK could not provide reliable and continuous positioning results in the urban canyon because of GNSS outage. The assistance of an IMU-based pedestrian navigation algorithm could be helpful. We tied the Xiaomi Mi 8 to our foot, and the Xiaomi Mi 8 collected the measurements of the accelerometer, the gyroscopes, and the magnetometers. By applying the Madgwick algorithm, we could estimate and record the Xiaomi Mi 8's attitude with these measurements. We counted the interval between two positioning results output by RTK. If the intervals between a positioning result and its last output and also its next output both exceeded the threshold, this positioning result would be ignored. The last valid positioning result before the GNSS outage was regarded as the initial position of the ZUPT aiding INS. We synchronized the outputs of RTK and the Madgwick algorithm so that we could provide the initial attitude, especially the yaw, for the ZUPT aiding INS. The outputs of the ZUPT aiding INS were regarded as positioning results during GNSS outage in the urban canyon. Once we passed through the city canyon, the ZUPT aiding INS stopped outputting positioning results, and RTK continued providing positioning results.

Data Collection
We used the Xiaomi Mi 8 to collect the GNSS raw measurements and the measurements of IMU.

GNSS Raw Measurements' Collection
Here, we used an app called Geo++ RINEX Logger, which could produce a file of measurements in RINEX format [49]. There are other similar apps such as RINEX ON [50]. RINEX ON has the advantage of providing not only measurements, but also ephemeris. However, not all kinds of smartphones provide the users with ephemeris. Google also released the GnssLogger app to log the data related to GNSS measurements [51]. GnssLogger did not directly provide pseudorange or carrier phase. Users could only calculate the pseudorange and carrier phase with the data provided by GnssLogger.
Many other smartphones are equipped with BCM47755 and Android P. We can refer to the Android Developers Documentation to choose one kind of phone to develop some applications or test the RTK and PPP performance [52].
Our experiments were based on the Geo++ RINEX Logger and the Xiaomi Mi 8. The Xiaomi Mi 8 equipped with the BCM47755 could utilize dual-frequency signals, as Figure 2 shows. All the Galileo satellites can broadcast E1 and E5a signals. In contrast, only 12 GPS satellites whose Block types are IIFcan broadcast the L5 signals [53]. A website called Trimble GNSS Planning can be helpful to identify a period when there are the most visible satellites that broadcast L1 (E1) and L5 (E5a) signals in a day [54]. We chose an M300 receiver made by ComNav Technology Ltd. Shanghai, China as the base station. This receiver can provide the measurements of all frequencies and all constellations. We also chose a dual-frequency NovAtel receiver, which supports L1 and L2 signals, as another rover. The position results provided by the dual-frequency RTK using the M300 receiver and the NovAtel receiver were regarded as the references.

IMU Raw Measurements Collection
Here, we used an app called Sensorstream IMU+GPS to collect the measurements of accelerometers, gyroscopes, and magnetometers [55]. We tied the Xiaomi Mi 8 to our foot, as Figure 3 shows. Sensorstream IMU+GPS can record the measurements of the sensors in smartphones and produce the measurement file in CSV format. Each measurement had its corresponding timestamp. The timestamp is the span from the booting to the happening of the sensor event. We wrote an app to get the time since the phone was booted to help transfer the timestamp of the sensor event to the UTC. There is also a difference between GPS time and UTC. We can transfer UTC to GPS time as Equation (44) shows up to 31 May 2019.

RTK Performances in Static Mode
We tested the RTK performance in static mode on the roof of the Yifu Building of Peking University on 12 July 2019. The baseline was 15 m. We tested the single-frequency RTK and dual-frequency RTK with GPS measurements. The visible signals are shown in Figure 4a. At least two L5 signals were visible during the test. Figure 4b-d show that both single-frequency RTK and dual-frequency RTK could provide fixed solutions and cm-level precision after a few minutes in static mode. The introduction of L5 measurements reduced the convergence time and improved the fixed rate.

RTK Performances in Dynamic Mode
This section shows RTK performances in dynamic mode. We chose an M300 receiver as the base station (Figure 5a). The M300 receiver was capable of tracking all the signals of all the constellations. The M300 receiver was connected with an antenna located on the roof of our laboratory (Figure 5b). This antenna was also able to receive all the signals of all the constellations. We put the Xiaomi Mi 8 on a small handcart as the rover. We also located a receiver equipped with an OEM617-CDS-R0G-550 card close to the Xiaomi Mi 8 for comparison. This card that could track the L1/L2 signal of GPS was manufactured by NovAtel. The NovAtel receiver was connected to a mini-survey antenna GPS500, which was capable of receiving GPS L1/L2 (Figure 5c,d). The GPS500 was much more resistant to the influence of multipath and noise than the antenna in smartphones. We treated the dual-frequency RTK results provided by the NovAtel receiver as the reference. We tested the RTK performance in dynamic mode on the sports ground of Peking University on 31 May 2019. We started from the north of the sports ground and walked counterclockwise. A tall building was located to the southeast of the sports ground, which could block signals. We compared the performance between single-frequency RTK and dual-frequency RTK with the NovAtel receiver. Signals tracked by the NovAtel receiver are shown in Figure 6a,b. All the signals shown in Figure 6a,b were tracked by both the rover and base station. The receiver could track the signals of at least four satellites thanks to the high quality of GPS500, which helped to keep providing positioning results during the test. The performances of single-frequency RTK and dual-frequency RTK with the NovAtel receiver are presented in Figure 6c,d. The fixed rate of ambiguity resolution for single-frequency RTK was less than 9%, while that for dual-frequency RTK exceeded 82%. The differences between the results verified the conclusion that dual-frequency RTK was much more likely to get fixed ambiguity resolution than single-frequency RTK. We chose the dual-frequency RTK results as the reference to compare the performance of RTK in different modes based on the Xiaomi Mi 8. We divided RTK into four modes: RTK with L1 signals of GPS; RTK with L1 signals and L5 signals of GPS; RTK with L1 signals of GPS and E1 signals of Galileo; RTK with L1/L5 signals of GPS and E1/E5a signals of Galileo. Signals tracked by the Xiaomi Mi 8 are shown in Figure 7. Comparison of Figure 7 and Figure 6 explains that the Xiaomi Mi 8 had a little lower capacity of tracking GPS L1 signals than the NovAtel receiver because of the antenna with poor performance. As mentioned in the Introduction, the GPS constellation has more operational satellites than the Galileo constellation does. As a result, there are more GPS visible satellites at the same time. Figure 7 reflects that the number of Galileo satellites tracked by the Xiaomi Mi 8 was less than the number of GPS satellites tracked by the Xiaomi Mi 8. Figure 7 also reflects that the number of visible GPS satellites with both L1 and L5 signals was fewer than that of visible GPS satellites with only L1 signals. We can refer to the Trimble GNSS Planning to find the moments when there were enough visible GPS satellites that were broadcasting L5 signals and visible Galileo satellites. The performances of RTK in different modes are presented in Figures 8 and 9. Figure 8a shows the performance of RTK with only L1 measurements of GPS. The positioning results fluctuated drastically when the rover was located in the southeast of the sports ground because of the building nearby. This building blocked the signal and exacerbated the multipath effect, which could cause a big positioning error. RTKLIB ignored a satellite if the difference between its pseudorange and carrier phase exceeded the threshold, which was caused by the multipath effect and noise. If we only utilized the GPS, the number of valid satellites was likely to be less than four, which led to the absence of positioning results at some moments. As a result, Figure 8a shows that RTK with only L1 measurements did not provide positioning results in the southeast of the sports ground at some moments. Figure 8a also shows that the positioning results suffered from fluctuations and biases when the rover was located in the north of the sports ground at the beginning of the test, which reflected that RTK spent a few seconds converging to provide precise positioning results. Figure 8b shows the performance of RTK with L1 measurements and L5 measurements of GPS. The introduction of L5 measurements helped flatten the fluctuations caused by the blocking of signals and multipath effects. The positioning results given by RTK with L1 measurements and L5 measurements of GPS were also closer to the reference than those given by RTK with L1 measurements in Figure 8a, which meant more accuracy. However, the introduction of L5 signals could not increase the number of visible satellites. As a result, RTK still could not provide positioning results at some moments in the southeast of the sports ground. The introduction of L5 signals did not reduce the convergence time at the beginning, either. Figure 7 shows that there was only one valid L5 signal at the beginning of the test, which limited the advantages of dual-frequency RTK. Figure 8c shows the performance of RTK with L1 measurements of GPS and E1 measurements of Galileo. The introduction of another constellation meant more visible satellites. These additional Galileo satellites ensured the number of visible satellites when some GPS signals were blocked by the building, which helped to keep providing positioning results in the southeast of the sports ground. The introduction of Galileo also helped reduce the fluctuations and the convergence time at the beginning thanks to the improvement of the spatial distribution. Figure 8d shows the performance of RTK with L1/L5 measurements of GPS and E1/E5a measurements of Galileo. The positioning results given by RTK with L1/L5 measurements of GPS and E1/E5a measurements of Galileo were very close to the reference, as the introduction of Galileo helped increase the number of visible satellites, and dual frequency helped flatten the fluctuations and reduce the convergence time.
However, Figure 8d shows that dual frequency could not help increase the fixed rate of ambiguity resolution for RTK on the Xiaomi Mi 8 in dynamic mode. This phenomenon was caused by the poor quality of signals because of the poor performance of the antenna. The statistics of positioning error in the ECEF coordinate are shown in Table 1. Table 1 also shows that dual-frequency RTK could provide positioning results with smaller biases and fluctuations.   We tested the RTK performance in dynamic mode repeatedly to verify the advantages of dual-frequency RTK with the Xiaomi Mi 8. The results of a test on the basketball court are shown in Figure 10. The statistics of positioning errors in the ECEF coordinate are shown in Table 2.   Figure 10 and Table 2 also show that dual-frequency measurements could reduce the convergence time and positioning bias. Besides, Figure 10 shows that the fixed rate of ambiguity resolution for RTK on the Xiaomi Mi 8 in dynamic mode did not improve although the dual-frequency measurements were introduced.

The Performance of the Madgwick Algorithm
This section shows the performance of the Madgwick algorithm. We can use not only quaternion, but also Euler angles including pitch θ, roll γ, and yaw ψ to depict the attitude. Quaternion and Euler angles can be transformed into each other. Figure 11 shows the definition of the coordinate system used by the Android system [56]. The X-axis is horizontal and points to the right of the phone. The Y-axis is vertical and points to the top of the phone. The X-axis and Y-axis are in a plane parallel to the screen of the phone's surface. The Z-axis points towards the outside of the front face of the screen and is perpendicular to the plane of the X-axis and Y-axis. Yaw is defined as the angle between the magnetic north direction and the Y-axis, which reflects the rotation around the Z-axis.  We changed the Xiaomi Mi 8's attitude to test the performance of the Madgwick algorithm with a three-axis turntable. The turntable could provide an accurate attitude with an error of smaller than four seconds. We initiated the turntable, setting the pitch, roll, and yaw to zero. Then, we changed the pitch, roll, and yaw of the turntable simultaneously. We set the pitch and roll to 45 • , while we set yaw to 325 • . After that, the three Euler angles were set to zero again. Since the Xiaomi Mi 8 was fixed in the chute of the turntable, the attitude of the Xiaomi Mi 8 was strictly in line with the attitude of the turntable. We collected the measurements of sensors and estimated the Euler angles with the Madgwick algorithm. The results are shown in Figure 12. The estimated Euler angles corresponded to the change of attitude.

The Performance of the ZUPT Aiding INS
This section shows the performance of the ZUPT aiding INS. We tied the Xiaomi Mi 8 to our foot and took a walk following the pre-planned path (approximately 50 meters) in the corridor on the ninth floor of the Yifu Building of Peking University. The place where we walked is shown in Figure 13a, and the pre-planned path is shown by the red arrows in Figure 13a. We measured the length and width of the corridor and established a model of the environment with AutoCAD. The results of the ZUPT aiding INS are shown in this model in Figure 13b. It can be seen that the results could reflect our trajectory.

Performances of RTK with the Assistance of an IMU-Based Pedestrian Navigation Algorithm
This section shows the performance of RTK with the assistance of an IMU-based pedestrian navigation algorithm. We walked through a narrow path with tall teaching buildings on both sides, as Figure 14 shows. We walked following the red arrows and turned left at the green point. We turned right at the blue point with a five-meter distance between the two points. We kept going straight at other moments. Tall buildings could not only block GNSS signals, but also aggravate the multipath effect, which hindered RTK from providing positioning results, as Figure 15a shows. There were only two points between the two blue points in Figure 15a, which meant RTK could hardly provide the positioning results because of the GNSS outage. Although the RTK could provide two positioning results as the green point and the black point shown in Figure 15a, the positioning results were not precise enough. The black point was to the southwest of the green point, which was incompatible with the fact that we kept walking toward roughly north. Severe multipath effects in the urban canyon limited the accuracy of RTK. As a result, it was unreliable to provide positioning results with RTK based on the Xiaomi Mi 8 in the urban canyon. We tied the Xiaomi Mi 8 to our foot to utilize the ZUPT aiding INS to provide continuous positioning results during GNSS outage, as mentioned in the Materials and Methods. The positioning results are shown in Figure 15b. The outputs of the ZUPT aiding INS were able to fill in the position when the positioning results of the RTK were lost, as Figure 15b shows. Positioning results in Figure 15b could reflect our trajectory as there were two changes in the direction of motion. The last output of the ZUPT aiding INS was consistent with the first positioning result provided by the RTK after we passed through the urban canyon. Figures 15 and 16 show that the combination of RTK, the Madgwick algorithm, and the ZUPT aiding INS could be more robust and more reliable than RTK without the assistance of an IMU-based pedestrian navigation algorithm. RTK with the assistance of an IMU-based pedestrian navigation algorithm could be more adaptable to urban areas because of the capacity of providing positioning results during GNSS outage. Our experiment demonstrates the feasibility of providing continuous positioning results by using RTK with the assistance of an IMU-based pedestrian navigation algorithm.

Conclusions and Future Work
In this paper, we tested the performances of single-frequency RTK and dual-frequency RTK on the Xiaomi Mi 8 and compared the performance of RTK based on the Xiaomi Mi 8 with that based on the NovAtel receiver. Both single-frequency RTK and dual-frequency RTK could provide fixed solutions in static mode. The introduction of the dual-frequency RTK reduced the convergence time and improved the fixed rate in static mode. When it comes to dynamic mode, dual-frequency RTK with GPS and Galileo measurements suffered from the least biases and fluctuations. The introduction of Galileo satellites helped provide more continuous positioning results because of the increasing number of visible satellites. The fixed rate of dual-frequency RTK based on the Xiaomi Mi 8 in dynamic mode did not rise significantly compared with single-frequency RTK based on the Xiaomi Mi 8.
We also provided a method to assist RTK with an IMU-based pedestrian navigation algorithm for smartphones. We combined RTK with the Madgwick algorithm and the ZUPT aiding INS to provide more continuous positioning results. The experiment showed that RTK with the assistance of IMU could provide reliable positioning results during GNSS outage, which was much more reliable and adaptable to complex environments than RTK without the assistance of an IMU-based pedestrian navigation algorithm. The experiments verified the feasibility of providing continuous positioning results in both GNSS-allowed and GNSS-challenged environments with a Xiaomi Mi 8.
Assisting RTK with an IMU-based pedestrian navigation algorithm is still in the proof-of-concept stage. Experiments verified the feasibility of our method. However, further work is needed to assess our method's performance more accurately. In the future, we will conduct experiments to test the method's accuracy and stability in different environments. Besides, we will obtain the GNSS measurements and measurements of IMU with our app and develop a GNSS/INS with a loosely-coupled or tightly-coupled integration system based on smartphones to raise the anti-jamming capability of RTK. Considering tying smartphones to the pedestrian's foot is inconvenient and not practical for pedestrians, we will also assist RTK with other algorithms during GNSS outage so that continuous positioning results can be provided with a handheld smartphone.