# Real-time Precise Point Positioning with a Xiaomi MI 8 Android Smartphone
## 4 Methodology  
During the first and third dataset collections, mobile phones and geodetic GNSS receivers were synchronized at the same location. The accuracy of the carrier phase observation of geodetic receivers is much better than the pseudorange observations of smartphones. We took the carrier phase observations of the geodetic receivers as the standard value and calculated the RMS of pseudorange observations of smartphones. The specific steps are as follow:  
1. Calculating the difference values between the mobile phone's pseudorange observations and the same time geodetic receiver's carrier phase observations (in meters);
2. Performing linear regression (to eliminate systematic deviation such as the influence of geodetic receiver clock bias) on the difference values within a certain time window (100 epochs), obtaining the regression residuals;
3. Calculating the RMS value of the regression residuals, that is the RMS of smartphone's pseudorange observations. For the carrier phase observations, by calculating the RMS of carrier phase observations change rate of each device (also with the window of 100 epochs, and the linear regression was also performed), the qualities of carrier phase observations of tested devices are compared and analyzed. The aim of analyzing the quality of mobile phones' GNSS raw observations is to help us determine the zenith direction variance of GNSS observations in Kalman filter process. According to the preliminary analysis, there are two clock biases of smartphone that need to be estimated in the positioning process. Taking the GPS as an example, the observation equations can be described by:  
\[P_{i}^{g}=\rho_{i}^{g}+c\overline{dt_{p}}-cdT^{g}+d_{orb}^{g}+d_{trop}^{g}+d_{ ion}^{g}+\epsilon_{p}^{g}, \tag{1}\]  
\[\Phi_{i}^{g}=\rho_{i}^{g}+c\overline{dt_{p}}-cdT^{g}+d_{orb}^{g}+d_{trop}^{g}- d_{ion}^{g}+\widetilde{N}_{i}^{g}+\epsilon_{q}^{g}, \tag{2}\]  
Figure 5: The differences between pseudorange change rate and carrier phase change rate of all GNSS satellites of a Huawei P10 smartphone and a Xiaomi MI 8 smartphone (L1/E1 frequency). (**a**) Huawei P10 smartphone; (**b**) Xiaomi MI 8 smartphone (L1/E1 frequency). where the superscript \(g\) denotes GPS, the subscript \(i\) denotes the \(i\)-th satellite, \(P_{i}^{g}\) and \(\Phi_{i}^{g}\) are the pseudorange observation and carrier phase observation in meters, \(\rho_{i}^{g}\) is the distance between the mobile phone and the satellite, \(c\) is the speed of light, \(\widetilde{dt_{P}}\) and \(\widetilde{dt_{\varphi}}\) are the clock biases of pseudorange observation and carrier phase observation, \(dT\overline{s}\) is the clock bias of satellite, \(d_{orb}^{g}\) is the orbit error of satellite, \(d_{prop}^{g}\) is the tropospheric delay, \(d_{ion}^{g}\) is the ionospheric delay, \(\overline{N}_{i}^{g}\) is the integer ambiguity of carrier phase in meters, and \(\epsilon_{\varphi}^{g}\) the is residual error. There are too few Galileo satellites and GPS satellites with L5 signals observed by mobile phones, however, the parameters to be estimated are too many, and thus the PPP positioning model used is a single-frequency non-difference model.