## 3 Methodology for Precise Code Positioning
### General Code Observation Model  
The code observation on a single frequency is as follows [39]:  
\[p_{r,j}^{s,Q}=\mu_{r}^{s,Q}.x+dt_{r}^{Q}-dt^{s,Q}+\kappa_{j}.I_{r,j}^{s,Q}+T_{r }^{Q}+d_{r,j}^{Q}-d_{j}^{s,Q}+\varepsilon_{r,j}^{s,Q} \tag{2}\]  
where the superscripts \(s\) and \(Q\), and subscript \(r\) represent the satellite, constellation, and receiver, respectively; \(p_{r,j}^{s,Q}\) is the code observed-minus-computed values; \(j\) denotes the frequency (\(j=1,\,2,\,3\)); \(\mu_{r}^{s,Q}\) is the unit vector of direction; \(x\) represents the vector of position correction to the priori position; and \(dt_{r}^{Q}\) and \(dt^{s,Q}\) indicate the receiver and satellite clock offsets, respectively. \(\kappa_{j}=f_{1}^{2}/f_{j}^{s}\) is the ionospheric factor; \(f\) indicates the frequency; and \(I_{r,1}^{s,Q}\) denotes the slant ionospheric delay at the first frequency. Furthermore, \(T_{r}^{Q}\) is the zenith wet tropospheric delay. The tropospheric delay can be divided into two parts, namely, the hydrostatic delay part and the wet delay part, both of which are able to be expressed as the product of a zenith path delay and a mapping function; the zenith dry delay can be calculated using the [PERSON] model [40; 41]. The parameters \(d_{r,j}^{Q}\) and \(d_{j}^{s,Q}\) are the code hardware delays from the receiver side and satellite side, respectively. \(\varepsilon_{r,j}^{s,Q}\) represents the measurement noise of the code including multipath errors. Moreover, the following variables are defined herein for ease of expression:  
\[\left\{ \begin{array}{l}\alpha_{ij}=\frac{f_{1}^{2}}{f_{1}^{2}-f_{1}^{2}}, \beta_{ij}=\frac{-f_{2}^{2}}{f_{1}^{2}-f_{1}^{2}}\\ DCB_{ij}^{s}=d_{i}^{s}-d_{j}^{s},d_{1r,j}^{s}=\alpha_{ij}.d_{i}^{s}+\beta_{ij }.d_{j}^{s}\end{array} \right. \tag{3}\]  
where \(i\) and \(j\) are the frequency (\(i,j=1,2,3;i\
eq j\)); \(\alpha_{ij}\) and \(\beta_{ij}\) represent the coefficients of the combination; and \(DCB_{ij}^{s}\) represent the differential code bias (DCB) of the satellite. The GNSS precise satellite clock products, which can be downloaded from [[ftp://igs.gnsswhu.cn/pub/gps/products/mgex/](ftp://igs.gnsswhu.cn/pub/gps/products/mgex/)]([ftp://igs.gnsswhu.cn/pub/gps/products/mgex/](ftp://igs.gnsswhu.cn/pub/gps/products/mgex/)) (accessed on 1 July 2023) [42], are based on the dual frequency IF combined code and phase observations solved for the first and second \begin{table}
\begin{tabular}{c c c c} \hline \hline
**Number** & **BDS-3** & **GPS** & **Galileo** \\ \hline
1 & B1C (1575.42) & L1 (1575.42) & E1 (1575.42) \\
2 & B2a (1176.45) & L5 (1176.45) & E5a (1176.45) \\
3 & B1I (1561.01) & / & / \\ \hline \hline \end{tabular}
\end{table} 
Table 4: BDS-3/GPS/Galileo frequency numbers. \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Device** & **B1C** & **B2a** & **B1I** & **L1** & **L5** & **E1** & **E5a** \\ \hline HP40 & / & / & 38.1440 & 56.8366 & / & 39.6208 & 64.9179 \\ Mi11 & 10.8937 & 13.0953 & 24.5704 & 15.7396 & 6.1299 & 12.9456 & 18.8156 \\ \hline \hline \end{tabular} \({}^{7}\) represents no data; the L5 frequency data is \({}^{7}\) for HP40 due to the number of satellites observed by HP40 being only one to two, which cannot represent the frequency.  
\end{table} 
Table 3: Smartphone multi-frequency pseudo-range noise STD in the static open-sky scenario. frequencies (e.g., BDS B1I/B3I, GPS L1/L2, and Galileo E1/E5a) [43]. Although some GPS satellites have the time-varying part of the carrier phase delay [44], its influence can be ignored in the code observation equation.