# A BDGIM-Based Phase-Smoothed Pseudorange Algorithm for BDS-3 High-Precision Time Transfer
## 2 BDGIM-Based Phase-Smoothed Pseudorange Algorithm
### Improved Phase-Smoothed Pseudorange Principle  
In general, the observation equations of the raw pseudorange \(P\) and raw phase \(L\) are expressed as follows [23; 24]:  
\[P=\rho+c(dt_{r}-dt^{s})+T+I+c(d_{r}-d^{s})+\varepsilon_{P} \tag{10}\]  
\[L=\lambda\phi=\rho+c(dt_{r}-dt^{s})+T-I+\lambda(N+b_{r}-b^{s})+\xi_{L} \tag{11}\]  
where the symbols \(r\) and \(s\) denote the receiver and satellite, respectively; \(\rho\) denotes the distance from the satellite to the receiver (m); \(dt_{r}\) and \(dt^{s}\) represent the receiver and satellite clock errors (s), respectively; \(T\) denotes the tropospheric wet delay (m); \(I\) is the ionospheric delay; \(d_{r}\) and \(b_{r}\) are the pseudorange and carrier phase hardware delay at the receiver end, respectively; \(d^{s}\) and \(b^{s}\) denote the pseudorange and carrier phase hardware delay at the satellite end, respectively; \(\lambda\) is the wavelength on frequency \(f\) (m); \(N\) is the integer ambiguity (cycle); and \(\varepsilon_{P}\) and \(\xi_{L}\) indicate the unmodeled noises in meters. We can see from Equation (11) that the carrier observations have integer ambiguity, which must be addressed before pseudorange smoothing can be applied. The effect of the ambiguity can be minimized by the carrier variation between the consecutive epochs, and high-precision carrier phase variation can also be obtained at the same time, supposing that cycle slip does not occur while the satellite is being tracked continuously. The following equations can be found by differentiating the pseudorange and carrier phase measurements of the consecutive epochs, respectively:  
\[\Delta P_{k,k-1}=P_{k}-P_{k-1}=\rho_{k}-\rho_{k-1}+T_{k}-T_{k-1}+I_{k}-I_{k-1 }+\varepsilon_{P,k}-\varepsilon_{P,k-1} \tag{12}\]\[\Delta L_{k,k-1}=L_{k}-L_{k-1}=\rho_{k}-\rho_{k-1}+T_{k}-T_{k-1}-I_{k}+I_{k-1}+ \xi_{L,k}-\xi_{L,k-1} \tag{13}\]  
Note that Equations (12) and (13) have an ionospheric delay variation \(I_{k}-I_{k-1}\) between the \(k\)th and \(k-1\)th epochs. This can be obtained using the BDGIM, and it can be expressed as \(\Delta I_{BDGIM}=I_{k}-I_{k-1}\). Finally, the improved phase-smoothed pseudorange algorithm can be written as follows:  
\[\left\{ \begin{array}{l}\widetilde{P}_{k}=\omega_{k}P_{k}+(1-\omega_{k})[ \widetilde{P}_{k-1}+\lambda(\phi_{k}-\phi_{k-1})+2\Delta I_{BDGIM}]\\ \widetilde{P}_{1}=P_{1}\end{array} \right. \tag{14}\]  
with \(\omega_{k}=1/k\)[25]. Assume that the pseudorange observation error \(\varepsilon_{P}\) and the phase observation error \(\xi_{L}\) are independent of each other and that their variances are \(\sigma_{P}^{2}\) and \(\sigma_{L}^{2}\), respectively. According to the error propagation law, we have \(\sigma_{P}^{2}=\frac{1}{k}\sigma_{P}^{2}+\frac{k-1}{k}\sigma_{L}^{2}\). Since the carrier phase accuracy is much greater than the pseudorange accuracy, \(\sigma_{P}^{2}\gg\sigma_{L}^{2}\), we have  
\[\sigma_{P}^{2}\approx\frac{\sigma_{P}^{2}}{k} \tag{15}\]  
From the above equation, we can see that the accuracy of the smoothed pseudorange is approximately \(\sqrt{k}\) times better than that of the original pseudorange. Therefore, we can infer that time transfer using the phase-smoothed pseudorange performs better. In this work, a weighted least squares algorithm is used to predict the receiver clock offset. The principle of phase-smoothed pseudorange SF SPP time transfer based on the BDGIM is displayed in Figure 1. First, the BDS-3 observations and ephemeris products of the two stations are obtained. Note that the broadcast parameters of the BDGIM are included in the broadcast ephemeris. Then, we use the phase messages and ionospheric delay to smooth the pseudorange observations and to obtain the smoothed pseudorange observations. In addition, the receiver clock offset, i.e., the difference of local time (\(T_{1}\) and \(T_{2}\)) relative to the GNSS reference time (Ref), is estimated in real time using SPP. Finally, the difference between the two receiver clock offsets is calculated.