**1. Introduction**

At present, five constellations of GNSS satellites are involved in the formation of observational data, which serve as a source for many applications related to navigation, geodesy, geodynamics, and in the performance of solving of many fundamental problems. These are American Global Positioning System (GPS), Russian Global Navigation Satellite System (GLONASS), European Galileo, Chinese BeiDou, and Japanese Quasi-Zenith Satellite System (QZSS). The satellites of each of the operating systems transmit signals, as a rule, on two L-band carriers, which are received by GNSS receivers. A large number of stations equipped with GNSS receivers and located around the World are part of the International GNSS Service (IGS) network. These stations generate observation data files and transmit them to international databases in real time [1, 2], after which these data become available for use by many institutions and laboratories over the World. When solving

applications, the measurement data go through various processing steps. Significant element of the data processing is the detection of rough measurements and removal them from the further processing. Despite the fact that many of the laboratories use a high-end application of the software regarding accuracy, reliability, and robustness, the presence of rough measurements in the observational data excludes the possibility of obtaining an accurate final result. In order to obtain results of unprecedented accuracy, the measurement data must be cleared of coarse measurements or outliers. It should be noted that the concept of outliers is key in the measurement processing theory [3], and there is no general definition for it. In order to distinguish outliers from the rest of the measured data, in some cases, the deviation of the data series values from some average value of the data is considered. If the deviation from the average is exceeded by a predetermined threshold value, the measured value is considered as an outlier. Such an approach has a significant disadvantage that the exact mean is generally unknown, and the estimate obtained by averaging a series may be very inaccurate due to outliers. Existing iterative procedures are also based on the idea of calculating deviation from the average and often result in the unjustified rejection of many observations. Reducing the data involved in processing may, in turn, result in a loss of accuracy of the final result.

This chapter describes the outliers cleaning algorithm for GNSS data. The proposed algorithms are based on the search for the so-called optimal solution with the minimum amount of invalidly rejected data. The algorithm for accelerated detection of outliers in a large amount of measurements has been developed, as well as an algorithm for detecting outliers in data containing an unknown trend. In conclusion, the algorithm of jump detection in the Melbourne-Wübbena combination [3–5], including the developed procedure of cleaning data from outliers, is considered.

In Section 2, the problem of searching for the so-called optimal solution is formulated. Section 3 provides a search algorithm, with a common number of arithmetic operations not exceeding �N<sup>2</sup> . Section 4 presents the test results for actual measurements in global navigational satellite systems at two carrier frequencies. The searching of outliers was performed in the Melbourne-Wübbena combination. In Section 5, the assertions that are the mathematical prerequisites for justifying a fast outlier search algorithm are proved. In Section 6, the fast outlier detection algorithm with the number of arithmetic operations of Nlog2N is proposed. Section 7 describes the case of data with unknown trend. Iterative procedure of outlier search is proposed based on the finding of suitable trend approximation in polynomials class. The idea of excluding coarse measurements is based on finding a so-called minimizing set of measurement data of a given length. This distinguishes the proposed algorithm from known similar procedures in which outliers are detected by exceeding a preset threshold. The test results with simulated data are given. Sections 8 and 9 discuss the problem of detecting jumps in the Melbourne-Wübbena combination. An algorithm is proposed that includes the outlier cleaning procedure based on the search for the optimal solution. Section 10 shows the numerical calculations with real data for algorithms presented in Sections 3–9. Section 11 concludes the chapter.

#### **2. Statement of the problem: a Melbourne-Wübbena combination**

Often, measurements yj taken at moments of time j can be presented in the form:

$$\mathbf{y}\_{\mathbf{j}} = \mathbf{f}\_{\mathbf{j}} + \mathbf{z} + \xi\_{\mathbf{j}}; \mathbf{j} = \mathbf{1} \dots \mathbf{N},\tag{1}$$

#### *Effective Algorithms for Detection Outliers and Cycle Slip Repair in GNSS Data Measurements DOI: http://dx.doi.org/10.5772/intechopen.92658*

where fj is a trend function, depending on physical process and as a rule is unknown, the sum z þ ξ *<sup>j</sup>* is unknown random variable imposed on the trend with unknown constant z and a centered random variable ξ *<sup>j</sup>* .

Detection of outliers in data series expressed in Eq. (1) with unknown trend is uncertain since the concept of measurement or outliers itself is uncertain. In many cases, however, the trend function is known a priori.

For example, many data processing programs often use different linear combinations formed of code and phase measurement data to eliminate unknown parameters. One such combination is the Melbourne-Wübbena combination composed of both, carrier phase and code observables as described by Melbourne [4] and Wübbena [5]. This combination eliminates the effect of the ionosphere, the geometry, the clocks, and the troposphere [3], and it is often used to detect loss of carrier phase capture in the preprocessing stages. The Melbourne-Wübbena combination generated for a specific satellite-receiver pair can be presented in the form of the sum of three terms [6]. One of the terms includes the integer wide-lane ambiguity for the two carrier frequencies [3]; the second component accounts for the satellite and receiver instrumental delays; and the third component is the measurement noise, including carrier phase and code multipath. Thus, during a time interval where the integer wide-lane ambiguity does not change, the Melbourne-Wübbena combination can be written as formula (1) with fj ¼ const.

Another example is satellite clock correction values derived from navigation message data, which can also be represented as in Eq. (1) with fj ¼ dj þ a, where *d* and *a* are the drift and offset parameters known from navigation data, respectively. In the case where the trend is known, the measurement data after the trend subtraction can be represented as, assuming N observations:

$$\mathbf{y}\_{\mathbf{j}} = \mathbf{z} + \xi\_{\mathbf{j}}; \mathbf{j} = \mathbf{1} \dots \mathbf{N}, \tag{2}$$

with an unknown constant z, which we cannot be determined in advance, because the random value ξ *<sup>j</sup>* is not known and may contain outliers.

In Sections 2–6, we consider the case where the trend is known a priori, that is, the data can be presented as Eq. (2). A problem with an unknown trend will be discussed in Section 7. In principle, the outlier detection procedure described below is not affected by the measurement format expressed in Eq. (1) or (2); it can be applied to any set of data measurements yj .

The preliminary processing task includes rejection of rough measurements or outliers from data series (2). In other words, it is necessary to find a set YL ¼

yj 1 , … , yj L n o of *<sup>L</sup>* elements, where *<sup>L</sup>* is the length for which the following conditions are satisfied:

$$
\sigma \mathbf{y}\_{\mathbb{L}} = \sqrt{\left(\mathbf{L} - \mathbf{1}\right)^{-1} \sum\_{\mathbf{j} \in \left\{\mathbf{j}\_{\mathbb{L}}, \dots, \mathbf{j}\_{\mathbb{L}}\right\}} \left(\mathbf{y}\_{\mathbb{j}} - \mathbf{z}\right)^{2}} \le \sigma\_{\text{max}},\tag{3}
$$

$$\left|\mathbf{y}\_{\mathbf{j}} - \mathbf{z}\right| \le \mathbf{3} \cdot \sigma\_{\text{max}}; \mathbf{y}\_{\mathbf{j}} \in \left\{ \mathbf{y}\_{\mathbf{j}\_1}, \dots, \mathbf{y}\_{\mathbf{j}\_L} \right\},\tag{4}$$

$$L \ge \text{MINOBS},\tag{5}$$

where σYL and σmax are the standard deviation (SD) and their associated specified threshold values; MINOBS is a parameter limiting from below the length of the required set of measured values (e.g., 10), and we will assume hereafter that MINOBS < *N*.

The values yj that are not included in the set YL are treated as coarse measurements and removed from further processing. Typically, expressions in Eqs. (3)–(5) are the only conditions considered in processing programs when screening out rough measurements. Below we will formulate the problem of searching for a solution, complementing the conditions expressed in Eqs. (3)–(5) with two extreme conditions [7].

1. First, we will require that the length of the set sought be the maximum, that is, the number of measurements deemed to be coarse is the minimum:

$$\mathbf{L} \to \mathbf{max} \,. \tag{6}$$

Note that for the predetermined values yj , the problem solution satisfying conditions in Eqs. (3)–(5) may not exist (e.g., when yj includes a trend, in particular when yj is an arithmetic progression with a step greater than σmax). In the case when the solution does exist, we will denote the value L at which the maximum of Eq. (6) is reached as Lmax. Note that the condition expressed in Eq. (6) does not ensure the uniqueness of the set because several sets of length Lmax can be found that satisfy the conditions in Eqs. (3)–(5).

2. From all possible sets that satisfy conditions expressed in Eqs. (3)–(5) and (6), we will select the one for which the variable σYL receives the smallest value:

$$\begin{aligned} \mathsf{op}\_{\mathsf{I}\_{\mathsf{L}}} \xrightarrow[\mathsf{Y}\_{\mathsf{I}\_{\mathsf{I}}}]{} \mathtt{\qquad} \mathbf{min} \xrightarrow[\mathsf{I}\_{\mathsf{max}}]{} \mathtt{min} \, . \end{aligned} \tag{7}$$

Let us define Yopt as follow:

**Definition 1**. *For a given sequence of values y <sup>j</sup> , j = 1, 2, … N, the set of values:*

$$\mathbf{Y}\_{\rm opt} = \left\{ \mathbf{y}\_{\mathbf{j}\_1}, \dots, \mathbf{y}\_{\mathbf{j}\_{\rm L\_{\max}}} \right\}, \tag{8}$$

*satisfying conditions in Eqs. (3)–(7), we refer to as the optimal solution of the problem expressed in Eqs. (3)*–*(7). The corresponding SD value is denoted by* σ*opt.*

Thus, the problem consists in the creation of a search algorithm for the optimal solution of the problem shown in Eqs. (3)–(7).

In a practical situation, the precise value z, given conditions in Eqs. (3) and (4), is not known. We will estimate the values using the following formula:

$$\mathbf{z} = \mathbf{L}^{-1} \sum\_{\mathbf{j} \in \{\mathbf{j}\_1, \dots, \mathbf{j}\_L\}} \mathbf{y}\_{\mathbf{j}}.\tag{9}$$

Note that the value *z* depends on the required solution, which will complicate its search.

Usually, iterative methods are used to find a solution to problem expressed in Eqs. (3)–(5). For example, the algorithm implemented in the observation data smoothing program (see [3]) is designed to find a set Y satisfying the conditions given by Eqs. (3)–(5). The proposed step-by-step algorithm is based on iterations (the index number of iteration is designated by the upper index in parentheses):

Step 1: Initialization: *<sup>Y</sup>*ð Þ <sup>0</sup> <sup>¼</sup> *<sup>y</sup>*1, … , *yN* � �; *Level*ð Þ <sup>0</sup> <sup>¼</sup> <sup>10</sup>20; k = 0.

Step 2: Checking the length of the set *Y*ð Þ*<sup>k</sup>* ; if it is less than MINOBS, then the process comes to an end and a solution is not found.

*Effective Algorithms for Detection Outliers and Cycle Slip Repair in GNSS Data Measurements DOI: http://dx.doi.org/10.5772/intechopen.92658*

Step 3: Calculation of the values *z*ð Þ*<sup>k</sup>* and σð Þ*<sup>k</sup>* on the available set *Y*ð Þ*<sup>k</sup>* using formulas (3) and (9).

Step 4: Checking the fulfillment of the inequality σð Þ*<sup>k</sup>* ≤ σmax. If it is satisfied, the set *Y*ð Þ*<sup>k</sup>* is accepted as the solution, and the search process comes to an end. Otherwise, there is a transition to Step 5.

Step 5: Definition of *Level*ð Þ *<sup>k</sup>*þ<sup>1</sup> for outlier detection:

$$Level^{(k+1)} = \mathbf{3} \cdot \boldsymbol{\sigma}^{(k)};$$

In order to prevent an infinite loop of iterations, a required verification is carried out:

$$Level^{(k+1)} < Level^{(k)}.$$

If this inequality is not satisfied, then the following is assumed:

$$Level^{(k+1)} = Level^{(k)} / 2;$$

Step 6: Definition of a new set *Y*ð Þ *<sup>k</sup>*þ<sup>1</sup> to include those and only those *y <sup>j</sup>* for which

$$\left|\mathcal{y}\_j - \mathbf{z}^{(k)}\right| \le L\varepsilon \nu \mathrm{el}^{(k+1)}.$$

Step 7: Increasing k by 1: k++. Transition to Step 2.

Note that the optimal solution cannot be found in such a manner, as confirmed by numerical calculations (see Section 4).

#### **3. Algorithm for solving the problem**

Let us formulate a statement that is the key to the creation of an effective search algorithm for the optimal solution (Eqs. (3)–(7)).

**Assertion 1.** *Let the set Yopt* ¼ *y <sup>j</sup>* 1 , … , *y <sup>j</sup> <sup>L</sup>* max � � *be optimal for a specified sequence of values y <sup>j</sup>* n o *and*

$$\mathcal{Y}\_{\min} = \min \left\{ \mathcal{Y}\_{j\_1}, \dots, \mathcal{Y}\_{j\_{\mathcal{L}\_{\max}}} \right\}, \\ \mathcal{Y}\_{\max} = \max \left\{ \mathcal{Y}\_{j\_1}, \dots, \mathcal{Y}\_{j\_{\mathcal{L}\_{\max}}} \right\},$$

*then the interval y*min, *<sup>y</sup>*max � � *does not contain values y <sup>j</sup> that are not in the set Yopt.*

**Proof.** In fact, let us assume the opposite: Let *y <sup>j</sup>* ∉ *Yopt*, *y*min <*y <sup>j</sup>* < *y*max and *yk* and *yl* be values from the set Yopt for which *yk* = *y*min and *yl* = *y*max. One of these cases is possible:

$$\begin{aligned} \text{a. } z < \boldsymbol{y}\_j \text{ and, therefore } 0 < \left(\boldsymbol{y}\_j - \boldsymbol{z}\right) < \left(\boldsymbol{y}\_l - \boldsymbol{z}\right) = \boldsymbol{>} \left(\boldsymbol{y}\_j - \boldsymbol{z}\right)^2 < \left(\boldsymbol{y}\_l - \boldsymbol{z}\right)^2, \\\\ \text{b. } z \ge \boldsymbol{y}\_j \text{ and, therefore } 0 \le \left(\boldsymbol{z} - \boldsymbol{y}\_j\right) < \left(\boldsymbol{z} - \boldsymbol{y}\_k\right) = \boldsymbol{>} \left(\boldsymbol{y}\_j - \boldsymbol{z}\right)^2 < \left(\boldsymbol{y}\_k - \boldsymbol{z}\right)^2. \end{aligned}$$

**181**

In the first case, Case (a), we replace the value *yl* in the set Yopt with *y <sup>j</sup>* . In the second case, Case (b), we replace *yk* with *y <sup>j</sup>* . In any of the cases, we will have another set of the same length Lmax for which conditions expressed in Eqs. (3) and (4) are satisfied, but the SD, as follows from Eq. (3), is less than σopt. Consequently, the set Yopt is not optimal since requirement expressed in Eq. (7) is not satisfied. The contradiction that is reached proves Assertion 1.

Further, note that if Yopt ¼ yj 1 , … , yj <sup>L</sup> max � � is the optimal solution of the problem given by Eqs. (3)–(7), then an arbitrary permutation of the numbers yj 1 , … , yj <sup>L</sup> max will also be the optimal solution of the problem described by Eqs. (3)–(7). Thus, the optimal solution does not depend on the arrangement of given numbers yj . This allows us to arrange the numbers yj in the order most suitable for searching the optimal solution. Taking advantage of this important circumstance, we arrange the values yj n o in the ascending order and we will look for the optimal solution in the ordered sequence. For brevity, the ordered sequence will also be denoted by yj n o. Thus, y1 <sup>≤</sup> y2 <sup>≤</sup> … <sup>≤</sup> yN. Moreover, for simplicity of logic, we will assume that all yj are different, that is,

$$\mathbf{y}\_1 < \mathbf{y}\_2 < \dots < \mathbf{y}\_N \tag{10}$$

Note that due to the formulated Assertion 1, if Yopt is the optimal set and *y <sup>j</sup>* 1 and *y j <sup>L</sup>* max are its smallest and greatest values, respectively, then all values of yj from the interval *y <sup>j</sup>* 1 , *y <sup>j</sup> <sup>L</sup>* max � � belong to Yopt. Consequently, considering Eq. (10), we have yj <sup>L</sup> max ¼ yj <sup>1</sup>þ<sup>L</sup> max �<sup>1</sup> and

$$\mathbf{Y\_{opt}} = \left\{ \mathbf{y\_{j\_1}}, \mathbf{y\_{j\_1+1}}, \dots, \mathbf{y\_{j\_1+L\_{\max}-1}} \right\}^\perp$$

Thus, the optimal solution should be sought in the ascending sequence yj among all possible sets *yk*, … , *yk*þ*L*�<sup>1</sup> � � of length L with k and L satisfying the following conditions:

$$\text{MINOBS} \leq L \leq \text{N},\tag{11}$$

$$\mathbf{1} \le \mathbf{k} \le N - L + \mathbf{1}.\tag{12}$$

Hence, instead of searching for all possible sets of various length, numbering 2N, for the solution of the problem described by Eqs. (3)–(7), it is sufficient to vary just the two parameters, *k* and *L*, associated with the conditions expressed in Eqs. (11) and (12). The number of pairs of integer numbers *k* and *L* subject to condition in Eqs. (11) and (12) is equal to:

 $(\mathbf{N} - \text{MINOBS})(\mathbf{N} - \text{MINOBS} + \mathbf{1})/2$ .

Let L ¼ *l* � k þ 1 be the length of an arbitrary set yk, … , y*<sup>l</sup>* � �. We introduce the designations:

$$\mathbf{z}(\mathbf{k}; \mathbf{L}) = \frac{\mathbf{1}}{\mathbf{L}} \sum\_{\mathbf{j=k}}^{\mathbf{k}+\mathbf{L}-1} \mathbf{y}\_{\mathbf{j}},\tag{13}$$

*Effective Algorithms for Detection Outliers and Cycle Slip Repair in GNSS Data Measurements DOI: http://dx.doi.org/10.5772/intechopen.92658*

$$\sigma^2(\mathbf{k}; \mathbf{L}) = \frac{1}{\mathbf{L} - \mathbf{1}} \sum\_{\mathbf{j} = \mathbf{k}}^{\mathbf{k} + \mathbf{L} - \mathbf{1}} \left( \mathbf{y}\_{\mathbf{j}} - \mathbf{z}(\mathbf{k}; \mathbf{L}) \right)^2. \tag{14}$$

We rewrite conditions given by Eqs. (3) and (4) in the new designations:

$$
\sigma^2(\mathbf{k}; \mathbf{L}) \le \sigma\_{\text{max}}^2,\tag{15}
$$

$$\begin{cases} \mathbf{y}\_{\mathbf{k}+\mathbf{L}-1} - \mathbf{z}(\mathbf{k}; \mathbf{L}) \le \mathbf{3} \cdot \boldsymbol{\sigma}\_{\max} \\ \quad \mathbf{z}(\mathbf{k}; \mathbf{L}) - \mathbf{y}\_{\mathbf{k}} \le \mathbf{3} \cdot \boldsymbol{\sigma}\_{\max} \end{cases} \tag{16}$$

Note that the two last inequalities directly follow from Eq. (4), monotony of yj , and obvious inequalities: yk <sup>≤</sup> z k; L ð Þ <sup>≤</sup> ykþL�1.

**Remark.** *In the conditions expressed in Eqs. (15) and (16), L means the length of the set under checking, and k is the index of the smallest number included in the set. Although "k" and "L" are also encountered as indexes in the sets we use below for monotonically increasing sequences, we hope nevertheless that this will not lead to confusion.*

The following recursive relationships are available, making it possible to find z k; L ð Þ and <sup>σ</sup><sup>2</sup>ð Þ k; L through the calculated values z k; L ð Þ <sup>þ</sup> <sup>1</sup> <sup>и</sup> <sup>σ</sup><sup>2</sup>ð Þ k; L <sup>þ</sup> <sup>1</sup> for seven arithmetic operations:

$$\mathbf{z}(\mathbf{k};\mathbf{L}) = \mathbf{z}(\mathbf{k};\mathbf{L}+\mathbf{1}) + \mathbf{A}\_{\mathbf{L}+\mathbf{1}} \cdot \left(\mathbf{z}(\mathbf{k};\mathbf{L}+\mathbf{1}) - \mathbf{y}\_{\mathbf{k}+\mathbf{L}}\right),\tag{17}$$

$$
\sigma^2(\mathbf{k}; \mathbf{L}) = \mathbf{B}\_{\mathbf{L}+1} \cdot \sigma^2(\mathbf{k}; \mathbf{L}+\mathbf{1}) - \mathbf{C}\_{\mathbf{L}+1} \cdot \left(\mathbf{y}\_{\mathbf{k}+\mathbf{L}} - \mathbf{z}(\mathbf{k}; \mathbf{L}+\mathbf{1})\right)^2,\tag{18}
$$

$$\mathbf{A}\_{\rm L} = \frac{\mathbf{1}}{\mathbf{L} - \mathbf{1}}; \mathbf{B}\_{\rm L} = \frac{\mathbf{L} - \mathbf{1}}{\mathbf{L} - \mathbf{2}}; \mathbf{C}\_{\rm L} = \frac{\mathbf{L}}{(\mathbf{L} - \mathbf{1})(\mathbf{L} - \mathbf{2})}. \tag{19}$$

The values of the fractions may be computed in advance as elements of a onedimensional array. Analogously, the following formulas can make it possible to express z kð Þ <sup>þ</sup> 1; L and <sup>σ</sup><sup>2</sup>ð Þ <sup>k</sup> <sup>þ</sup> 1; L through z k; L ð Þ and <sup>σ</sup><sup>2</sup>ð Þ k; L :

$$\mathbf{z}(\mathbf{k}+\mathbf{1};\mathbf{L}) = \mathbf{z}(\mathbf{k};\mathbf{L}) + \mathbf{A}\_{\mathbf{L}+\mathbf{1}} \cdot (\mathbf{y}\_{\mathbf{k}+\mathbf{L}} - \mathbf{y}\_{\mathbf{k}}),\tag{20}$$

$$\sigma^2(\mathbf{k}+\mathbf{1};\mathbf{L}) = \sigma^2(\mathbf{k};\mathbf{L}) + \mathbf{A}\_{\mathbf{L}+1} \cdot \left(\mathbf{y}\_{\mathbf{k}+\mathbf{L}} - \mathbf{y}\_{\mathbf{k}}\right) \left(\mathbf{y}\_{\mathbf{k}+\mathbf{L}} - \mathbf{z}(\mathbf{k};\mathbf{L}) + \mathbf{D}\_{\mathbf{L}+1} (\mathbf{y}\_{\mathbf{k}} - \mathbf{z}(\mathbf{k};\mathbf{L})) \right), \tag{21}$$

$$\mathbf{D}\_{\rm L} = \frac{\mathbf{L}}{\mathbf{L} - \mathbf{2}}.\tag{22}$$

The algorithm described below is based on the search for all possible pairs (k, L), where L denotes the length of the set to be checked and k is the index of the smallest of the values included in the set. At that, k and L must satisfy conditions Eqs. (11) and (12). The set yk, … , ykþL�<sup>1</sup> � � corresponding to each such pair must be checked for fulfillment conditions (15) and (16).

We organize this search according to the algorithm described below, at each step of which we check the validation of Eqs. (15) and (16) for all possible sets of a certain length. We start the examine process with Step 1, where we check the set of maximum length N. Further, with each next step, we will reduce the length of the sets to be checked by 1.

Step 1: We consider the set of length N. There is only one such set: y1, … , yN � �. We check it for fulfillment conditions expressed in Eqs. (15) and (16). If they are satisfied, this set is selected as a solution, and further search stops. Otherwise, transit to Step 2.

Step 2: We consider the sets of length N � 1. There are two sets of length N � 1.

$$\{\mathbf{y}\_1, \dots, \mathbf{y}\_{N-1}\} \text{ and } \{\mathbf{y}\_2, \dots, \mathbf{y}\_N\}.$$

We test each of these sets for compliance with the conditions specified by Eqs. (15) and (16). If none of them satisfies conditions (15) and (16), then we transit to the next step. Otherwise, the following options are available:


Step N � L + 1: We consider the sets of length L. If L < MINOBS, then the search process stops, and a solution is not found. For L ≥ MINOBS, we examine N � L+1 sets of length L:

$$\{\mathbf{y}\_1, \dots, \mathbf{y}\_L\}, \{\mathbf{y}\_2, \dots, \mathbf{y}\_{L+1}\}, \dots, \{\mathbf{y}\_{N-L+1}, \dots, \mathbf{y}\_N\}.\tag{23}$$

We check each of these sets for fulfillment of conditions (15) and (16). If any of them does not satisfy these conditions, then we transit to the next step where we consider the sets of length (L � 1). Otherwise, two options are possible:


In order to calculate the values z k, L ð Þ and <sup>σ</sup><sup>2</sup>ð Þ k, L , we use the recursive formulas (17)–(22) in accordance with a search scheme shown in **Figure 1** where only the z k, L ð Þ is involved.

In accordance with the proposed arrangement, we calculate the values z 1; N ð Þ and <sup>σ</sup><sup>2</sup>ð Þ 1; N in the first step of the algorithm using formulas expressed in Eqs. (13) and (14), and 4 *N* arithmetic operations are required for this arrangement. In order to find z k, L ð Þ and <sup>σ</sup><sup>2</sup>ð Þ k, L on all subsequent steps, we apply the recursive formulas (17)–(22), making it possible to calculate the values of the specified pairs of

$$\begin{array}{ccccc}\text{Step Number} & & & & \\ \texttt{I}: & & & \texttt{z}(\texttt{1},\texttt{N}) & & \\ & & & \downarrow\texttt{i} & & \\ & & & \downarrow\texttt{i} & & \\ \texttt{z}: & & \vdots & & \vdots & \\ & & & \downarrow\texttt{i} & & \\ & & & \downarrow\texttt{i} & & \\ \texttt{N}:\texttt{L}+\texttt{i}: & \texttt{z}(\texttt{1},\texttt{L}) & \rightarrow & \texttt{z}(\texttt{2},\texttt{L}) & \cdots & \rightarrow & \texttt{z}(\texttt{N}\cdot\texttt{L}+\texttt{1},\texttt{L}) \\ & & & \vdots & & \vdots & & \end{array}$$

**Figure 1.** *Scheme of calculations when finding the optimal solution.* *Effective Algorithms for Detection Outliers and Cycle Slip Repair in GNSS Data Measurements DOI: http://dx.doi.org/10.5772/intechopen.92658*

variables, each for the seven arithmetic operations, based on the results of the calculations of the preceding step. So, for example, on the second step, proceeding from the known values z 1; N ð Þ and <sup>σ</sup>2ð Þ 1; N , we find the values z 1; N ð Þ � <sup>1</sup> and <sup>σ</sup>2ð Þ 1; N � <sup>1</sup> (vertical arrow on the diagram) by using formulas in Eqs. (17)–(19) and the values <sup>σ</sup>2ð Þ 2; N and <sup>σ</sup>2ð Þ 2; N (horizontal arrow on the diagram) by using Eqs. (20)–(22). In the general case, the transition to the following step in the direction of the vertical arrows (see diagram) is carried out according to formulas (17)–(19), and in the direction of horizontal arrows, according to formulas (20)–(22). The number of arithmetic operations required to find the solution should not exceed:

$$4\text{N} + \Re((\text{N} - \text{L}\_{\text{max}} + \text{2})(\text{N} - \text{L}\_{\text{max}} + \text{1})/2 - \text{1})\tag{24}$$

In the above number of computations, the computational costs of verifying the satisfaction of inequalities (15) and (16) are also considered, which comprise from 0 to 2 arithmetic operations.
