Introduction

When processing Global Positioning System (GPS) carrier phase data, a cycle-slip is a sudden jump in the carrier phase observable by an integer number of cycles (Leick 2004). Cycle-slips can be caused by the failure of a receiver, signal interruption, low signal-to-noise ratio, or high receiver dynamics. Cycle-slips may occur independently on each carrier frequency per satellite and will remain in all subsequent phase measurements. Cycle-slip processing is a prerequisite for the use of carrier phase measurements.

The entire cycle-slip processing is in theory composed of four sequential stages: (1) cycle-slip detection to check for the occurrence of cycle-slips; (2) cycle-slip determination to quantify the sizes of cycle-slips; (3) cycle-slip validation to verify the determined sizes of cycle-slips; (4) cycle-slip removal to remove the cycle-slips out of the associated phase measurements. The steps (2)–(4) are also referred to as cycle-slip repair or cycle-slip correction.

Any application using carrier phase measurements faces cycle-slip issues. Thus, not only Differential GPS (DGPS) but also stand-alone receivers need cycle-slip processing. Especially for stand-alone receivers, the necessity of cycle-slip processing cannot be underestimated. Examples can be given as follows:

  1. (1)

    The carrier phase measurements can still be used even without explicit knowledge of integer ambiguities. A typical application is the carrier phase smoothing of the pseudorange data. The smoothed pseudorange data are not merely used in single-point positioning but also preferably employed by the ambiguity resolution in DGPS.

  2. (2)

    The Precise Point Positioning (PPP) technique is drawing more and more attention, whereas the corresponding real-time ambiguity resolution is still a challenging task. The cycle-slip detection is therefore an essential operation. Besides that, a precise cycle-slip repair may also replace the re-calculation of ambiguities.

The cycle-slip detection is invoked epoch-by-epoch to check the discontinuity of carrier phase data. For the sake of computational efficiency, the cycle-slip detection should be a rapid algorithm. The cycle-slip repair faces more difficulties than cycle-slip detection.

Many studies regarding the cycle-slip processing have been carried out. The algorithms presented in this paper are subject to the following conditions:

  1. 1.

    It is implemented in the measurement domain. The algorithms are only oriented to GPS RINEX observation files. The antenna coordinates will therefore not be known in advance.

  2. 2.

    It is oriented to real-time algorithms. Referring to a specific satellite, a real-time approach employs only the current and previous measurements. The future incoming measurements will not be considered even if this is possible when processing a RINEX observation file.

  3. 3.

    It applies to stand-alone receivers. The presented approaches merely rely on the measurements of a stand-alone receiver, without any aiding of external sensors (like inertial sensors) or GPS services (like DGPS).

  4. 4.

    It relies only on GPS L1 and L2 signals. Modern GPS satellites support more frequencies (like L5) and measurements (like C2). However, only GPS pseudorange (code) measurements, Doppler measurements, and carrier phase measurements on L1 and L2 signals are considered.

The software package was developed by the author using time away from work and based on the experience collected during his studies at the University of Siegen.

In the following text, the algorithms implemented in the software package will be described first. After that, the functionalities of the program will be introduced.

Fundamentals of cycle-slip detection for stand-alone GPS receivers

Considering a stand-alone GPS receiver, the observation equation for carrier phase measurements can be formulated as:

$$ \lambda_{Li} \Upphi_{Li} (t) = \rho (t) + \lambda_{Li} N_{Li} - \frac{{\lambda_{Li}^{2} }}{{\lambda_{L1}^{2} }}I_{L1} (t) + T(t) + S(t) + c \cdot \tau_{r} (t) + c \cdot \tau_{s} (t) + \lambda_{Li} e_{Li} (t) + M_{Li} (t) $$
(1)

where t is the time epoch; Li (subscript) indicates the corresponding signal; λ is the wavelength of the corresponding GPS signal; Φ is the received carrier phase observable in units of cycles; N is the integer phase ambiguity in units of cycles; ρ is the geometric distance from the GPS receiver’s antenna phase center at the epoch of signal reception to the GPS satellite’s antenna phase center at the epoch of signal transmission; I is the ionospheric delay in units of length; T is the tropospheric delay in units of length; S is the satellite orbit error in units of length; c is the speed of light; τs is the satellite clock bias in units of time; τr is the receiver clock bias in units of time; e is the carrier phase thermal noise in units of cycles; M is the multipath error in units of length.

A cycle-slip is an abnormal jump of phase ambiguity and hence can be obtained by differencing the carrier phase observation equations between two adjacent epochs:

$$ \lambda_{Li} \Updelta \Upphi_{Li} = \Updelta \rho + \lambda_{Li} \Updelta N_{Li} - \frac{{\lambda_{Li}^{2} }}{{\lambda_{L1}^{2} }}\Updelta I_{L1} + \Updelta T + \Updelta S + \Updelta \tau_{r} \cdot c + \Updelta \tau_{s} \cdot c + \lambda_{Li} \Updelta e_{Li} + \Updelta M_{Li} $$
(2)

where the operator ∆ indicates the differencing between the current and former epochs. The only known term in the measurement domain is the carrier phase measurement Φ. Thus, the cycle-slip detection is based on the relation between the cycle-slip term ΔN and the measurement term ΔΦ. For this purpose, the other terms in (2) should be possibly removed.

The elimination of the geometric term Δρ is a key step for cycle-slip detection. Referring to a single-frequency GPS receiver and employing only carrier phase measurements, the geometric term can be minimized by a high-order difference in carrier phase measurements. This needs, however, a prerequisite that the antenna should be stable or at least experiencing only a very slight maneuver. If dual-frequency carrier phase measurements are available, the geometry term can be eliminated by differencing carrier phase measurements on both signals. Once the geometry term can be estimated using other observations like pseudorange or other sensors like inertial sensors, it can also aid the cycle-slip detection.

The approaches presented by this software package are actually the most classic ones that can be read from many text books in the field of GPS data processing, for example (Hofmann-Wellenhof et al. 2003). Their advantages and limitations will be discussed in the subsections, respectively. There is probably no best method for cycle-slip removal, leaving lots of space for optimization and innovation (Leick 2004). A robust cycle-slip processing approach is subject to the application and hardware. Besides that, it should possibly employ all available measurements and fuse different techniques. For example, Blewitt proposed the well-known method for dual-frequency GPS receiver with P-code outputs (Blewitt 1990). This method checks the residuals of the wide-lane signal combination and ionosphere combination to identify the cycle-slips. Moreover, solutions are suggested to adapt the method to non-P-code receivers and bad ionosphere activities, making this method applicable under various conditions.

High-order phase differencing

Referring to a static GPS antenna, the geometry term ρ mainly reflects the motion of the associated satellite along its orbit. A “nearly circular” satellite orbit can be approximated by a high-order polynomial. In normal conditions, the ionospheric error, tropospheric error, satellite orbit error, as well as satellite and receiver clock errors vary smoothly with time and fit the polynomial as well. For these reasons, the carrier phase measurements manifest themselves as a smooth curve when plotted with time (Hofmann-Wellenhof et al. 2003). This phenomenon, however, might be broken by cycle-slips. Driven by this idea, high-order carrier phase differencing and polynomial fitting techniques are developed for cycle-slip detection. Due to the simplicity in the implementation, the high-order differencing technique is adopted in this software package. An example for a third-order differencing between epochs is illustrated below:

where the operator \( \Updelta_{t}^{n} \) represents an n-order difference made on the carrier phase observables at epoch t. In the case of a stationary receiver and a short epoch interval, the remaining geometric term, and the atmospheric and clock errors, approach zero values after differencing. The high-order differenced phase measurements without cycle-slips should agree with a Gaussian distribution. The order of differencing depends on the observation interval, the quality of the carrier phase measurements, and so on. A general principle to determine the order is that a proper order should yield the differenced residuals significantly lower than that obtained from an order higher and an order lower.

Applying an n-order differencing at epoch t to the previous m epochs yields a data queue expressed by q(t) = \( \left[ {\Updelta_{t - m + 1}^{n} \Upphi_{Li} ,\;\Updelta_{t - m + 2}^{n} \Upphi_{Li} , \ldots ,\Updelta_{t}^{n} \Upphi_{Li} } \right] \). Following criteria may be considered in order to judge the occurrence of cycle-slips:

  1. (1)

    The standard deviations of q(t) should be statistically compatible with that of q(t − 1). The compatibility can be evaluated by checking whether or not the ratio of both standard deviations exceeds a threshold.

  2. (2)

    The current component\( \Updelta_{t}^{n} \Upphi_{Li} \) should agree with the mean value derived from q(t − 1). This maximal allowable deviation between both can be calculated adaptively or fixed by a constant value.

This algorithm employs only the phase data, and hence, it is less affected by multipath. However, it only applies to static scenarios or to antennas moving with very slight maneuvers.

Combination of carrier phase and code measurements

The geometry term in (2) can also be estimated using other measurements immune to cycle-slips. Concerning the GPS observations, this term can be estimated by code data:

$$ \Updelta R_{Li} = \Updelta \rho + \frac{{\lambda_{Li}^{2} }}{{\lambda_{L1}^{2} }}\Updelta I_{L1} + \Updelta T + \Updelta S + c \cdot \Updelta \tau_{r} + c \cdot \Updelta \tau_{s} + \Updelta e_{{Li,{\text{code}}}} + \Updelta M_{{Li,{\text{code}}}} $$
(4)

where R represents the code data. In comparison with (2), the difference in code observation equation lies in the opposite sign of ionospheric delay, the much larger thermal noise and multipath errors. Differencing (4) and (2) and rearranging give:

$$ \Updelta N_{Li} = \frac{{\lambda_{Li} \Updelta \Upphi_{Li} - \Updelta R_{Li} }}{{\lambda_{Li} }} + \varepsilon $$
(5)

This operation removes the geometry term and the other frequency-independent (or non-dispersive) terms, whereas it will enlarge the ionospheric error and introduce large thermal noise and potential multipath error from code data. The remaining errors are summarized by the term ε. The following condition judges the occurrence of a cycle-slip:

$$ \left| {\frac{{\lambda_{Li} \Updelta \Upphi_{Li} - \Updelta R_{Li} }}{{\lambda_{Li} }}} \right| > \varepsilon \quad {\text{if}}\;\Updelta N_{Li} \ne 0. $$
(6)

The a priori value of ε is determined according to the quality of code data and the potential multipath error in different application scenarios. A larger value will lower the sensitivity, whereas tuning it down to a small number might cause a wrong detection. This approach facilitates only a rough detection of cycle-slips. The minimal detectable size can be estimated by rounding \( \varepsilon /\lambda_{Li} \).

Dual-frequency carrier phase combination

Dual-frequency GPS receivers present a twofold superiority over single-frequency receivers for cycle-slip detection. Firstly, the geometry term ρ and the non-dispersive errors can be fully eliminated by a geometry-free phase combination. Secondly, the carrier phase measurements bring in much lower thermal noise and multipath error than code data. The geometry-free combination reads

$$ \lambda_{L1} \Updelta \Upphi_{L1} - \lambda_{L2} \Updelta \Upphi_{L2} = \lambda_{L1} \Updelta N_{L1} - \lambda_{L2} \Updelta N_{L2} - \frac{{\lambda_{L1}^{2} - \lambda_{L2}^{2} }}{{\lambda_{L1}^{2} }}\Updelta I_{L1} + \lambda_{L1} \Updelta e_{L1} + \lambda_{L2} \Updelta e_{L2} + \Updelta M_{L1} + \Updelta M_{L2} . $$
(7)

The multipath is actually a non-Gaussian error and is difficult to model explicitly. For the sake of simplicity, we could model the sum of multipath error and thermal noise as an “enlarged” Gaussian-form error, so that we have

$$ \lambda_{L1} \Updelta N_{L1} - \lambda_{L2} \Updelta N_{L2} = \lambda_{L1} \Updelta \Upphi_{L1} - \lambda_{L2} \Updelta \Upphi_{L2} + \frac{{\lambda_{L1}^{2} - \lambda_{L2}^{2} }}{{\lambda_{L1}^{2} }}\Updelta I_{L1} + \lambda_{L1} \Updelta \tilde{e}_{L1} + \lambda_{L2} \Updelta \tilde{e}_{L2} . $$
(8)

In order to adapt (8) to the cycle-slip detection, the ionospheric term should also be removed. If the observation interval is small enough, for example, less than 5 s, this term might be neglected due to its slight magnitude. In this case, the residual of a geometry-free combination without cycle-slips should obey a Gaussian error:

$$ \lambda_{L1} \Updelta \Upphi_{L1} - \lambda_{L2} \Updelta \Upphi_{L2} \sim N\left( {0,\sigma_{comb} } \right) \quad{\text{if}}\quad \, \Updelta N_{L1} = \Updelta N_{L2} = 0 \quad{\text{and}}\quad\Updelta I\;{\text{is}}\;{\text{ignored}} . $$
(9)

The signals can be assumed to have the same resolution in units of cycles, i.e., \( \sigma_{{L1,{\text{cycle}}}} = \sigma_{{L2,{\text{cycle}}}} \), where σ stands for the standard deviation of carrier phase thermal noise. Applying the variance propagation law to (8) yields \( \sigma_{\text{comb}} \) of (9):

$$ \sigma_{\text{comb}} \, = \, \sqrt 2\cdot \sqrt {\lambda_{L1}^{2} + \lambda_{L2}^{2} } \cdot \sigma_{{L1,{\text{cycle}}}} $$
(10)

where \( \sqrt 2 \) reflects the between-epoch differencing. Due to the potential multipath error, the thermal noise of carrier phase should be conservatively evaluated. The cycle-slips occurring either on L1 or L2 or both signals can be detected if the following condition holds:

$$ \left| {\lambda_{L1} \Updelta \Upphi_{L1} - \lambda_{L2} \Updelta \Upphi_{L2} } \right| > f \cdot \sigma_{\text{comb}} $$
(11)

where f is a multiplication factor determining the confidence level and set as 4 in the program source code.

A larger observation interval yields significant ionospheric variation between adjacent observation epochs. Nevertheless, the ionosphere delay follows a smooth variation under normal atmospheric conditions. A cycle-slip could result in a sudden jump in the estimated ionospheric error. Driven by this idea, a cycle-slip might be detected by comparing the current ionospheric variation with those obtained from the previous epochs. This approach is actually more reasonable than ignoring the ionospheric delay, but it needs to collect a certain number of epochs in order to derive the statistics of the between-epoch ionospheric variations.

Dual-frequency signals also allow a cycle-slip determination based on the fact that the removal of the “most likely” value of cycle-slips from the carrier phase raw data could yield the minimal residuals of geometry-free combination. A search space of cycle-slip candidates can be expressed in a similar form as presented in (Teunissen 1995):

$$ C = \left\{ {\left[ {\begin{array}{*{20}c} {\Updelta N_{L1} } & {\Updelta N_{L2} } \\ \end{array} } \right]^{T} \left| {\left[ {\begin{array}{*{20}c} {\Updelta N_{L1} - \Updelta \hat{N}_{L1} } \\ {\Updelta N_{L2} - \Updelta \hat{N}{}_{L2}} \\ \end{array} } \right]^{T} {\mathbf{Q}}_{{\mathbf{x}}}^{{{\mathbf{ - 1}}}} \left[ {\begin{array}{*{20}c} {\Updelta N_{L1} - \Updelta \hat{N}_{L1} } \\ {\Updelta N_{L2} - \Updelta \hat{N}{}_{L2}} \\ \end{array} } \right] \le \chi^{2} ;\left[ {\begin{array}{*{20}c} {\Updelta N_{L1} } \\ {\Updelta N_{L2} } \\ \end{array} } \right] \in \mathbb{Z}^{2} ;} \right. \left[ {\begin{array}{*{20}c} {\Updelta \hat{N}_{L1} } \\ {\Updelta \hat{N}_{L2} } \\ \end{array} } \right] \in \mathbb{R}^{2} } \right\} $$
(12)

where ΔN is the integer cycle-slip candidate to be searched; \( \Updelta \hat{N} \) is the associated float estimate, serving as the center of the search space; Q is the covariance matrix; and χ is the size of the search space. The most likely cycle-slip candidates ΔNL1 and ΔNL2 should fulfill the following relation:

$$ \lambda_{L1}^{2} \left( {\Updelta \Upphi_{L1} - \Updelta N_{L1} } \right)^{2} + \lambda_{L2}^{2} \left( {\Updelta \Upphi_{L2} - \Updelta N_{L2} } \right)^{2} \to \min $$
(13)

In other words, removing the cycle-slip candidates from the carrier phase raw data should make the “repaired” carrier phase data “most possibly” pass the cycle-slip detection. In the implementation, this model can be simplified by neglecting the covariance between cycle-slip candidates on both signals, so that we have a one-dimensional search space for each signal:

$$ \Updelta \hat{N}_{Li} - \delta_{Li} < \Updelta N_{Li} < \Updelta \hat{N}_{i} + \delta_{Li} ,\;i = 1, 2 $$
(14)

where \( \delta_{Li} \) is the width of the search space. The center and the width of the search space depend on the measurements used for the calculation of the float cycle-slip values. Possible measurements include the between-epoch code variation or Doppler data.

The methods based on geometry-free combination are quite sensitive to small cycle-slips and independent of the dynamics of the antenna. Nevertheless, a danger is hidden in these methods. If the cycle-slips occur simultaneously on both signals and the ratio of their sizes is close to the ratio of their own carrier frequencies, the left-hand side of (8) is then close to zero. As a result, these cycle-slips may not be found by the cycle-slip detection. However, we may benefit from other methods to detect these “insensitive” cycle-slips. For example, we can use code/phase combination to detect the cycle-slips on each signal, respectively, and integrate the results with the results delivered by the geometry-free phase combination.

Doppler data

Doppler data measure the variation rate of the carrier phase and have immunity to cycle-slips. A cycle-slip might break the agreement between the Doppler data and between-epoch carrier phase variation. This fact enables a straightforward detection of cycle-slips. The between-epoch carrier phase variation can be estimated by Doppler data according to the following relation:

$$ \Updelta \hat{\Upphi }_{Li} \left( t \right) = - \left[ {D_{Li} \left( t \right) + D_{Li} \left( {t - 1} \right)} \right] \times {\text{d}}t/2 $$
(15)

where D stands for the Doppler frequency measurements and dt is the sampling interval. The left-hand side of the equation can be obtained by differencing the carrier phase measurements of adjacent sampling epochs. By comparing the estimated and measured carrier phase variation, it is possible to identify the cycle-slips.

A receiver is generating the Doppler data with an internal (high-rate) frequency, whereas the RINEX observation file may only present the data sampled with a lower frequency. Let us refer the sampling interval of a RINEX observation file to as “RINEX sampling interval”. The shorter the RINEX sampling interval is, the more accurately the Doppler data could reflect the between-epoch variation of carrier phase. If the algorithms process a set of high-rate raw data with a large RINEX interval, it is recommended to derive the mean value of the original high-rate Doppler data instead of using the “sampled” Doppler data. The derived mean value can better reflect the averaged variation rate between RINEX sampling intervals and hence allow more accurate cycle-slip detection. An example is given in Fig. 1 to show different performance when processing a 20-Hz data set for a static experiment with different RINEX sampling intervals. As mentioned before, the between-epoch carrier phase variation can be, at one hand, directly obtained by differencing carrier phase measurements at adjacent epochs, and at the other hand, estimated with “sampled” Doppler data or with “averaged” Doppler data. The carrier phase measurements of the specific satellite have been confirmed as cycle-slip free, meaning that the Doppler data should present high compatibility with the carrier phase variation. In this circumstance, the compatibility also reflects the feasibility of this kind of Doppler data in the cycle-slip detection.

Fig. 1
figure 1

Compatibility test of Doppler data and carrier phase variation

From the curves, as well as the standard deviations presented in Fig. 1, it can be seen that the “averaged” Doppler data yield a significantly increased compatibility with respect to the raw carrier phase measurements, especially for a sampling interval of 5 s. This also means that the “averaged” Doppler data are preferably employed for cycle-slip detection. However, the software described here simply collects the data with the identified RINEX sampling intervals from a RINEX observation file and hence cannot perform the averaging.

The detectable size of cycle-slips using Doppler data could be accurate to one cycle in static scenarios with small sampling interval. A limitation consists in the degraded quality of the Doppler data under high dynamics. The application of this method is also limited due to the Doppler data not being output by many receivers.

Introduction of the software package

The programs are developed in MATLAB and cover the above-mentioned approaches. Two graphical user interfaces (GUI) are developed in order to simplify the operation, one for parameter setting and the other one for result display. The parameters to be configured in the GUI are related either to the GPS raw data or to the algorithms. Regarding the GPS raw data, a RINEX observation file must be identified. The user can also set the observation interval, the types of GPS measurements to use, and the GPS satellites which will be checked.

Each approach needs different related parameters to achieve the expected performance. These parameters are subject to the application scenarios and measurement qualities, and hence, they are preferably set by the user. For the sake of simplicity, some default values are given in advance. The GUI only allows the user to configure part of parameters. The other related parameters could be modified in the source code.

The software also allows the user to “manually” add some cycle-slips into the carrier phase raw data in order to test, debug, and improve the algorithms. These “synthetic” cycle-slips are added to the internal database rather than to the original RINEX data.

When all the parameters are properly assigned, the main program will first read and analyze the GPS raw data and then start with the cycle-slip detection. The program will only deal with the methods, the satellites, and the measurement types selected by the user. However, a method will not be invoked unless all necessary measurements are found. After the related results are generated, the program will open the next GUI to show the results.

The results will be illustrated according to the satellite and method selected by the user. The detected cycle-slips and the manually added cycle-slips will also be presented, so that the user can see whether the added cycle-slips are really detected. If the dual-frequency phase combination has been performed, the estimated cycle-slip sizes will also be presented.

The feasibility of each method will be roughly evaluated by checking the number of cycle-slips detected by this method. A frequent occurrence of cycle-slips probably indicates the infeasibility of the method with respect to the associated raw data. For example, applying the high-order phase differencing onto the raw data collected in a dynamic scenario might result in a large number of detected cycle-slips, whereas a phase combination method might judge the raw data as cycle-slip free. In this case, a warning will pop up to show the potential infeasibility of the method. More details can be seen from the user manual provided with the MATLAB software.

Conclusions

This software package implements several cycle-slip processing approaches in the measurement domain for GPS L1 and L2 signals. For those who are interested in GPS cycle-slip detention and repair, this software package might serve as a platform to test and improve the existing algorithms. The source code can be accessed via the website of GPS Toolbox (http://www.ngs.noaa.gov/gps-toolbox). The author would like to have any comments, suggestions, and critiques sent to zhen.dai@dlr.de.