## 2 Improved Cycle-Slip Detection and Repair Algorithm
The model error from Equations (15) to (18) is:  
\[\sigma_{m}^{2}(t)=(1-\mu)\sigma_{m}^{2}(t-2)+\mu([\hat{I}_{(t-1)}-\overline{I} _{(t-1)}]^{2}-\sigma_{\overline{I}}^{2}(t-1)) \tag{19}\]  
where \(\mu\) is the impact factor of the previous epoch, and \(\sigma_{\overline{I}}^{2}=(\mathbf{g}^{T}\mathbf{g})(\mathbf{b}^{T}\mathbf{b})\sigma_{L}^{2}\). Therefore, in Equation (5), the solution of \(\mathbf{A}^{T}\mathbf{Q}^{-1}\mathbf{A}\) can be expressed as:  
\[\mathbf{A}^{T}\mathbf{Q}^{-1}\mathbf{A}=\mathbf{A}^{T}\overline{\mathbf{Q}}^{-1}\mathbf{A}-\theta_{m} \mathbf{A}^{T}\mathbf{M} \tag{20}\]  
According to the above equations, the cycle-slip values on \(L_{2}\) can be calculated accurately by inserting Equation (20) into Equation (5). Moreover, inserting the fractional parts on \(L_{2}\) adjusted to integer numbers into Equation (3), can solve the cycle slips on \(L_{1}\) observations. In the improved cycle-slip detection and repair algorithm, the estimated ionospheric delay in Equation (10) contains the constant biases, namely, integer ambiguity and hardware delay in adjacent epochs, which do not affect the cycle-slip detection at all. In this study, an improved algorithm of double-frequencies' cycle-slip detection and repair is proposed. The new algorithm considers the drawbacks of the inaccurate traditional Turboedit (see Table 4) to refine the data preprocessing based on a predicted ionospheric delay. A polynomial prediction model is used to acquire the ionospheric delays of the current epoch, which takes the correlation of adjacent epochs into consideration. Moreover, the cycle slips are detected and repaired epoch-wise to increase data availability. In general, compared with the traditional Turboedit, the advantages of the improved algorithm can be summarized as follows: (1) the algorithm, which is based on the predicted ionospheric delay information rather than a geometry-free (GF) combination, solves the problem of special cycle-slip combinations in two frequencies (such as 1:1 and 9:7 for \(L_{1}\):\(L_{2}\) in GPS observations); (2) the improved algorithm is more accurate than MW and GF combinations in Turboedit, which has to fit the GF and ignores the correlation of the ionospheric delays; (3) in the estimation of ionospheric delays, the pseudo-range observations, which have an impact on the detection and repair of the small cycle-slips as the larger noise than phase observations, are disregarded;and (4) the variations in the ionospheric delay estimation caused by constant biases in Equation (14) are zero when \(\sum\limits_{i=1}^{5}g_{i}=1\)  
\[(\delta\Delta I_{t,t-1}=\delta\overline{I}_{(t)}-\delta\overline{I}_{(t-1)}=g^{ T}\delta\mathbf{I}-\delta\overline{I}_{(t-1)}=(\sum\limits_{i=1}^{5}g_{i}-1)\mathbf{b}^{T} \delta\mathbf{N}=0).\]  
To illustrate the improved cycle-slip detection and repair algorithm, Figure 1 shows the flow chart of the above procedure. Moreover, the data from iGMAS and MGEX tracking networks are selected to verify the reliability and availability of the improved algorithm. The fractional part of the estimated \(L_{2}\) based on the improved algorithm is extracted by no cycle-slip observations of iGMAS (WHU1 and LHA1) and MGEX (LHAZ). Four days (DOY 183-186, 2017) of observations with a 30 s sampling interval were chosen to conduct the cycle-slip detection and repair experiments and then to fully explain the accuracy of the improved algorithm. Due to the fact that the experimental datasets were extremely large, the G01 and C01, C06, C14, and C32 were selected as the representative of GPS, and GEO, IGSO, MEO, and BDS-3 in BeiDou to analyze the results, respectively. Table 2 summarizes the maximum, average, and standard deviation (STD) of the fractional parts of the estimated cycle slips and the properness after rounding on G01. Similarly, results of BeiDou satellites (C06 missed on DOY 184) are listed in Table 3, in which only LHA1 is listed to conduct the corresponding analysis.