## 2 Improved Cycle-Slip Detection and Repair Algorithm
\tag{1}\]  
Equation (1) shows the pseudo-range and phase observation equation; \(i\) denotes the carrier frequency; \(\rho\) is the geometric distance between the satellite and the station; \(c\) is the speed of light; \(dT,dt\) are the satellite and receiver clock offsets, respectively; \(d_{trop}\) represents the troposphere delay; \(\widetilde{I}\) is the ionospheric delay on \(L_{1}\) frequency; \(k_{i}=f_{1}^{2}/f_{i}^{2}\) is the ionospheric delay coefficient; \(\epsilon_{i},\xi_{i}\) are the corresponding observation noise; \(\lambda_{i}\) is the wavelength; and \(N_{i}\) is the integer ambiguity. The ambiguity of Melborne-Wubbena (MW) combination reads:  
\[N_{w}=\left(\frac{f_{1}L_{1}-f_{2}L_{2}}{f_{1}-f_{2}}-\frac{f_{1}P_{1}+f_{2}P_ {2}}{f_{1}+f_{2}}\right)\cdot\frac{1}{\lambda_{w}}=N_{1}-N_{2}+\epsilon_{w} \tag{2}\]  
where \(\lambda_{w}=\frac{c}{f_{1}-f_{2}}\) is the widelane wavelength, and \(\epsilon_{w}\) is the combined noise. The cycle slips of \(L_{1}\) and \(L_{2}\) are assumed as \(\Delta N_{1},\Delta N_{2}\), respectively; thus, after determining the epoch difference of the MW combination, the combined ambiguity is:  
\[\Delta N_{w}=\Delta N_{1}-\Delta N_{2}+\epsilon_{\Delta w} \tag{3}\]  
where \(\epsilon_{\Delta w}\) is the noise. Then, Equation (3) is inserted into the phase equation as epoch difference:  
\[ \begin{array}{l}\Delta L=\left[\begin{array}{c}\Delta L_{1}-\lambda_{1} \Delta N_{w}\\ \Delta L_{2}\end{array}\right]=\left[\begin{array}{cc}1&\lambda_{1}\\ 1&\lambda_{2}\end{array}\right]\left[\begin{array}{c}\Delta(\rho+c\cdot dT- c\cdot dt+d_{trop})\\ \Delta N_{2}\end{array}\right]-\left[\begin{array}{c}k_{1}\\ k_{2}\end{array}\right]\Delta\widetilde{I}+\left[\begin{array}{c}\Delta \xi_{1}\\ \Delta\xi_{2}\end{array}\right]\\ =\mathbf{A}\left[\begin{array}{c}\Delta(\rho+c\cdot dT-c\cdot dt+d_{trop})\\ \Delta N_{2}\end{array}\right]-\mathbf{k}\Delta\widetilde{I}+\Delta\xi\end{array}  \tag{4}\]  
In Equation (4), \(\mathbf{A}=\left[ \begin{array}{cc}1&\lambda_{1}\\ 1&\lambda_{2}\end{array} \right]\), \(\mathbf{k}=[k_{1},k_{2}]^{T}\), \(\Delta\xi=[\Delta\xi_{1},\Delta\xi_{2}]^{T}\). Assume \(\rho_{0}=\rho+c\cdot d\widetilde{I}-c\cdot dt+d_{trop}\). According to Equation (4), the cycle slips on \(L_{2}\) observation can be expressed as:  
\[\left[ \begin{array}{c}\Delta\rho_{0}\\ \Delta\widetilde{N}_{2}\end{array} \right]=\left(\mathbf{A}^{T}\mathbf{Q}^{-1}\mathbf{A} \right)^{-1}\mathbf{A}^{T}\mathbf{Q}^{-1}\Delta L \tag{5}\]  
and:  
\[\left\{ \begin{array}{l}\mathbf{Q}=\text{cov}\!\left[-\mathbf{k}\Delta\widetilde{I}+ \Delta\xi\right]=\sigma_{\Delta\widetilde{I}}^{2}\mathbf{k}k^{T}+Q_{\Delta\xi\Delta \xi}-\mathbf{k}\mathbf{c}^{T}-\mathbf{c}\mathbf{k}^{T}\\ \mathbf{c}=\text{cov}\!\left[\Delta\xi,\Delta\widetilde{I}\right]\end{array} \right. \tag{6}\]It should be noted that the accurate estimation of the cycle-slip values on \(L_{2}\) requires further analysis of \(\mathbf{Q}\). The parameter \(\Delta\widetilde{I}\) in Equation (4) can be expressed as the difference between the estimation error of the former epoch \(d\hat{I}_{(t-1)}\) and the prediction error of the current epoch \(d\overline{I}_{(t)}\):  
\[\Delta\widetilde{I}=d\overline{I}_{(t)}-d\hat{I}_{(t-1)}+e_{m} \tag{7}\]  
where \(e_{m}\) is the prediction model error. However, for the epoch without cycle slips, the phase observation equation can be obtained as below:  
\[L=\left[ \begin{array}{cc}L_{1}-\lambda_{1}N_{1}-c\cdot dT+c\cdot dt-d_{ trop}\\ L_{2}-\lambda_{2}N_{2}-c\cdot dT+c\cdot dt-d_{trop}\end{array} \right]=\left[ \begin{array}{cc}1&-k_{1}\\ 1&-k_{2}\end{array} \right]\left[ \begin{array}{c}\rho\\ I\end{array} \right]+\left[ \begin{array}{c}\xi_{1}\\ \xi_{2}\end{array} \right]=\mathbf{B}\left[ \begin{array}{c}\rho\\ I\end{array} \right]+\xi \tag{8}\]  
where \(\mathbf{B}=\left[ \begin{array}{cc}1&-k_{1}\\ 1&-k_{2}\end{array} \right]\) and \(\xi=[\xi_{1},\xi_{2}]^{T}\). The ionospheric delay can be expressed as follows:  
\[\left[ \begin{array}{c}\hat{\rho}\\ \hat{I}\end{array}