# GNSS Code Multipath Mitigation by Cascading Measurement Monitoring Techniques
## 2 Background on Weighted Least-Squares Adjustment and Dilution of Precision (DOP)
### Weighted Least-Squares Adjustment for a Pseudorange-Based Positioning  
The pseudorange-based position solution using least-squares adjustment is considered an optimal estimation of the state vector in the sense that it minimizes the sum of the weighted squared residuals. Since pseudorange is a nonlinear function of the receiver and satellite positions, to determine the receiver coordinates, the measurement model is linearized based on an initial estimate of receiver position and clock bias and the state vector is updated iteratively based on the estimated error vector as follows [1].  
\[\Delta\mathbf{\hat{x}}=\left(\mathbf{H}^{T}\mathbf{W}\mathbf{H}\right)^{-1} \mathbf{H}^{T}\mathbf{W}\Delta\mathbf{P}. \tag{1}\]In Equation (1), for m pseudorange measurements, \(\Delta\mathbf{P}\) is the \(m\times 1\) vector of differences between the updated and modeled pseudoranges based on the linearization point, often termed as the measurement misclosure vector. \(\Delta\mathbf{\hat{x}}\) represents the estimation of error in the state vector (or simply state error), including three unknown position elements plus receiver clock bias (in distance units), from the linearization point. \(\mathbf{H}\) is the \(m\times 4\) matrix of partial derivatives of the pseudoranges with respect to the unknowns and \(\mathbf{W}\) denotes the weight matrix [1]. With this adjustment, the mean value for the estimated state error is determined as  
\[E\{\Delta\mathbf{\hat{x}}\}=\Delta\mathbf{x}+\Big{(}\mathbf{H}^{T}\mathbf{W} \mathbf{H}\Big{)}^{-1}\mathbf{H}^{T}\mathbf{W}E\{\mathbf{e}\}, \tag{2}\]  
where \(\mathbf{e}\) is the \(m\times 1\) vector of measurement errors and \(E\{\Delta\mathbf{\hat{x}}\}\) denotes the expected value of \(\Delta\mathbf{\hat{x}}\). Equation (2) means that some portion of any systematic errors or biases in the measurements will be absorbed by state estimation depending on weight matrix and receiver-satellite geometry [27]. The covariance matrix for the state error, called precision matrix, is also determined as  
\[\mathbf{C}_{\Delta\mathbf{\hat{x}}}=E\Big{\{}(\Delta\mathbf{\hat{x}}-E\{ \Delta\mathbf{\hat{x}}\})(\Delta\mathbf{\hat{x}}-E\{\Delta\mathbf{\hat{x}}\}) ^{T}\Big{\}}=\Big{(}\mathbf{H}^{T}\mathbf{W}\mathbf{H}\Big{)}^{-1}\Big{(} \mathbf{H}^{T}\mathbf{W}\mathbf{C}_{\mathbf{e}}\mathbf{W}\mathbf{H}\Big{)} \Big{(}\mathbf{H}^{T}\mathbf{W}\mathbf{H}\Big{)}^{-1} \tag{3}\]  
where \(\mathbf{C}_{\mathbf{e}}\) is the covariance matrix of measurement errors expressed as  
\[\mathbf{C}_{\mathbf{e}}=E\Big{\{}(\mathbf{e}-E\{\mathbf{e}\})(\mathbf{e}-E\{ \mathbf{e}\})^{T}\Big{\}}=\sigma_{0}^{2}\mathbf{Q}_{\mathbf{R}}, \tag{4}\]  
where \(\sigma_{0}^{2}\) is the a priori variance factor [1; 8]. \(\mathbf{Q}_{\mathbf{R}}\) is the cofactor matrix of the measurements. For an uncorrelated set of measurements, \(\mathbf{Q}_{\mathbf{R}}\) is a diagonal matrix whose diagonal elements multiplied by a priori variance factor correspond to measurements variances (\(\sigma_{i}^{2}\) for \(i=1,\;2,\;\ldots,\;n\)). On the right-hand side of Equation (3), the product of the symmetric and positive definite matrices will increase the diagonal elements of the resulting matrix. Therefore, to reduce their products and heuristically minimize \(\mathbf{C}_{\Delta\mathbf{\hat{x}}}\), a convenient method is to set \(\mathbf{W}=\mathbf{C}_{\mathbf{e}}{}^{-1}\).  
\[\begin{array}{ll}\mathbf{C}_{\Delta\mathbf{\hat{x}}}&=\big{(}\mathbf{H}^{T} \mathbf{C}_{\mathbf{e}}{}^{-1}\mathbf{H}\big{)}^{-1}\big{(}\mathbf{H}^{T} \mathbf{C}_{\mathbf{e}}{}^{-1}\mathbf{C