GNSS code and carrier phase observations of a Huawei P30 smartphone: quality assessment and centimeter-accurate positioning

In 2016, an application programming interface was added to the Android operating systems, which enables the access of GNSS raw observations. Since then, an in-depth evaluation of the performance of smartphone GNSS chips is very much simplified. We analyzed the quality of the GNSS observations, especially the carrier phase observations, of the dual-frequency GNSS chip Kirin 980 built into Huawei P30 and other smartphones. More than 80 h of static observations were collected at several locations. The code and carrier phase observations were processed in baseline mode with reference to observations of geodetic-grade equipment. We were able to fix carrier phase ambiguities for GPS L1 observations. Furthermore, we performed an antenna calibration for this frequency, which revealed that the horizontal phase center offsets from the central vertical axis of the smartphone and also the phase center variations do not exceed 1–2 cm. After successful ambiguity fixing, the 3D position errors (standard deviations) are smaller 4 cm after 5 min of static observation session and 2 cm for long observation session.


Introduction
Since the introduction of Android 7 in 2016, GNSS observations of a large number of smartphones are readily accessible (Banville and van Diggelen 2016). The observations can now be processed by android apps or stored in a file. Thus, they are also available for analysis in postprocessing.
The key to obtaining sub-meter positioning accuracies with GNSS lies in the carrier phase observations and the ability to fix their ambiguities to the correct integer values. Until 2018, all smartphones contained just single-frequency GNSS receivers. Now also phones with GNSS dual-frequency capability are offered. These additional observations on a second frequency can increase signal availability, allow ionosphere monitoring and tremendously simplify ambiguity fixing by employing widelane techniques.
Up to 2018, no successful ambiguity fixing with smartphone observations was reported. Most published results have been based on the so-called carrier phase float solutions without ambiguities fixing. Often, such smartphone positioning results are obtained in absolute mode (precise point positioning) as, e.g., published by Laurichesse et al. (2017), Elmezayen and El-Rabbany (2019) and Wu et al. (2019). Recently, ambiguity fixing in baseline mode was demonstrated by Niu et al. (2019) with static observations of a short baseline.
We were interested in performing carrier phase ambiguity fixing and positioning with a smartphone that contains a dual-frequency GNSS receiver. We bought a Huawei P30, which was released in March 2019. It uses the Kirin 980 chipset (Huawei 2019), designed and manufactured by HiSilicon, a subsidiary of Huawei. In order to evaluate the capabilities of the Huawei P30 for cm-accurate positioning, we designed and built a smartphone holder that allowed us to perform measurements in an upright position and to mount the smartphone on tribrach and tripod. We also defined a north direction for the smartphone antenna: The antenna is oriented toward the north when the display points south (Fig. 1).
We collected several sessions of static smartphone GNSS observation data at different sites and analyzed signal strength, quality of code and carrier phase observations; determined the Huawei P30 antenna phase center; and evaluated positioning results.

Data collection
We performed several static sessions, each of 6-12 h on roof-top and in-the-field environments (Fig. 1). Our analysis is based on more than 80 h of GNSS observations gathered by the Huawei P30. The data collection took place in June and July 2019. All locations were selected to be ideal for GNSS observations, i.e., without significant signal obstructions and strong multipath reflectors.
The Huawei P30 GNSS observations were collected and stored in ASCII output files by the Android app GNSS Logger (Banville and van Diggelen 2016;van Diggelen and Khider 2018). We wrote a RINEX converter called AND2RNX to extract epoch time, satellite number, code, carrier phase, Doppler and signal strength (C/N 0 ) from the GNSS Logger output files and store them in RINEX 3.04 format (IGS/RTCM 2018). All data analysis were performed using the first author's GNSS processing software (WaSoft modules). The operating system of Huawei P30 and all software versions were the most recent ones available in June/ July 2019.
When starting GNSS observation with the Huawei P30 by activating the location mode, GPS, GLONASS and BDS satellites were tracked instantaneously, whereas it usually took some time until Galileo satellites were tracked as well. The observed carrier phase measurements were continuous without the need to manually stop duty cycling (Laurichesse et al. 2017;Paziewski et al. 2019). Even with standard settings of the equipment, duty cycling seems to be disabled.
A first statistical analysis of the collected observations revealed that the Galileo observations were the least complete ones. In every session, there were one or more Galileo satellites with observations on just one frequency, either E1 or E5a. Furthermore, there were 4 healthy Galileo satellites and also some GLONASS satellites which were not observed at all. More findings are summarized in Table 1.
In order to perform carrier phase positioning in baseline mode, we needed simultaneously observed reference observations. The roof-top observations of the Huawei P30 were complemented by GNSS observations with high-grade GNSS equipment: Septentrio PolaRx5 receiver connected to a JavRingAnt_DM JVDM antenna. The baseline length between smartphone and geodetic antenna amounted to just a few meters. Of even more important for our analysis were observations of Virtual Reference Stations (VRS; Odijk and Wanninger 2017) computed from real observation data of three Trimble Net R9 receivers of the Saxon part of the German SAPOS network (Riecken and Kurtenbach 2017). The real reference stations used for the VRS computations are located at distances of 6, 33 and 42 km from our instrument setups, whereas the VRS was placed within a few meters.

Signal strength
Each set of code, carrier phase and Doppler observations of the Huawei P30 is accompanied by a signal strength measurement in the form of a carrier-to-noise power density ratio (C/N 0 ) (dB-Hz). These values contain important information on the observation quality, but also on the antenna gain as a function of signals incidence angle.
In order to determine signal strength for the complete upper hemisphere, observations were collected in several sessions with different azimuthal orientations of the smartphone. That is, we rotated the smartphone holder between sessions by pre-selected angle values. As a result, we obtained C/N 0 patterns for every GNSS and signal, among them GPS L1 and Galileo E5A (Fig. 2).
The antenna properties differ very much from those of geodetic antennas. As already reported by, e.g., Zhang et al. (2018), the C/N 0 -values are on average lower by approximately 10 dB-Hz as compared to geodetic-grade equipment. Furthermore, the Huawei P30 antenna gain varies only very little with incident angle, whereas geodetic antennas typically show a large decrease in gain with decreasing elevation angle. Similar findings had already been reported by Paziewski et al. (2019). The antenna gain pattern of the Huawei P30 shows azimuthal variations at low elevation angles with weakest signals incident from northwest and southeast if the phone is oriented according to the conventions shown in Fig. 1. Furthermore, the antenna is not as sensitive for L5/E5a signals as compared to L1/E1. Also, especially for L5/E5a, antenna gain decreases above an elevation angle of 60°.
In the later data processing of code and carrier phase observations, it was found that a C/N 0 mask of 35 dB-Hz (GPS L1) effectively removes all observation outliers, which frequently occur for weaker signals.

Quality of code observation
The quality of the code observations can be derived from comparison with phase observations. If dual-frequency phase observations exist, they are used for mitigating of ionospheric delays. This widely used method is known as the multipath combination (MP; Hauschild 2017) or codeminus-carrier (CMC; Braasch 2017). It is free from any We performed a statistical analysis of more than 40 h of observations. Figures 3 and 4 show results for the dual-frequency observations of GPS and Galileo signals. The elevation dependence of the MP-values (Fig. 3) is very small. GPS and Galileo code observations on L1/E1 exhibit a constant level of their quality over the whole elevation range. Observations on L5/E5a, however, seem to be of slightly higher quality (smaller MP-values) for lower elevation angles as compared to higher ones. This finding corresponds to the decline of signal strength under higher elevation angles, as demonstrated for Galileo E5a (Fig. 2).
The same MP-values were evaluated again but now as a function of signal strength (C/N 0 ). Here, a clear dependence of the code multipath and noise level on C/N 0 can be observed (Fig. 4). The higher the C/N 0 value, the higher is the quality of the code observation.
This finding is of importance for the correct weighting of code observations in the position estimation process.
Due to the described characteristics of the GNSS antenna, an elevation-dependent weighting of the code observations does not yield the optimum result. The weighting has to be performed with respect to the C/N 0 estimates. Another important aspect to be considered for the correct weighting of the code observations is the overall multipath and noise level of the signals of individual GNSS and frequencies. We found that all signals show similar statistical values of about 2 m on average (Table 2). GPS L1 and observations on L5/E5a possess slightly smaller values. Multipath and noise on the level of 2 m is larger by about 1 order of magnitude as compared to geodetic-grade equipment under similar multipath conditions.

Ambiguity fixing
In order to test whether the carrier phase observation data have the property of integer ambiguities, we evaluated doubledifference (DD) residuals of the baselines between geodeticgrade equipment and smartphone. The coordinates of these baselines had been determined by previous GNSS observation sessions so that they could be introduced as known. Furthermore, because of the short distance, DD residuals are free of atmospheric effects and they are not affected by orbit errors. Antenna phase center corrections (or at least approximate corrections on the 1 to a few centimeter level) must be applied for both antennas. Thus, the DD residual information contents comprise carrier phase multipath, noise and eventually differential instrumental delays, which may prevent integer ambiguities.
The integer property of the carrier phases can be detected best in histograms of fractional cycle DD residuals. In the case of the baselines between geodetic-grade equipment and Huawei P30, only GPS L1 residuals have a clear maximum around the full cycle and minimums around plus or minus half a cycle (Fig. 5). The distributions of the fractional cycle DD residuals of all the other five signals look completely different. No clear maxima around the full cycles exist and, thus, we can conclude that ambiguity fixing cannot be performed successfully.
In the case of GPS L1, 39% of the fractional cycle DD residuals fall in the range from -0.1 to 0.1 cycles (Fig. 5). This percentage is very low when compared to percentages that are obtained in baselines between geodetic-grade equipment, where the corresponding values almost always exceed 95% on all observed signals. This difference demonstrates the lower quality of the Huawei P30 carrier phase data as compared to geodetic-grade equipment.
Since ambiguity fixing could be performed successfully on GPS L1 only, the further evaluation of carrier phase data is restricted to single-frequency applications. Hence, we could not test fast ambiguity fixing with multiple frequencies based on widelane techniques, whether in baseline or PPP mode.
The integer property of the carrier phase measurements is a prerequisite for ambiguity fixing. The actual ambiguity fixing rate, however, depends also on a lot of other factors. These include, among other things, the quality of the observations of reference and rover receivers, the baseline length and the abilities of the processing software.

Calibration of Huawei P30 antenna
Centimeter-accurate carrier-phase positioning requires precise information of the average phase center position and possible phase center variations (PCV). We thus calibrated the Huawei P30 in our roof-top environment with the smartphone being mounted in its holder, as shown in Fig. 1. We selected an antenna reference point (ARP) to which the phase center offsets (PCO) refer (Fig. 6). The geodetic-grade equipment with its JavRingAnt_DM JVDM antenna served as reference. It had been calibrated in an anechoic chamber (Becker et al. 2010). Since the baseline between the reference receiver and smartphone amounts to just a few meters, all atmospheric influences are eliminated and do not affect the calibration results.
Full calibrations were performed twice: once in 4 separate sessions of several hours with different azimuthal orientations of the equipment and, secondly, by using the DRB2 rotational device, which enables observations in four azimuthal orientations per minute (Schmolke et al. 2015). The observations in various azimuthal orientations enable the determination of phase center variations for the complete upper hemisphere and they also help to mitigate carrierphase multipath effects.
A carrier-phase calibration requires ambiguity fixing in the short baseline between the reference antenna and antenna to be calibrated. Since we succeeded with a reliable and complete ambiguity fixing for GPS L1 only, the calibration results refer to this one signal. However, they can be used for other signals with identical frequency (i.e., Galileo E1) without any loss of accuracy.
The calibration results consist of PCO and PCV values for GPS L1 (Fig. 7). The results of the individual calibrations agreed very well, and a combined result was computed. The antenna phase center is located at the top of the equipment with a small offset to the right (Fig. 6). Differences between individual calibrations reach up to 1-2 cm, which indicates that no millimeter-accurate phase center exists. All individual calibrations exhibit distinct azimuthal variations of the PCV at low elevation angles (Fig. 6). Their peak-to-peak variations are in the order of 2 cm.
The phase center calibration revealed that the antenna is located at the top of the equipment, with a small offset to the right from the central vertical axis of the smartphone. Horizontal PCO and also the PCV do not exceed 1-2 cm on GPS L1 and can be neglected for many applications. Thus, the most important number of the calibration results is the height offset of 138 mm with respect to the defined antenna reference point (Fig. 6). We stored all the results in ANTEX 1.4 format (Rothacher and Schmid 2010) and applied the corrections in the further analysis steps.

Quality of carrier phase observations after ambiguity fixing
In order to gain more inside into the statistical behavior of the carrier phase measurements, we fixed the ambiguities in the baseline between VRS and smartphone and analyzed the 1 3 64 Page 6 of 9 observation residuals. Since ambiguity fixing was successful for GPS L1 only, all results refer to this frequency. As mentioned before, we applied a 35 dB-Hz C/N 0 minimum threshold to the smartphone data to exclude observation outliers. Since the residuals originate from a baseline, their properties are a mix of the properties of the stations involved: VRS (geodetic-grade equipment) and smartphone (Huawei P30).
The single-difference residuals reach 1-2 cm RMS (Fig. 8). This is 2-5 times as much as for a similar baseline between VRS and geodetic-grade equipment. There is an elevation dependence and also a C/N 0 -dependence detectable (Fig. 8). The elevation dependence is much smaller as compared to baselines between geodetic-grade equipment. The C/N 0 -dependence is about as large as for the GPS L1 code observations (see Fig. 4).
In conclusion, the statistical properties of carrier phase observations in baselines between VRS (geodetic-grade equipment) and smartphone differ from baselines between two stations with both being equipped with geodetic-grade receiver and antenna. The processing of carrier phase observations has to take these differences into account.

Positioning results
The static observation data was split into observation sessions from 5 to 60 min, and positioning results were determined for the baselines between VRS and smartphone. We used a modified version of the baseline processing engine Wa2. The modifications relate to outlier detection thresholds, ambiguity fixing thresholds and observation weighting according to the results described above. Antenna phase center corrections were introduced for both antennas, the VRS antenna and the Huawei P30.
All results are based on GPS L1 observations, since ambiguity fixing succeeded with this signal only. We used the baseline from VRS to smartphone of two static roof-top sessions of together almost 24 h. We subdivided the observation data into sessions of shorter duration, e.g., 280 sessions of 5 min or 23 sessions of 60 min. Three kinds of static baseline results were computed: differential code (DGNSS), solutions based on carrier phase without ambiguity fixing  (Float) and after ambiguities being fixed (Fixed). For short observation durations of just some minutes, ambiguity fixing initially failed for the majority of samples. In order to achieve a large sample size of fixed solutions, ambiguities were fixed for observation durations of more than 1 h, and afterward coordinates were estimated from the observations of the short durations.
The high percentage of unfixed ambiguities with observations durations of just a few minutes is caused by the low quality of the code and of the carrier phase observations. Even under ideal environmental conditions, multipath and noise level but also the number of data gaps are much larger as compared to geodetic-grade equipment. This has a direct effect on the quality of DGNSS and float solutions and subsequently on the ability to fix carrier phase ambiguities to their true values.
The positioning results were compared with the known baseline coordinates. Table 3 presents RMS values in all 3 coordinate components for short (5 min) and long (60 min) static observations sessions. Figure 9 shows 3D-RMS values and their improvement with extended static observation durations. The differential code solutions obtained 3D-accuracies of 6.3 m (5 min) to 1.9 m (60 min), and the Float solutions reached smaller 3D-RMS-values of 0.92 m (5 min) to 0.09 m (60 min). The fixed solution achieved accuracies from 3.5 cm (5 min) to 1.6 cm (60 min) and, thus, demonstrate cm-accurate positioning. At least the fixed solutions exhibit the typical accuracy ratios among the 3 coordinate components for a mid-latitude site (Tab. 3): smallest RMS-values in East, slightly larger values in North and the height component worse by a factor of 2-3. Interestingly, the accuracy of code-based DGNSS positions is lower as compared to phase-based fixed solution by around two orders of magnitude. Such a ratio is also observed by code and carrier phase observations from geodetic-grade equipment.
Similar results were also computed for the baseline VRS to the geodetic-grade equipment (GPS L1 only). Even for the short observation durations of just 5 min, ambiguity fixing never failed. The accuracies of all three positioning methods were better by about one order of magnitude as compared to the baseline from VRS to the smartphone.