# A Controlled-Environment Quality Assessment of Android GNSS Raw Measurements
## 3 Methodology and Methods
### Smoothing of Code Pseudoranges  
Code measurements are unambiguous but noisy; on the contrary, while carrier-phase measurements are much more precise but inherently ambiguous, and the process to solve for the integer ambiguity is non affordable by mass-market receivers [12]. An intermediate solution is based on the combination of code- and carrier-phase measurements through a process denoted carrier-smoothing filtering [18; 19]. Let \(\rho(t)\) and \(\Theta(t)\) be the code and carrier pseudorange, respectively. The smoothed pseudorange at epoch \(t_{n}\) can then be defined by the following finite-difference equation:  
\begin{table}
\begin{tabular}{l c c c c c} \hline \hline
**Device** & **CEP (m)** & \begin{tabular}{c} **Horizontal** \\ **RMSE (m)** \\ \end{tabular} & \begin{tabular}{c} **North (m)** \\ \(\mu\pm\sigma\) \\ \end{tabular} & \
\begin{tabular}{c} **East (m)** \\ \(\mu\pm\sigma\) \\ \end{tabular} &
\begin{tabular}{c} **Height (m)** \\ \(\mu\pm\sigma\) \\ \end{tabular} \\ \hline Huawei P10 & 15.1 & 10.6 & \(10.4\pm 12.1\) & \(1.7\pm 8.9\) & \(-10.0\pm 37.1\) \\ Samsung S8 & 11.4 & 6.2 & \(-6.0\pm 11.1\) & \(1.8\pm 9.6\) & \(-8.1\pm 33.1\) \\ Xiaomi MI 8 & 3.8 & 3.3 & \(3.2\pm 2.6\) & \(0.8\pm 2.1\) & \(0.0\pm 7.5\) \\ \hline \hline \end{tabular}
\end{table}
Table 1: Statistics of the positioning solutions obtained from smartphones in a real environment.  
Figure 4: North (**a**) and East (**b**) position errors with respect to the reference position for all the three smartphones under the test in a real environment.  
\[\bar{\rho}(t_{n})=\frac{1}{L}\rho(t_{n})+\frac{L-1}{L}\left[\bar{\rho}(t_{n-1})+ \Theta(t_{n})-\Theta(t_{n-1})\right] \tag{5}\]  
where \(L\) is a weight coefficient and \(\Theta(t_{n})-\Theta(t_{n-1})\), called the delta pseudorange, which is obtained by differencing subsequent epochs. As long as no carrier-cycle slips occur, the integer-ambiguity term is constant and disappears thanks to the difference operation. While the noise term of code measurement \(\rho(t_{n})\) is at meter level, the noise term of the carrier-phase measurement \(\Theta(t_{n})\) is at centimeter level. Furthermore, if the two measurement epochs are close enough to each other, in the order of a few seconds, the ionospheric delay term can be considered constant and thus disappears in the delta pseudorange. Parameter \(L\) controls the weight of the code and carrier contributions. A higher \(L\) assures lower noise variance, but introduces a bias in the smoothed code pseudorange due to the different sign of the ionospheric delay in code and phase measurements, known as code-carrier divergence. Carrier smoothing is indeed a valuable technique to improve the accuracy of the positioning solution in smartphones, which cannot employ pure carrier-phase measurements.  
Figure 5 reports a comparison of raw pseudorange measurements and the correspondent smoothed version. The related positioning solution is obtained over 30 min of data. The error with respect to the true position, in East-North coordinates, is plotted on the right. The positioning obtained by exploiting code-based measurements is compared to the solution obtained exploiting carrier smoothing. The smoothing weight \(L\) was set to 100. The accuracy of the results improves by about one order of magnitude when smoothing is enabled. However, the carrier-smoothing measurements are valid as long as the phase measurements are stable and not affected by carrier-cycle slips. Impairments on the signal carrier phase can cause cycle slips, errors of one full cycle made by the receiver tracking loop in estimating the phase of the signal. Cycle slip, although being irrelevant for code-based measurements and for the purpose of estimating the carrier Doppler frequency, lead to errors in phase-based and carrier-smoothed measurements, and consequently to a degraded positioning performance.