## 3 Methodology for Precise Code Positioning
### Precise Code Positioning Models
Regarding \(\sigma_{p}\), numerous research results indicate that the noise variation in multi-GNSS observations from smartphones has a weak correlation with elevation but a strong correlation with the CNR, as mentioned above. Hence, a pseudo-range weighting model that considers the CNR is implemented. It can be written as \(\sigma_{p}^{2}=a^{2}\cdot 10^{\frac{\max(CNR_{0}-CNR_{0})}{10}}\), where \(\max(\cdot)\) is the maximum function, \(a\) is the STD of observation noise, and \(CNR_{0}\) is a constant value [48]. The covariance matrix of the DF-P\({}^{\prime}\) can be presented as follows:  
\[\text{cov}\Bigg{(}\left[ \begin{array}{c}P_{r,1F12}^{\Delta s,Q}\\ p_{f}^{\Delta s,Q}\end{array} \right]\Bigg{)}= \begin{bmatrix}2(\alpha_{12}^{2}+ \beta_{12}^{2})\sigma_{p}^{2}&2\alpha_{12}\sigma_{p}^{2}\\ 2\alpha_{12}\sigma_{p}^{2}&2(\sigma_{p}^{2}+\sigma_{I}^{2})\end{bmatrix}  \tag{14}\]  
where \(\sigma_{I}\) is the uncertainty of ionospheric correction. The other covariance matrix of PCP models is not displayed here. It is essential to note that the value of \(\sigma_{I}\) should be reasonably set based on the receiver's environment to accurately reflect the uncertainty of ionospheric correction. The PCP models include both the IF-P and IFUC models, which are ionosphere-free models, as derived. These models have the same parameters to be estimated, which include receiver position and SD wet tropospheric delay denoted as \( \begin{bmatrix}x&\Delta T_{r}^{Q}\end{bmatrix} \). They are applicable to SF, DF, and TF observation data. The IF-P models include the DF-P and TF-P models, designed for SF/DF and SF/DF/TF observation data, respectively. It is important to note that the IF-P models exhibit higher observation noise due to their ionosphere-free combination when compared to the IFUC models. The IFUC models include IFUC1, IFUC12, and IFUC123 models designed for SF, SF/DF, and SF/DF/TF observation data, respectively. These models provide a more flexible selection to fully utilize pseudo-range observations from smartphones. Based on the abovementioned methods, the algorithm flowchart of the proposed PCP approach is given in Figure 5. First, the gross errors of the raw measurements are preliminarily detected and eliminated by validating the error estimates for the pseudo-range measurements. The raw pseudo-ranges are smoothed by the Doppler measurements and the reference satellites are selected. Then, inter-satellite single-difference processing is performed. Following this, the errors in the code observations are corrected, in which the user receiver antenna variations are not considered due to the absence of the corresponding information of the embedded GNSS antenna in the smartphone. Then, a Kalman filter is applied for parameter estimation. The process strategies for the estimated parameters are listed in Table 5. Please note that SPP serves as a general reference position for PCP. \begin{table}
\begin{tabular}{c c} \hline \hline
**Items** & **Strategy** \\ \hline Model & SPP, IF-P and IFUC models \\ Estimator & Kalman filter and Least Squares filter (only SPP) \\ Weighting scheme & CNR weight \\ Satellite elevation mask & 15\({}^{\circ}\)and 0\({}^{\circ}\) (only static open-sky scenario) \\ CNR mask & 25 dB-Hz \\ Satellite orbit and clock & Products from GFZ \\ Satellite PCO/PCV & jgs14.atx according to [PERSON] et al. [49] \\ Satellite DCB corrections & Corrected with MGEX DCB products from CAS. \\  & Zenith hydrostatic delays are corrected using the \\ Tropospheric delay & Saastamonien model, and zenith wet delays are \\  & estimated using a random walk. \\  & Static: estimated as constants; dynamic: estimated using white noise process. \\ \hline \hline \end{tabular}
\end{table} 
Table 5: Data processing strategies.