A Dual Frequency Carrier Phase Error Difference Checking Algorithm for the GNSS Compass

The performance of the Global Navigation Satellite System (GNSS) compass is related to the quality of carrier phase measurement. How to process the carrier phase error properly is important to improve the GNSS compass accuracy. In this work, we propose a dual frequency carrier phase error difference checking algorithm for the GNSS compass. The algorithm aims at eliminating large carrier phase error in dual frequency double differenced carrier phase measurement according to the error difference between two frequencies. The advantage of the proposed algorithm is that it does not need additional environment information and has a good performance on multiple large errors compared with previous research. The core of the proposed algorithm is removing the geographical distance from the dual frequency carrier phase measurement, then the carrier phase error is separated and detectable. We generate the Double Differenced Geometry-Free (DDGF) measurement according to the characteristic that the different frequency carrier phase measurements contain the same geometrical distance. Then, we propose the DDGF detection to detect the large carrier phase error difference between two frequencies. The theoretical performance of the proposed DDGF detection is analyzed. An open sky test, a manmade multipath test and an urban vehicle test were carried out to evaluate the performance of the proposed algorithm. The result shows that the proposed DDGF detection is able to detect large error in dual frequency carrier phase measurement by checking the error difference between two frequencies. After the DDGF detection, the accuracy of the baseline vector is improved in the GNSS compass.


Introduction
The Global Navigation Satellite System (GNSS) compass is an attitude indicator based on the theory of carrier phase relative positioning [1]. It is also known as the GNSS attitude determination or GNSS heading determination [2,3]. It is inexpensive and does not have the problem of divergence compared with the traditional Inertial Navigation System (INS) attitude determination. In the early days, the carrier phase integer ambiguity resolution was the bottleneck of the GNSS compass. The integer ambiguity needed a long time to be initialized [4]. Nowadays, as the integer ambiguity resolution algorithms have developed, initialization is no longer a problem, especially after the Least-squares AMBiguity Decorrelation Adjustment (LAMBDA), Constrained-LAMBDA and Multivariate Constrained-LAMBDA methods were proposed [5][6][7]. Now, the GNSS compass is widely used in automobiles, ships, airplanes and many other applications [5,8].
Another key technique of the GNSS compass besides integer ambiguity resolution is how to improve its accuracy. It is proven that the GNSS compass accuracy is related to the carrier phase measurement quality for a certain baseline length [9]. Most of the GNSS carrier phase error sources are has large multipath or carrier phase noise is detected according to the theoretical threshold. The carrier phase measurement that does not pass the DDGF detection will be eliminated by weighted estimation.
The rest of this paper is organized as follows: in Section 2, the principle of the proposed dual frequency carrier phase error difference checking algorithm is described. Section 3 presents the theoretical performance of the proposed algorithm. In Section 4, the experiment results, including the open sky test, manmade multipath test and urban vehicle test, are demonstrated and discussed. The conclusions are presented in Section 5.

Double-Differenced Carrier Phase Measurement Model
GNSS carrier phase relative positioning needs two receivers, respectively named "base" and "rover". The carrier phase measurement observed by the two receivers at a certain epoch can be written as [35]: where φ is the carrier phase measurement (unit: cycle), λ is the carrier wavelength (unit: m), r represents the true geographical distance between the satellite and the receiver (unit: m), I is the ionospheric delay (unit: m), T is the tropospheric delay (unit: m), f is the carrier frequency (unit: Hz), δt is the receiver clock error (unit: s), dt is the satellite clock error (unit: s), N is the integer ambiguity (unit: cycle) and ε is the residual errors mainly including carrier phase noise and multipath (unit: cycle). Subscripts b and r respectively represent the base and the rover receiver. Subscript k is the identifier for different frequencies, and k ∈ 1, 2 for dual frequency case. Superscript i represents the satellite #i. The Single-Differenced (SD) measurement model can be obtained by subtracting the base receiver's measurements from the rover receiver's measurements, namely Equations (1) and (2). φ i rb,k = λ −1 k r i rb,k − I i rb,k + T i rb,k + f k δt rb,k + N i rb,k + ε i rb,k where the subscript "rb" represents the difference between the rover and base receiver. It can be seen that dt i k as a common error is eliminated by single differencing. Then, choosing the j-th satellite with the highest elevation angle as the reference and the Double Differenced (DD) carrier phase between the reference and other satellites can be obtained as follows: where the superscript "ij" represents the carrier phase measurement of the i-th satellite minus that of the j-th (reference) satellite. δt rb,k is the same for different satellite, so it can be eliminated by double differencing. I ij rb,k and T ij rb,k are related to the baseline length [36]. In GNSS compass model (the baseline length is several meters), I ij rb,k and T ij rb,k are nearly zero. Therefore, Equation (4) can be rewritten as: N ij rb,k is the DD integer ambiguity. It is the unknown cycles in the DD carrier phase. It can be resolved by various algorithms, and it is relatively easy for the GNSS compass, as the baseline is short. In this work, we choose the popularly-used LAMBDA method [6,37] to resolve the integer ambiguity Sensors 2016, 16, 1988 4 of 21 and assume that the integer ambiguity in the following DD carrier phase is resolved and removed. The DD carrier phase after the integer ambiguity resolution can be expressed as: where ϕ is the carrier phase without integer ambiguity.
Once the integer ambiguity is resolved, the DD carrier phase becomes a highly precise measurement including geographical distance, carrier phase noise and multipath. Geographical distance is the useful information to calculate the baseline vector. Multipath and carrier phase noise are the useless components that will influence the accuracy of the baseline vector. Therefore, processing the carrier phase noise and multipath are the key to improving the positioning accuracy further.

Double Differenced Geometry Free Detection
From Equation (6), it is clear that after the integer ambiguity is resolved, the DD carrier phase measurement contains the geographical distance, multipath and carrier phase noise in the GNSS compass model. Dual frequency DD carrier phase measurement has exactly the same geographical distance. We define the double-differenced geometry free (DDGF) measurement by subtracting the geographical distances in the dual frequency DD carrier phase: where Φ ij DDGF and ε ij DDGF are the DDGF measurement (unit: m) and DDGF residual error (unit: m). The geographical distances of dual frequency DD carrier phase measurement are the same, namely r ij rb,1 = r ij rb,2 . Equation (7) can be rewritten as: From Equation (8), it is clear that DDGF measurement is supposed to be zero and only contains carrier phase error. The residual error is actually the error difference between two frequencies. Based on that characteristic, we design the DDGF detection by comparing the DDGF measurement and its theoretical estimation. Figure 1 shows the relationship between the DDGF detection and the GNSS carrier phase error sources. The GNSS carrier phase correlated error sources, such as satellite clock error, receiver clock error, ephemeris error, ionosphere delay and troposphere delay, can be eliminated by the differencing technique. DDGF detection is done to process the uncorrelated error sources, including multipath and carrier phase noise. In this work, we divide the carrier phase noise into three parts: Phase Lock Loop (PLL) thermal noise, Allan deviation oscillator phase noise and motion-based noise. Each part is estimated separately.
The theoretical magnitude of carrier phase and multipath can be estimated according to the receiver's parameters. The thermal noise for an arctangent PLL is computed as follows [4,19]: where σ PLLt is the standard deviation of the PLL thermal noise (unit: cycle), B n is the carrier loop noise bandwidth (unit: Hz), C/N 0 is the carrier to noise power expressed as a ratio (unit: dB-Hz) and T is the pre-detection integration time (unit: seconds). The Allan deviation oscillator phase noise of the third-order loop is [10]: Sensors 2016, 16, 1988 5 of 21 where σ A3 is the standard deviation of the Allan deviation oscillator phase noise (unit: cycle) and σ 2 A (τ) represents the Allan deviation.
carrier phase error. The residual error is actually the error difference between two frequencies. Based on that characteristic, we design the DDGF detection by comparing the DDGF measurement and its theoretical estimation. Figure 1 shows the relationship between the DDGF detection and the GNSS carrier phase error sources. The GNSS carrier phase correlated error sources, such as satellite clock error, receiver clock error, ephemeris error, ionosphere delay and troposphere delay, can be eliminated by the differencing technique. DDGF detection is done to process the uncorrelated error sources, including multipath and carrier phase noise. In this work, we divide the carrier phase noise into three parts: Phase Lock Loop (PLL) thermal noise, Allan deviation oscillator phase noise and motion-based noise. Each part is estimated separately.   The motion-based phase noise includes vibration-induced oscillator phase noise, dynamic stress error and reference oscillator acceleration stress error. The multipath and motion-based carrier phase noise is relatively hard to model. It depends on the motion of the receiver and the environment. In this work, we use the empirical value 2 • [4]. According to the law of error propagation, the standard deviation of the carrier phase error can be expressed as:

GNSS Carrier Phase Error Source
where σ ε represents the standard deviation of the carrier phase error (unit: cycle) and σ 2 v is the variance of the multipath and motion-based carrier phase noise error (unit: cycle). Then, the standard deviation of the estimated DDGF measurement can be expressed as: where σ ij ε,DDGF is the standard deviation of the estimated DDGF measurement (unit: m). Usually, people believe the distribution should be within three-times of its standard deviation [10]. Therefore, the theoretical threshold of ε ij DDGF without large multipath or carrier phase noise can be determined: If there is no large multipath or carrier phase noise, the magnitude of Φ ij DDGF should be within T ij DDGF ; otherwise, there must be large residual error in the dual frequency carrier phase measurement. In that case, we eliminate the carrier phase of the corresponding satellite using weighted estimation.
For GNSS relative positioning, different carrier phase measurement can be given different weighting values according to the real environment, namely the weighted estimation [19]. The measurement is eliminated in case the corresponding weighting value is zero. Therefore, the corresponding weighting p ij is designed according to Φ ij DDGF and T ij DDGF :

Baseline Vector Estimation
The final product of GNSS carrier phase relative positioning is the baseline vector. The definition of the baseline vector is: where rb b is the baseline vector pointing from the base to the rover, rb x , rb y and rb z are the coordinates of the baseline vector in Earth Centered Earth Fixed (ECEF) coordinate system (unit: m). The baseline vector is calculated by the DD carrier phase measurement. The relationship between the baseline vector and the DD carrier phase measurement is nonlinear. We expand the DD carrier phase using the Taylor series expansion method and reserve the first-order terms: where i r a is the normalized Line-of-Sight (LOS) vector pointing from the rover to the i -th satellite [21], and the LOS vector of the rover nearly equals that of the base under GNSS compass condition, i.e., = There are several DD carrier phase measurements of different satellites and different frequencies. We combine them as a vector. We exchange the place of the reference satellite #j to #1, then the satellite #1 is the reference satellite. Then, the DD carrier phase vector can be written as: 21 where rb Φ is the DD carrier phase vector and q is the total number of the available satellites.
In a similar way, the LOS of different satellites and different frequencies can be expressed as:   From Figure 2, it is clear that the weighting is one when the DDGF residual error satisfies the theoretical threshold of the estimated carrier phase error, namely, Φ ij DDGF < T ij DDGF . The weighting value is down to zero when the DDGF residual error is larger than the theoretical threshold.

Baseline Vector Estimation
The final product of GNSS carrier phase relative positioning is the baseline vector. The definition of the baseline vector is: b rb = x rb y rb z rb (15) where b rb is the baseline vector pointing from the base to the rover, x rb , y rb and z rb are the coordinates of the baseline vector in Earth Centered Earth Fixed (ECEF) coordinate system (unit: m). The baseline vector is calculated by the DD carrier phase measurement. The relationship between the baseline vector and the DD carrier phase measurement is nonlinear. We expand the DD carrier phase using the Taylor series expansion method and reserve the first-order terms: where a i r is the normalized Line-of-Sight (LOS) vector pointing from the rover to the i-th satellite [21], and the LOS vector of the rover nearly equals that of the base under GNSS compass condition, i.e., a i r = a i b . There are several DD carrier phase measurements of different satellites and different frequencies.
We combine them as a vector. We exchange the place of the reference satellite #j to #1, then the satellite #1 is the reference satellite. Then, the DD carrier phase vector can be written as: where Φ rb is the DD carrier phase vector and q is the total number of the available satellites. In a similar way, the LOS of different satellites and different frequencies can be expressed as: where H r represents the combination of the different satellites and different frequencies of LOS. Then, the vector form of Equation (15) for different satellites and different frequencies can be written as: In consideration of the weighting for different carrier phase measurement, Equation (18) can be rewritten as: where W is the weighting matrix. In this work, the weighting matrix W is designed as two parts: where W DDGF represents the DDGF detection weighting matrix and W PLLt is the weighting matrix based on PLL thermal noise. The DDGF detection weighting matrix is designed as: where the element p is calculated by Equation (14). The DDGF detection weighting matrix is the identity matrix and will not influence the baseline vector result in case there is no large multipath or carrier phase noise. The corresponding carrier phase measurement will be eliminated in case its DDGF measurement is over the theoretical threshold. As the PLL thermal noise is the main error source of the carrier phase error, in the case here, there is no large carrier phase noise or multipath [19]. In that case, we use the theoretical PLL thermal noise to determine the weighting. Assuming that the carrier phase noise between different receivers, Sensors 2016, 16,1988 8 of 21 satellites and frequencies is independent, the covariance matrix of the SD carrier phase measurement can be written as: where D SD PLLt is the SD carrier phase measurement covariance matrix. Its element is calculated according to Equation (9).
The transportation matrix R from SD to DD can be expressed as: Then, the DD carrier phase carrier phase measurement covariance matrix D DD PLLt can be calculated as follow: According to the error theory [4], the optimal weighting matrix can be determined as: Finally, the weighted baseline vector can be calculated as Equation (27): After the baseline vector is known, the attitude can be calculated through a well-known and widely-used formula [30,38].

Theoretical Performance Analysis
In Section 2, the DDGF detection is proposed to detect large multipath and carrier phase noise for dual frequency carrier phase measurement. However, the DDGF detection is actually the carrier phase error difference checking between two frequencies. When the error in two frequencies is exactly the same, the proposed algorithm will fail. Therefore, the DDGF detection may not be suitable for all types of error. In this section, we will analyze the proposed algorithm theoretically. As the dual frequency characteristics are similar for different GNSS constellation, in this work, we choose B1 and B3 of the BeiDou navigation satellite System (BDS) and analyze its performance in detail. Meanwhile, the statistical results are listed for B1, B2 and B3 of BDS, L1, L2 and L5 of the Global Positioning System (GPS) and E1, E5 and E6 of Galileo. Table 1 shows the center frequencies of different GNSS. The DDGF measurement is linear with either of the dual frequency DD carrier phase according to the first line of Equation (7). Assuming only one of the two frequencies has error, Equation (7) can be treated as the linear equation with one variable. In that case, the DDGF measurement increases as the carrier phase error grows. Figure 3 shows the relationship between the DDGF measurement and the carrier phase error in one frequency. Meanwhile, the theoretical threshold is shown in Figure 3. The parameters for estimating the theoretical threshold are listed in Table 2. The DDGF measurement is linear with either of the dual frequency DD carrier phase according to the first line of Equation (7). Assuming only one of the two frequencies has error, Equation (7) can be treated as the linear equation with one variable. In that case, the DDGF measurement increases as the carrier phase error grows. Figure 3 shows the relationship between the DDGF measurement and the carrier phase error in one frequency. Meanwhile, the theoretical threshold is shown in Figure 3. The parameters for estimating the theoretical threshold are listed in Table 2.
As shown in Figure 3, the green line and blue line represent how DDGF measurement changes with the B1 and B3 carrier phase error. The DDGF measurement is far larger than the theoretical threshold when large error occurs. Therefore, the performance of DDGF detection is good in case only one frequency has large carrier phase error.
However, both frequencies may have large carrier phase error. Sometimes, the error in different frequencies may be the same. In that case, the difference of the dual frequency errors is close to zero. It makes the DDGF measurement below the theoretical threshold, but there may be large errors in both frequencies. Consequently, undetected error remains. Figure 4 shows the relationship between the DDGF measurement and the carrier phase error in both frequencies. The horizontal axis is the B1 carrier phase error, and the vertical axis is the B3 carrier phase error. The carrier phase measurement originally contains integer ambiguity. The integer ambiguity cannot be initialized in case the carrier phase error is larger than one cycle. Therefore, the B1 carrier phase error and B3 carrier phase error are between zero and one. Different colors represent the magnitude of the DDGF measurement. The magnitude is small in the color of blue and large in the color of red. It is clear that there is an area in dark blue where the B1 carrier phase error and B3 carrier phase error are both large, but the DDGF measurement is small. In this area, there will be   Parameter As shown in Figure 3, the green line and blue line represent how DDGF measurement changes with the B1 and B3 carrier phase error. The DDGF measurement is far larger than the theoretical threshold when large error occurs. Therefore, the performance of DDGF detection is good in case only one frequency has large carrier phase error.
However, both frequencies may have large carrier phase error. Sometimes, the error in different frequencies may be the same. In that case, the difference of the dual frequency errors is close to zero. It makes the DDGF measurement below the theoretical threshold, but there may be large errors in both frequencies. Consequently, undetected error remains. Figure 4 shows the relationship between the DDGF measurement and the carrier phase error in both frequencies. The horizontal axis is the B1 carrier phase error, and the vertical axis is the B3 carrier phase error. The carrier phase measurement originally contains integer ambiguity. The integer ambiguity cannot be initialized in case the carrier phase error is larger than one cycle. Therefore, the B1 carrier phase error and B3 carrier phase error are between zero and one. Different colors represent the magnitude of the DDGF measurement. The magnitude is small in the color of blue and large in the color of red. It is clear that there is an area in dark blue where the B1 carrier phase error and B3 carrier phase error are both large, but the DDGF measurement is small. In this area, there will be undetected error after the DDGF detection. We change the color in Figure 4 into blue and white according to the theoretical threshold. Figure 5 shows the result. In the blue area, no matter how large the B1 and B3 carrier phase error is, the DDGF measurement cannot pass the theoretical threshold. In this work, we name it the DDGF detection failure area; on the contrary, the white area is the DDGF detection success area. The boundary of the DDGF failure area is related to the theoretical threshold. A lower theoretical threshold can make the blue area narrower; in other words, it can reduce the DDGF detection failure ratio. As the theoretical threshold is estimated by the receiver parameter and signal quality according to Equation (11), choosing a professional receiver and using the receiver in an open sky environment are good for DDGF detection and increase the DDGF detection success ratio. We calculate the ratio of the DDGF detection success area out of the possible dual frequency error pairs. The result of B1-B3 is 85.30%. However, this result is based on the error being evenly distributed. Usually, the carrier phase error is not evenly distributed, as it can hardly reach one cycle. According to the previous work, the GNSS measurement error can be approximately treated as a zero mean with a Gaussian distribution [4,10]. Hence, we recalculate the success ratio for a zero mean Gaussian distributed error. The success ratio of B1-B3 is down to 73.96%. The reason that the success ratio is about 10% lower is meanly because the areas around (1,0) and (0,1) in the lower right and upper left corner of Figure 5 are very suitable for DDGF detection, as the dual frequency error difference is so large. However, the contribution of these areas to the result becomes very small when considering the error distribution. Then, we compute the success ratio for all of the GNSS constellation, and Table 3 shows the results. All of the GNSS constellation dual frequency results are  We change the color in Figure 4 into blue and white according to the theoretical threshold. Figure 5 shows the result. In the blue area, no matter how large the B1 and B3 carrier phase error is, the DDGF measurement cannot pass the theoretical threshold. In this work, we name it the DDGF detection failure area; on the contrary, the white area is the DDGF detection success area. The boundary of the DDGF failure area is related to the theoretical threshold. A lower theoretical threshold can make the blue area narrower; in other words, it can reduce the DDGF detection failure ratio. As the theoretical threshold is estimated by the receiver parameter and signal quality according to Equation (11), choosing a professional receiver and using the receiver in an open sky environment are good for DDGF detection and increase the DDGF detection success ratio. We change the color in Figure 4 into blue and white according to the theoretical threshold. Figure 5 shows the result. In the blue area, no matter how large the B1 and B3 carrier phase error is, the DDGF measurement cannot pass the theoretical threshold. In this work, we name it the DDGF detection failure area; on the contrary, the white area is the DDGF detection success area. The boundary of the DDGF failure area is related to the theoretical threshold. A lower theoretical threshold can make the blue area narrower; in other words, it can reduce the DDGF detection failure ratio. As the theoretical threshold is estimated by the receiver parameter and signal quality according to Equation (11), choosing a professional receiver and using the receiver in an open sky environment are good for DDGF detection and increase the DDGF detection success ratio. We calculate the ratio of the DDGF detection success area out of the possible dual frequency error pairs. The result of B1-B3 is 85.30%. However, this result is based on the error being evenly distributed. Usually, the carrier phase error is not evenly distributed, as it can hardly reach one cycle. According to the previous work, the GNSS measurement error can be approximately treated as a zero mean with a Gaussian distribution [4,10]. Hence, we recalculate the success ratio for a zero mean Gaussian distributed error. The success ratio of B1-B3 is down to 73.96%. The reason that the success ratio is about 10% lower is meanly because the areas around (1,0) and (0,1) in the lower right and upper left corner of Figure 5 are very suitable for DDGF detection, as the dual frequency error difference is so large. However, the contribution of these areas to the result becomes very small when considering the error distribution. Then, we compute the success ratio for all of the GNSS constellation, and Table 3 shows the results. All of the GNSS constellation dual frequency results are  We calculate the ratio of the DDGF detection success area out of the possible dual frequency error pairs. The result of B1-B3 is 85.30%. However, this result is based on the error being evenly distributed. Usually, the carrier phase error is not evenly distributed, as it can hardly reach one cycle. According to the previous work, the GNSS measurement error can be approximately treated as a zero mean with a Gaussian distribution [4,10]. Hence, we recalculate the success ratio for a zero mean Gaussian distributed error. The success ratio of B1-B3 is down to 73.96%. The reason that the success ratio is about 10% lower is meanly because the areas around (1,0) and (0,1) in the lower right and upper left corner of Figure 5 are very suitable for DDGF detection, as the dual frequency error difference is so large. However, the contribution of these areas to the result becomes very small when considering the error distribution. Then, we compute the success ratio for all of the GNSS constellation, and Table 3 shows the results. All of the GNSS constellation dual frequency results are about three quarters. This means that the DDGF detection can work with all of the GNSS constellation, and the success ratio is similar.

Experiments Analysis and Discussion
In order to demonstrate the proposed algorithm and evaluate its performance, a series of experiments were carried out in Beijing, China, including the open sky test, manmade multipath test and urban vehicle test.

Open Sky Test
In this work, we choose B1 and B3 of BDS for the open sky test because the satellite type is various in BDS, including the Medium Earth Orbit (MEO), GEosynchronous Orbit (GEO) and Inclined GeoSynchronous Orbits (IGSO) satellites. The characteristic of all types of GNSS satellites can be analyzed. Two YWELL DY-GABR042P00D antennas and a RACOBIT OEM-B41 BDS dual frequency receiver were used. The receiver (a) and the antenna (b) are shown in Figure 6.
Sensors 2016, 16,1988 11 of 21 about three quarters. This means that the DDGF detection can work with all of the GNSS constellation, and the success ratio is similar.

Experiments Analysis and Discussion
In order to demonstrate the proposed algorithm and evaluate its performance, a series of experiments were carried out in Beijing, China, including the open sky test, manmade multipath test and urban vehicle test.

Open Sky Test
In this work, we choose B1 and B3 of BDS for the open sky test because the satellite type is various in BDS, including the Medium Earth Orbit (MEO), GEosynchronous Orbit (GEO) and Inclined GeoSynchronous Orbits (IGSO) satellites. The characteristic of all types of GNSS satellites can be analyzed. Two YWELL DY-GABR042P00D antennas and a RACOBIT OEM-B41 BDS dual frequency receiver were used. The receiver (a) and the antenna (b) are shown in Figure 6. The data were collected at 0.1 Hz, with a five-degree cut-off elevation angle, from UTC time 08:02 to the next day 19:58, for a total of 12,930 epochs logged. Figure 7 shows the available satellites of the whole data. The blue line means the corresponding satellite is available. The satellites from #1 to #5 of BDS are GEO satellites. The GEO satellites are almost all available, as the GEO satellite is nearly static. The satellites from #6 to #10 of BDS are IGSO satellites. The orbit of the IGSO satellite is close to "8" at a certain longitude; hence, the IGSO satellites are available at the majority of time. The satellites #11 and #12 are MEO satellites. The orbit of the MEO satellite is global; hence, the available time is relatively short. The data were collected at 0.1 Hz, with a five-degree cut-off elevation angle, from UTC time 08:02 to the next day 19:58, for a total of 12,930 epochs logged. Figure 7 shows the available satellites of the whole data. The blue line means the corresponding satellite is available. The satellites from #1 to #5 of BDS are GEO satellites. The GEO satellites are almost all available, as the GEO satellite is nearly static. The satellites from #6 to #10 of BDS are IGSO satellites. The orbit of the IGSO satellite is close to "8" at a certain longitude; hence, the IGSO satellites are available at the majority of time. The satellites #11 and #12 are MEO satellites. The orbit of the MEO satellite is global; hence, the available time is relatively short.  Figure 8 is the proposed DDGF detecting results together with the elevation angle and the carrier to noise power expressed as a ratio (CN0) of all of the satellites. As the available satellites are discontinuous and there are no data for the unavailable period, the unavailable period is not shown in Figure 8. Then, the horizontal axis is not the same for different satellites. Hence, the horizontal axis is not labeled. The corresponding UTC time can be found in Figure 7.   Figure 8 is the proposed DDGF detecting results together with the elevation angle and the carrier to noise power expressed as a ratio (CN0) of all of the satellites. As the available satellites are discontinuous and there are no data for the unavailable period, the unavailable period is not shown in Figure 8. Then, the horizontal axis is not the same for different satellites. Hence, the horizontal axis is not labeled. The corresponding UTC time can be found in Figure 7.  Figure 8 is the proposed DDGF detecting results together with the elevation angle and the carrier to noise power expressed as a ratio (CN0) of all of the satellites. As the available satellites are discontinuous and there are no data for the unavailable period, the unavailable period is not shown in Figure 8. Then, the horizontal axis is not the same for different satellites. Hence, the horizontal axis is not labeled. The corresponding UTC time can be found in Figure 7. From Figure 8, the elevation angle and CN0 of the GEO satellites from #1 to #5 are relatively stable as the GEO satellite is nearly static. As shown in the DDGF detection part in Figure 8, the blue line is the DDGF measurement, and the red lines represent the theoretical threshold. The DDGF measurement of GEO satellites is stable, but obviously not zero mean. The satellite of a low elevation angle has a relatively large bias from zero, and the noise of the low CN0 satellite is relatively large. It meets the supposed results theoretically that the multipath in the low elevation angle satellite is large and that the carrier phase noise in the low CN0 satellite is large. The result indicates that although the environment of the open sky test is good, the multipath still exists. Obviously, the GEO multipath cannot be canceled from averaging the long-term data. Fortunately, the DDGF measurement of the open sky test is within the theoretical threshold. This means the multipath is within its regular value and will not influence the accuracy very much.
As for the IGSO and MEO satellites, the DDGF detecting results are similarly. Different from the GEO satellite, the DDGF measurement is nearly zero mean and varies greatly. It may be larger than the theoretical threshold in the case that the elevation angle is very low. Figure 9 shows the carrier phase relative positioning result, namely the baseline vector in the east, north and up directions. The red dots in the back layer represent the baseline result before DDGF detection, and the blue dots in the front layer are the baseline result after DDGF detection. The baseline vector before and after DDGF detection are coincident most of the time. As some carrier phase measurements with large error are eliminated after DDGF detection, the corresponding large baseline errors become smaller compared with the baseline before DDGF detection in red. This proves that the proposed algorithm is able to mitigate the occasional large baseline error in the open sky environment.
Sensors 2016, 16,1988 14 of 21 From Figure 8, the elevation angle and CN0 of the GEO satellites from #1 to #5 are relatively stable as the GEO satellite is nearly static. As shown in the DDGF detection part in Figure 8, the blue line is the DDGF measurement, and the red lines represent the theoretical threshold. The DDGF measurement of GEO satellites is stable, but obviously not zero mean. The satellite of a low elevation angle has a relatively large bias from zero, and the noise of the low CN0 satellite is relatively large. It meets the supposed results theoretically that the multipath in the low elevation angle satellite is large and that the carrier phase noise in the low CN0 satellite is large. The result indicates that although the environment of the open sky test is good, the multipath still exists. Obviously, the GEO multipath cannot be canceled from averaging the long-term data. Fortunately, the DDGF measurement of the open sky test is within the theoretical threshold. This means the multipath is within its regular value and will not influence the accuracy very much.
As for the IGSO and MEO satellites, the DDGF detecting results are similarly. Different from the GEO satellite, the DDGF measurement is nearly zero mean and varies greatly. It may be larger than the theoretical threshold in the case that the elevation angle is very low. Figure 9 shows the carrier phase relative positioning result, namely the baseline vector in the east, north and up directions. The red dots in the back layer represent the baseline result before DDGF detection, and the blue dots in the front layer are the baseline result after DDGF detection. The baseline vector before and after DDGF detection are coincident most of the time. As some carrier phase measurements with large error are eliminated after DDGF detection, the corresponding large baseline errors become smaller compared with the baseline before DDGF detection in red. This proves that the proposed algorithm is able to mitigate the occasional large baseline error in the open sky environment.

Manmade Multipath Test
The manmade multipath test is analyzed to evaluate the performance of DDGF detection in severe multipath environments. The same baseline, experiment devices and frequencies are used in the manmade multipath test compared to the open sky test. Hence, the mean value of the previous 36-h open sky test result can be used as the reference. A reflector was set to the east side of the rover antenna. The multipath environment is shown in Figure 10.

Manmade Multipath Test
The manmade multipath test is analyzed to evaluate the performance of DDGF detection in severe multipath environments. The same baseline, experiment devices and frequencies are used in the manmade multipath test compared to the open sky test. Hence, the mean value of the previous 36-h open sky test result can be used as the reference. A reflector was set to the east side of the rover antenna. The multipath environment is shown in Figure 10. The data were collected at 1 Hz, with a five degree cut-off elevation angle, from UTC time 23:01 to the next day 05:00 for a total of 21,580 epochs logged. Figure 11 is the sky plot of the satellites and the geometrical relationship between the satellites and the reflector. The azimuth and elevation angles for all of the available satellites are computed and plotted in polar coordinates. From Figure 11, the satellite #7 is not available during the test. Theoretically, the signal of the satellites opposite the reflector will suffer from the multipath more severely. These kinds of satellites are marked in red in Figure 11.

The Reflector
The Mirror Image of the Reflector Figure 11. The reflector and the sky plot of the satellites.
The results of the DDGF detection are shown in Figure 12. Compared with Figure 8, the characteristic is similar. The DDGF measurement of GEO satellites is stable, but not zero mean, and the DDGF measurement of IGSO and MEO varies greatly. Satellite #5 is influenced severely, and its DDGF measurement is above the theoretical threshold during the whole test. Satellite #12 arises from the northwest corner with a low elevation angle. Its DDGF measurement is much larger than the theoretical threshold when its elevation is low. As the elevation angle increases, the DDGF measurement is back to normal. The data were collected at 1 Hz, with a five degree cut-off elevation angle, from UTC time 23:01 to the next day 05:00 for a total of 21,580 epochs logged. Figure 11 is the sky plot of the satellites and the geometrical relationship between the satellites and the reflector. The azimuth and elevation angles for all of the available satellites are computed and plotted in polar coordinates. From Figure 11, the satellite #7 is not available during the test. Theoretically, the signal of the satellites opposite the reflector will suffer from the multipath more severely. These kinds of satellites are marked in red in Figure 11. The results of the DDGF detection are shown in Figure 12. Compared with Figure 8, the characteristic is similar. The DDGF measurement of GEO satellites is stable, but not zero mean, and the DDGF measurement of IGSO and MEO varies greatly. Satellite #5 is influenced severely, and its DDGF measurement is above the theoretical threshold during the whole test. Satellite #12 arises from the northwest corner with a low elevation angle. Its DDGF measurement is much larger than the theoretical threshold when its elevation is low. As the elevation angle increases, the DDGF measurement is back to normal. characteristic is similar. The DDGF measurement of GEO satellites is stable, but not zero mean, and the DDGF measurement of IGSO and MEO varies greatly. Satellite #5 is influenced severely, and its DDGF measurement is above the theoretical threshold during the whole test. Satellite #12 arises from the northwest corner with a low elevation angle. Its DDGF measurement is much larger than the theoretical threshold when its elevation is low. As the elevation angle increases, the DDGF measurement is back to normal.  Figure 13 shows the baseline results before and after DDGF detection together with the reference result. In Figure 13, "Before" and "After" respectively represent the baseline results before and after DDGF detection. The mean value of the previous 36-h open sky test is treated as the reference result, namely the "Reference" in Figure 13. It is clear that the baseline result after the DDGF detection is closer to the reference value. Meanwhile, the large error at about zero hours UTC time is mitigated in the baseline result after DDGF detection. Table 4 is the mean value of the baseline before and after DDGF detection and the reference baseline.    Figure 13 shows the baseline results before and after DDGF detection together with the reference result. In Figure 13, "Before" and "After" respectively represent the baseline results before and after DDGF detection. The mean value of the previous 36-h open sky test is treated as the reference result, namely the "Reference" in Figure 13. It is clear that the baseline result after the DDGF detection is closer to the reference value. Meanwhile, the large error at about zero hours UTC time is mitigated in the baseline result after DDGF detection. Table 4 is the mean value of the baseline before and after DDGF detection and the reference baseline.
result. In Figure 13, "Before" and "After" respectively represent the baseline results before and after DDGF detection. The mean value of the previous 36-h open sky test is treated as the reference result, namely the "Reference" in Figure 13. It is clear that the baseline result after the DDGF detection is closer to the reference value. Meanwhile, the large error at about zero hours UTC time is mitigated in the baseline result after DDGF detection. Table 4 is the mean value of the baseline before and after DDGF detection and the reference baseline.     Figure 14 is the baseline error before and after DDGF detection compared with the reference. The "Before" is the difference of the mean value between the baseline before DDGF detection and the reference baseline, and so as the "After". The baseline error in up is influenced the most by the manmade multipath. The error in north is worse than that in east. The error in these three directions matches the DOP (Dilution of Precision) of BDS in China, as the GEO satellites are located in a line in the east-west direction [31]. As shown in Figure 14, after the DDGF detection, the baseline error after DDGF detection is about a half of the baseline error before the DDGF detection compared with the long-term open sky reference baseline.

Urban Vehicle Test
The urban vehicle test was carried out to demonstrate the dynamic performance of the proposed algorithm. This time, GPS L1 and L2 are chosen in consideration that the satellite distribution of GPS is more suitable for blocking from all directions. Two HARXON HX-CS3601A survey antennas and NovAtel-OEM628 dual frequency receivers were used. The location of two antennas is shown in Figure 15a.
As the true baseline vector is unable to be obtained in a dynamic situation, we use the baseline length to evaluate the performance because the baseline length is unchanged no matter how the vehicle moves. Before driving, the baseline length is measured from the 10-hour static open sky average value.   Figure 14 is the baseline error before and after DDGF detection compared with the reference. The "Before" is the difference of the mean value between the baseline before DDGF detection and the reference baseline, and so as the "After". The baseline error in up is influenced the most by the manmade multipath. The error in north is worse than that in east. The error in these three directions matches the DOP (Dilution of Precision) of BDS in China, as the GEO satellites are located in a line in the east-west direction [31]. As shown in Figure 14, after the DDGF detection, the baseline error after DDGF detection is about a half of the baseline error before the DDGF detection compared with the long-term open sky reference baseline.   Figure 14 is the baseline error before and after DDGF detection compared with the reference. The "Before" is the difference of the mean value between the baseline before DDGF detection and the reference baseline, and so as the "After". The baseline error in up is influenced the most by the manmade multipath. The error in north is worse than that in east. The error in these three directions matches the DOP (Dilution of Precision) of BDS in China, as the GEO satellites are located in a line in the east-west direction [31]. As shown in Figure 14, after the DDGF detection, the baseline error after DDGF detection is about a half of the baseline error before the DDGF detection compared with the long-term open sky reference baseline.

Urban Vehicle Test
The urban vehicle test was carried out to demonstrate the dynamic performance of the proposed algorithm. This time, GPS L1 and L2 are chosen in consideration that the satellite distribution of GPS is more suitable for blocking from all directions. Two HARXON HX-CS3601A survey antennas and NovAtel-OEM628 dual frequency receivers were used. The location of two antennas is shown in Figure 15a.
As the true baseline vector is unable to be obtained in a dynamic situation, we use the baseline length to evaluate the performance because the baseline length is unchanged no matter how the vehicle moves. Before driving, the baseline length is measured from the 10-hour static open sky average value.

Urban Vehicle Test
The urban vehicle test was carried out to demonstrate the dynamic performance of the proposed algorithm. This time, GPS L1 and L2 are chosen in consideration that the satellite distribution of GPS is more suitable for blocking from all directions. Two HARXON HX-CS3601A survey antennas and NovAtel-OEM628 dual frequency receivers were used. The location of two antennas is shown in Figure 15a.  Figure 16b is the baseline length of the urban vehicle test. The baseline length error is relatively stable and small when the PDOP is low before 11:35 UTC time. When the PDOP gets higher, the baseline error becomes larger. The baseline length results before and after DDGF detection are around the standard, and they are at the same magnitude level at most of the time. Some large baseline length errors above 0.03 m are mitigated by the DDGF detection in the proposed results. The baseline length calculated by the proposed algorithm is more stable. Table 5 shows the statistic results. The column "Baseline Length" is the mean value of the baseline length. The mean value of the baseline after DDGF detection is closer to the reference. The bias decreases from 0.008 m to 0.002 m. The standard deviation of the baseline length after DDGF detection is smaller than that before DDGF detection by about 8%.
The results indicate that the proposed algorithm improves both the mean value and the standard deviation performance in the urban vehicle test. As the true baseline vector is unable to be obtained in a dynamic situation, we use the baseline length to evaluate the performance because the baseline length is unchanged no matter how the vehicle moves. Before driving, the baseline length is measured from the 10-hour static open sky average value.
The driving was in Haidian District, Beijing, China. The driving route is shown in Figure 15b. Data were collected at 1 Hz, with a five degree cut-off elevation angle, between 11:15 and 11:50, UTC time, for a total of 2592 epochs logged. Figure 16a Figure 16b is the baseline length of the urban vehicle test. The baseline length error is relatively stable and small when the PDOP is low before 11:35 UTC time. When the PDOP gets higher, the baseline error becomes larger. The baseline length results before and after DDGF detection are around the standard, and they are at the same magnitude level at most of the time. Some large baseline length errors above 0.03 m are mitigated by the DDGF detection in the proposed results. The baseline length calculated by the proposed algorithm is more stable. Table 5 shows the statistic results. The column "Baseline Length" is the mean value of the baseline length. The mean value of the baseline after DDGF detection is closer to the reference. The bias decreases from 0.008 m to 0.002 m. The standard deviation of the baseline length after DDGF detection is smaller than that before DDGF detection by about 8%. The results indicate that the proposed algorithm improves both the mean value and the standard deviation performance in the urban vehicle test.  Figure 16b is the baseline length of the urban vehicle test. The baseline length error is relatively stable and small when the PDOP is low before 11:35 UTC time. When the PDOP gets higher, the baseline error becomes larger. The baseline length results before and after DDGF detection are around the standard, and they are at the same magnitude level at most of the time. Some large baseline length errors above 0.03 m are mitigated by the DDGF detection in the proposed results. The baseline length calculated by the proposed algorithm is more stable. Table 5 shows the statistic results. The column "Baseline Length" is the mean value of the baseline length. The mean value of the baseline after DDGF detection is closer to the reference. The bias decreases from 0.008 m to 0.002 m. The standard deviation Sensors 2016, 16,1988 19 of 21 of the baseline length after DDGF detection is smaller than that before DDGF detection by about 8%. The results indicate that the proposed algorithm improves both the mean value and the standard deviation performance in the urban vehicle test.

Conclusions
In this work, we propose a dual frequency carrier phase error difference checking algorithm for the GNSS compass. The algorithm aims at eliminating large carrier phase noise and multipath error in DD carrier phase measurement. We utilize the characteristic that the different frequency carrier phase measurements contain the same geometrical distance and form the DDGF measurement. The DDGF detection is designed according to the theoretical estimation of the carrier phase error. The theoretical performance of the proposed DDGF detection is analyzed. The result shows that the detecting success ratio of all of the GNSS constellation dual frequency pairs is about three quarters in the condition that the error is zero mean Gaussian distributed.
We analyze the characteristic of the DDGF measurement in different types of satellites from the open sky test. The DDGF measurement of GEO satellites is stable, but not zero mean. As for IGSO and MEO, it is nearly zero mean, but varies greatly and may be larger than the theoretical threshold in the case that the satellite elevation angle is very low. Some large errors of the baseline vector can be mitigated after the DDGF detection.
The manmade multipath test is analyzed to evaluate the performance of DDGF detection in a severe multipath environment. As the location of the reflector is known, the satellites that may be suffering from the multipath severely are known. The DDGF detection result matches the anticipation. The DDGF measurement of the influenced GEO satellite is above the theoretical threshold during the whole test. The DDGF measurement of the influenced MEO satellite is much larger than the theoretical threshold when its elevation is low. As the elevation angle increases, the DDGF measurement is back to normal. After the DDGF detection, the baseline vector error is about a half of the result before DDGF detection compared with the long-term open sky reference baseline vector.
The urban vehicle test was carried out to evaluate the dynamic performance of the proposed algorithm. We analyze the baseline length because the baseline length is unchanged no matter how the vehicle moves. The 10-h static open sky average value is treated as the reference. The results indicate that the proposed algorithm improves both the mean value and the standard deviation performance in the urban vehicle test.
Based on these results, the proposed DDGF detection has the ability to detect large error in dual frequency carrier phase measurement without the help of prior environment information. After the DDGF detection, the accuracy of the baseline vector is improved in the GNSS compass.