# Real-time Precise Point Positioning with a Xiaomi MI 8 Android Smartphone
## 4 Methodology
Using precise ephemeris and precise clock bias files to reduce the orbital errors and satellite clock biases, weakening the ionospheric delay error with corresponding product, the observation equation was simplified as in Reference [16]:  
\[P_{i}^{g}=\rho_{i}^{g}+c\widetilde{dt_{P}}+d_{prop}^{g}+\epsilon_{p}^{g}, \tag{3}\]  
\[\Phi_{i}^{g}=\rho_{i}^{g}+c\widetilde{dt_{\varphi}}+d_{prop}^{g}+\overline{N}_ {i}^{g}+\epsilon_{\varphi}^{g}, \tag{4}\]  
\[P_{j}^{c}=\rho_{j}^{c}+c\widetilde{dt_{P}}+c\widetilde{dt_{sys}}+\epsilon_{ trop}^{c}+\epsilon_{p}^{c}, \tag{5}\]  
\[\Phi_{j}^{c}=\rho_{j}^{c}+c\widetilde{dt_{\varphi}}+c\widetilde{dt_{\varphi}}+ d_{trop}^{c}+\overline{N}_{k}^{c}+\epsilon_{\varphi}^{c}, \tag{6}\]  
where the superscript \(c\) denotes BDS, the subscript \(j\) denotes the \(j\)-th satellite, \(\widetilde{dt_{sys}^{c}}\) is the time bias between BDS and GPS, and the other parameters have the same meaning as Equations (1) and (2). In addition, Galileo and GLONASS systems also have corresponding observation equations, and their main difference is the \(\widetilde{dt_{sys}}\). Suppose that \(n_{1}\) GPS satellites, \(n_{2}\) BDS satellites are observed at a certain time. The vector of parameters to be estimated is:  
\[\mathbf{X^{\mathrm{T}}}= \begin{bmatrix}x&y&z&c\widetilde{dt_{P}}&c\widetilde{dt_{ \varphi}}&c\widetilde{dt_{sys}^{c}}&d_{prop}&\overline{N}_{1}^{g}&\cdots& \overline{N}_{n_{1}}^{g}&\overline{N}_{n_{1}+1}^{c}&\cdots&\overline{N}_{n_ {1}+n_{2}}^{c}\end{bmatrix} , \tag{7}\]  
where the \(x\), \(y\), and \(z\) are the absolute position of the mobile phone. Therefore, the total number of observation equations is \(2\times(n_{1}+n_{2})\), the parameters to be estimated are \(7+n_{1}+n_{2}\), and the number of redundant observations is \(n_{1}+n_{2}\)\(-\) 7. The parameters estimation method used is the standard static Kalman filter [16]. In particular, since the vector of parameters to be estimated is modified, the matrix of observation coefficients in the filtering process needs to be modified accordingly. When the observations equation is as shown in Equation (8), the coefficient matrix should be as shown in Equation (9). \[\mathbf{I^{\mathrm{T}}}=\begin{bmatrix}P_{1}^{g}&\mathbf{\Phi}_{1}^{g}&\cdots&P_{n_{1 }}^{g}&\mathbf{\Phi}_{n_{1}}^{g}&\mathbf{P}_{n_{1}+1}^{c}&\mathbf{\Phi}_{n_{1}+1}^{c}& \cdots&\mathbf{P}_{  
where the \(\alpha\), \(\beta\), and \(\gamma\) are the direction cosines from mobile phone to satellite; \(MF\) is the tropospheric projection coefficient, and the projection equation used is the Neill model [17]. The Equations (7)-(9) are suitable when using GPS and BDS data in positioning process, which need to be modified when using other GNSS systems data. The specific PPP positioning settings are shown in Table 1 below. The satellite orbit, clock bias and ionospheric delay products mentioned in Table 1 were downloaded from the IGS Data Center of Wuhan University ([[http://www.igs.gnsswhu.cn/](http://www.igs.gnsswhu.cn/)]([http://www.igs.gnsswhu.cn/](http://www.igs.gnsswhu.cn/))). Specifically, the orbit and clock bias are mitigated by WHU (Wuhan University) ultra-rapid products predicted part, the ionospheric delay is mitigated by CODE (The Center for Orbit Determination in Europe) 2-day predicted GIM (global ionosphere maps). Previous studies show that using the final GIM products can correct approximately 80% of the ionospheric delay, but the residual ionospheric delay error still has a decimeter level harmful effect on the positioning results of single-frequency PPP [20]. Moreover, the predicted GIM product used in this study has a worse correction effect than the final product, which is an important factor affecting the performance of our positioning experiments. All the IGS data products used were predicted products, indicating that the method used in this work is suitable for real-time positioning.