Because multipath error and measurement noise have random characteristics, especially multipath error is much dependent of the user environment, it is usually difficult to accurately estimate the variance using empirical stochastic models, which ultimately reduces the positioning performance of GNSS. Compared with carrier phase observations, pseudorange observations are more severely affected by multipath error and measurement noise. Accurate construction of pseudorange variance is the key to improving the convergence time and positioning quality of precise point positioning (Seepersad & Bisnath, 2015). Therefore, this paper will mainly focus on the research on resilient adjustment methods to weigh pseudorange observations.

Taking the pseudorange multipath error and measurement noise together as a source of error, Eq. (4) can be rewritten as

$$\sigma_{i}^{2} = \sigma_{{{\text{clk}\& {\mathrm{epch}}},i}}^{2} + \sigma_{{{\text{trop}},i}}^{2} + \sigma_{{{\text{ion}},i}}^{2} + \sigma_{{{\text{mp}}\& {\mathrm{noise}},i}}^{2}$$

(7)

where \(\sigma_{{{\text{mp}}\& {\mathrm{noise}},i}}\) is estimated in real time based on pseudorange multipath error and measurement noise sequences.

### Pseudorange multipath error and measurement noise estimation model

In order to extract the multipath error and measurement noise from pseudorange observations, a Code-Minus-Carrier (CMC) observable is adopted (Blanco & Haag, 2011)

$$P_{i} - L_{i} = 2I_{i} + (d_{{{\text{MP}}}}^{i} - d_{{{\text{mp}}}}^{i} ) - B_{i} + (\varepsilon_{i} - \varsigma_{i} )$$

(8)

The CMC observations constructed by the above formula also include two times of ionospheric delay and carrier phase multipath error and measurement noise, which in general are much smaller than the pseudorange multith error and measurement noise \(\left( {d_{{{\text{mp}}}}^{i} \ll d_{{{\text{MP}}}}^{i} \;{\text{and}}\;\varsigma \ll \varepsilon } \right)\), so \(d_{{{\text{mp}}}}^{i}\) and \(\varsigma\) can be neglected. There are two ways to handle the ionospheric divergence. For a single frequency receiver, the ionospheric term can be eliminated by fitting and removing a first or second order curve from the CMC observable (Braasch, 2017). For a dual-frequency receiver, the ionospheric delay can be estimated through the dual-frequency carrier phase linear combination (Seepersad & Bisnath, 2015):

$$2a_{j} (L_{i} - L_{j} ) = 2I_{i} + 2a_{j} (B_{i} - B_{j} + d_{{{\text{MP}}}}^{i} - d_{{{\text{MP}}}}^{j} + \varsigma_{i} - \varsigma_{j} )$$

(9)

Subtracting Eq. (9) from Eq. (8) and ignoring carrier phase multipath error mp and measurement noise \(\varsigma\), the dual-frequen.y ionospheric delay corrected CMC observable on frequency \(f_{i}\) can be obtained as

$$\begin{aligned} d_{CMC}^{i} & = \,P_{i} - L_{i} - 2a_{j} (L_{i} - L_{j} ) \\ & \approx\, (d_{MP}^{i} + \varepsilon_{i} ) - (B_{i} + 2a_{j} (B_{i} - B_{j} )) \\ & = \, \overline{d}_{MP}^{i} - \overline{B}_{i} \\ \end{aligned}$$

(10)

where \(\overline{d}_{{{\text{MP}}}}^{i}\) represents the pseudorange multipath error and measurement noise, and \(\overline{B}_{i}\) is the carrier phase ambiguities.

In addition to pseudorange multipath error and measurement noise, the CMC observation model in (10) also contains a constant component associated with phase ambiguities. Assuming that no cycles slip occurs in the carrier phase observations and the mean of multipath error and measurement noise is zero, the pseudorange multipath error and measurement noise can be estimated by (Seepersad & Bisnath, 2015; Zheng & Guo, 2016)

$$\overline{d}_{{{\text{MP}}}}^{i,k} = s_{{{\text{CMC}}}}^{i,k} - \overline{s}_{{{\text{CMC}}}}^{i,k} ,\overline{s}_{{{\text{CMC}}}}^{i,k} = {\text{mean}}\left( {\sum\limits_{{t = k_{0} }}^{k} {s_{{{\text{CMC}}}}^{i,t} } } \right)$$

(11)

where \(\overline{s}_{{{\text{CMC}}}}^{i,k}\) is the average of \(s_{{{\text{CMC}}}}^{i,t}\) from the time *t* = *k*_{0 0}of the first epoch or the cycle slip occurs to current time *t* = *k*, which is the estimation of the carrier phase ambiguities \(\overline{B}_{i}\) and removed to eliminate the constant component.

### Real-time estimation model for pseudorange variance

Assuming that the multipath error and measurement noise obey the Gaussian normal distribution with zero mean, the pseudorange variance at the current epoch can be estimated based on the previous multipath error and measurement noise sequences (Wang et al., 2013)

$$\hat{\sigma }_{{{\text{mp}}\& {\mathrm{noise}},\,k}}^{2} = \frac{{\sum\limits_{k = 0}^{N - 1} {(\overline{d}_{{{\text{MP}}}}^{i,k} )^{2} } }}{N}$$

(12)

where *N* is the number of epochs.

### Variance inflation processing

In general, the variance estimated by (12) is very conservative, which cannot be used directly as the pseudorange variance. So, it needs to be enlarged to reflect the pseudorange measurement error more accurately. Considering that the multipath error and measurement noise are related to the satellite elevation angle, the following model based on satellite elevation angle is adopted

$$\overline{\sigma }_{{{\text{mp}}\& {\mathrm{noise}},k}}^{2} = \frac{{(s \cdot \hat{\sigma }_{{{\text{mp}}\& {\mathrm{noise}},k}} )^{2} }}{{\sin \beta_{{{\text{EL}}}} }}$$

(13)

where \(\overline{\sigma }_{{{\text{mp}}\& {\mathrm{noise}},k}}^{2}\) is the enlarged variance of pseudorange multipath error and measurement noise, and *s* is the amplification coefficient, which can be set to 2.0–3.0 (Yang & Gao, 2006).

### Variance robust estimation

Since the multipath error is very susceptible to the surrounding environment, in dynamic situations, the changes in the surrounding environment sometimes cause sudden changes in multipath errors. In order to reduce the influence of the multipath error mutation on the \(\hat{\sigma }_{{{\text{mp}}\& {\mathrm{noise}}}}\), it needs to be detected and processed. Taking the mutation of the multipath error as an abnormal disturbance, the following hypothesis test is constructed (Zhang et al., 2019a, b)

$$H_{0} :r \le T,H_{1} :r > T$$

(14)

where *r* is test statistic, \(H_{0}\) is the null hypothesis that there is no multipath and \(H_{1}\) is the altervative hypothesis that there is a multipath abnormal disturbance. The multipath abnormal disturbance is detected by comparing the magnitude relationship between the test statistic \(r\) and the test threshold *T*.

Under normal circumstances, the measurement variances at adjacent epochs should be similar. So, in order to simplify the processing, the multipath error and measurement noise can be simply regarded as a Gaussian normal distribution with a mean of zero and a variance of \(\overline{\sigma }_{{{\text{mp}}\& {\mathrm{noise}}}}^{2}\), and the test statistics can be formulated as

$$r = \frac{{\overline{d}_{{{\text{MP}}}}^{i,k} }}{{\overline{\sigma }_{{{\text{mp}}\& {\mathrm{noise}},k - 1}} }}\sim {\text{N}}_{1 - a/2} (0,1)$$

(15)

where *a* is the significance level. The detection threshold *T* is determined by the significance level *a* and can be obtained from the standard normal distribution table.

According to the above detection method, if multipath abnormal disturbance is detected, the Huber weight function model is used to adjust the variance of pseudorange multipath error and measurement noise as

$$\tilde{\sigma }_{{{\text{mp}}\&{\mathrm{noise}}k}}^{2} = \overline{\sigma }_{{{\text{mp}}\& {\mathrm{noise}},k - 1}}^{{2}} \cdot \left\{ {\begin{array}{*{20}l} 1 \hfill & {|r| \le T_{0} } \hfill \\ {\frac{{T_{0} }}{|r|}} \hfill & {|r| > T_{0} } \hfill \\ \end{array} } \right.$$

(16)

where \(\tilde{\sigma }_{{{\text{mp}}\& {\text{noise}},k}}^{2}\) is the updated variance of multipath errors and noise, and \(T_{0}\) is the threshold, which can be set to \(T_{0} = 1.0\) (Yang & Gao, 2006).

In addition, when a cycle slip occurs in the carrier phase observations or the signal is blocked, the constant component associated with phase ambiguities need to be recalculated. At this time, the \(\overline{d}_{{{\text{MP}}}}\) is inaccurate in general. In order to avoid the influence of inaccurate \(\overline{d}_{{{\text{MP}}}}\) on the variance estimation \(\hat{\sigma }_{{{\text{mp}}\& {\text{noise}}}}^{2}\), the estimation of \(\overline{d}_{{{\text{MP}}}}\) at the time of the cycle slip is not involved in the calculation. The processing of real-time estimation of pseudorange variance is shown in Fig. 1.

Figure 2 illustrates an example of the results of pseudorange variance estimation of \(\hat{\sigma }_{{{\text{mp}}\& {\text{noise}}}}^{2}\), \(\overline{\sigma }_{{{\text{mp}}\& {\text{noise}}}}^{2}\) with inflation processing, and \(\tilde{\sigma }_{{{\text{mp}}\& {\text{noise}}}}^{2}\) with inflation processing and robust estimation. The results show that the pseudorange variance estimation obtained by the proposed real-time estimation model is more consistent with the contour of pseudorange error. Since the proposed real-time estimation model takes into account the influence of the surrounding environment on measurement noise and multipath errors, it can obtain a more accurate estimation of the pseudorange variance and provide better estimation of the pseudorange error level than the empirical stochastic model.