## 3 Measurement Weighting and Exclusion (WE)
### Measurement Weighting
This difference of error for a given RHCP CN0 value is mainly due to the multipath effects (scenario dependent), which will be visible in the LHCP component. For this reason, a two-dimensional or equivalently a 3D-shape fitting will be performed. This is illustrated in Figure 10 in which the shaded-shape is the resulting fitting after estimating the model parameters in Equation (5) using the empirical data shown as the colored shape. It should be noted that the fitting is performed using all the collected data (i.e., including all scenarios). This increases the number of samples used to estimate the error for a given value of CN0 and RLR. So, we have smooth transitions avoiding abrupt peaks in the experimental data such as the one experienced in Figure 9 for the Urban curve at CN0 = 36 dB-Hz. Figure 9: Comparison of the pseudorange error as a function of the CN0 (**a**) and RLR (**b**) for different scenarios. The gap between curves is due to multipath effects to be modeled through the LHCP component. Before estimating the model parameters, let us first talk about the empirical computation of the range errors. Indeed, both pseudorange and phase measurements should be analyzed. In order to empirically compute the measurement errors, for the pseudorange, we use the traditional code-minus-carrier (CMC) iono-free combination. For the phase error, let us define the residual phase error, \(\epsilon_{\mathrm{r}}\), as the difference between the measured phase, \(\phi_{\mathrm{m}}\), and the one obtained from the estimated PVT solution, \(\tilde{\phi}\). Then, we have  
\[\epsilon_{\mathrm{r}}\doteq\phi_{\mathrm{m}}-\widetilde{\phi}=\phi_{\mathrm{m }}-\widetilde{\phi}+\phi-\phi=\epsilon_{\phi}+\phi-\widetilde{\phi}, \tag{6}\]  
with \(\phi\) the real phase and \(\epsilon_{\phi}\doteq\phi_{\mathrm{m}}-\phi\) the phase measurement error. It is worth pointing out that the term \(\phi-\widetilde{\phi}\) is equivalent to the projection of the error vector, \(\epsilon\), into the truth range vector, \(\widehat{\rho}\) (see Figure 11). For clarification, we have the tuple \(\{\phi,\phi_{\mathrm{m}},\widetilde{\phi}\}\) corresponding to the real (unknown) phase, the measured phase provided by the GNSS receiver, and the phase we would get from the estimated PVT to the given satellite, respectively. It is worth noting that \(\widetilde{\phi}\) is used here in order to get the following formula for the phase error, which can be easily computed with the available data:  
\[\epsilon_{\phi}=\epsilon_{\mathrm{r}}-\epsilon^{\top}\widehat{\rho}, \tag{7}\]  
where \(\epsilon\) is the 3D vector given by the difference between the estimated PVT and the real position, and \(\widehat{\rho}\) is the unitary vector of the direction between the real position and the satellite. Summarizing, to compute the phase error, we use the phase residual error minus the projection of the PVT error into the truth range, which is available data within the FANTASTIC project. Figure 10: Least-Squares 3D fitting of the measured phase errors as a function of the RHCP to LHCP ratio and the CN0 of the RHCP component. Empirical data (colored) and fitted shape (black). Once both pseudorange and phase measurement errors are calculated, the next step is to estimate the model parameters from this data. For the sake of notation simplicity, let us define \(x_{i}\doteq\text{CN0}_{\text{R}}(i)\) and \(y_{i}\doteq P_{\text{L}}(i)/P_{\text{R}}(i)\) with \(i=1,\ldots,N\) the measurement index. Let also \(\sigma^{2}(i)\) be the measured root mean square (RMS) error of the range measurements. Therefore, from Equation (5), we can write  
\[\mathbf{\sigma}^{2}= \begin{bmatrix}\sigma^{2}(1)\\ \sigma^{2}(2)\\ \vdots\\ \sigma^{2}(N)\end{bmatrix} = \begin{bmatrix}\frac{1}{x_{1}}&\frac{y_{1}}{x_{1} }\\ \frac{1}{x_{2}}&\frac{y_{2}}{x_{2}}\\ \vdots&\vdots\\ \frac{1}{x_{N}}&\frac{y_{N}}{x_{N}}\end{bmatrix} \cdot \begin{bmatrix}a\\ b\end{bmatrix} =\mathbf{H}\mathbf{\theta}, \tag{8}\]  
and the model parameters can thus be estimated by a least-square fitting as  
\[\widehat{\mathbf{\theta}}=