Keywords

1 Introduction

“Android”, the name of the humanoid robot in the science fiction L’Eve Future written by French author Auguste Villiers de L’lsle-Adam, which represents the most popular smart operating system now. In 2003, Andy Rubin founded Android Inc. and began to research and develop the intelligent operating system. In 2005, Google Inc. acquired Android as well as its R&D team. In November 2007, Android operating system was roll-out, and a global Open Handset Alliance composed of 34 software, hardware and telecommunication enterprises was established to develop open standards for Android devices. In 2008, Google released the initial version of Android, approved by the US Federal Communications Commission. As the system continued updating and optimizing, Android has been widely accepted by customers. By the first quarter of 2017, the market share of Android has reached about 86% [1].

The early version Android can export the location such as longitude, latitude and altitude with GNSS controller, and provides the related application program interface (API) to obtained location. However, due to the commercial confidentiality requirement of the manufacturer, the operating system encapsulates the variables of GNSS measurements, so that it is impossible for developers and users to obtain the GNSS measurements. In 2016, the Android Nougat system was released by Google Inc. added the APIs to export the available GNSS raw measurements, which brought a chance to get the pseudo-range and carrier phase measurements to achieve precision positioning by the mobile phone.

At present, the Android smart mobile devices that support the output of GNSS raw observations include HUAWEI’s Honor 8 and 9, HUAWEI’s P9 and P10, HUAWEI’s mate 9, Samsung’s S8, Google’s Pixel and Nexus 6P, 5X phones and Nexus 9 tablets. The main feature of those device is listed in Table 1 [2].

Table 1 Comparison between compatible devices

This paper briefly introduces the Android system library about GNSS raw measurements and APIs to obtain measurements. Moreover, it assessed the measurement data collected by Huawei P9 smartphone in Carrier-to-Noise Ratio(C/N0), Pseudorange Noise, Ranging Precision and Cycle Slip.

2 Location Libraries and GNSS Raw Measurements

Compared with the earlier versions, new classes had been added into the Location library in Android Nougat, such as GnssMeasurement class, GnssNavigation class, GnssClock class and so on.

The GnssClock class, which represents a measurement of the receiver’s clock, mainly contains the timestamp information. As Android is developed based on the Linux kernel, the clock set in Android devices can be classified into the Real Time Clock (RTC) and the System Clock. The System Clock is a “software” clock to users. The RTC is a “Hardware” Clock (HWClock), which runs independently from the operating system. The RTC is maintained by an integrated circuit in the smart devices. In the previous version of Android, developers and users cannot obtain HWClock timestamps as it is encapsulated. The GnssClock class provides methods to get HWClock, so the developers can compute the GPS time of Android devices.

GnssMeasurement class mainly contained raw measurements and computed information, such as Constellation Types, Carrier Frequency, Space Vehicle ID, Carrier-to-Noise Ratio, Received Satellite Time, Pseudorange Rate, Accumulated Delta Range, etc. And GnssNavigationMessage class contained a GNSS satellite Navigation Message. These classes is indispensable to compute pseudorange and carrier phase measurements so as to position precisely on Android devices.

3 Quality Assessment

With a NovAtel GNSS receiver set together, a Huawei P9 (EVA-AL10) smartphone was adopted to collect measurements on the rooftop station in Zhengzhou, Henan Province, without electromagnetic interference detectable and obstacles above 10° of elevation angle around. The data during 15:44:37–00:15:17, Nov. 11th, 2017 (GPST) was selected as the sample with 1 s interval, 30,642 valid epochs and 227,831 valid measurements.

3.1 Carrier-to-Noise Ratio

As shown in Fig. 1, in good observing condition, the Carrier-to-Noise Ratio of signal received by Huawei P9 mainly distributed within 20–35 dBHz.

Fig. 1
figure 1

Distribution of C/N0 on Huawei P9

As shown in Fig. 3, the CNR of signal from G30 satellite decreased as the elevation angle of satellite descend. Referring to the observation data, the mean CNR value is 28.88 dBHz. When the elevation angle was below 30°, the CNR was under 25 dBHz. And it reached above 30 dBHz only with a elevation angle over 40°. However, in the same condition, the mean CNR value of NovAtel DL-V3 receiver was 44.64 dBHz (Fig. 2).

Fig. 2
figure 2

Distribution of C/N0 on NovAtel receiver

Fig. 3
figure 3

C/N0 and elevation (G30)

3.2 Pseudorange Measurements

3.2.1 Theoretical Pseudorange Noise

Pseudorange noise is one of the key point of the quality assessment for navigation devices. Since PN code ranging is achieved by accurate tracking of PN code, the noise of code tracking is the decisive factor of range measurement. The principles were shown as follow.

$$ \sigma_{CELP}^{2} = \frac{{K_{1} }}{{C_{s} /N_{0} }} $$
(3.1)
$$ \sigma_{NELP}^{2} = \sigma_{CELP}^{2} \left[ {1 + \frac{{K_{2} }}{{C_{s} /N_{0} }}} \right] $$
(3.2)
$$ K_{1} = \frac{{B_{L} (1 - 0.5B_{L} T)\int_{{ - \beta_{r} /2}}^{{\beta_{r} /2}} {G_{s} } (f)\sin^{2} (\pi f\Delta )df}}{{(2\pi )^{2} \left( {\int_{{ - \beta_{r} /2}}^{{\beta_{r} /2}} f G_{s} (f)\sin(\pi f\Delta )df} \right)^{2} }} $$
(3.3)
$$ K_{2} = \frac{{B_{L} (1 - 0.5B_{L} T)\int_{{ - \beta_{r} /2}}^{{\beta_{r} /2}} {G_{s} } (f)\cos^{2} (\pi f\Delta )df}}{{T\left( {\int_{{ - \beta_{r} /2}}^{{\beta_{r} /2}} f G_{s} (f)\cos(\pi f\Delta )df} \right)^{2} }} $$
(3.4)

\( C_{s} /N_{0} \) is Carrier-to-Noise Ratio; \( \sigma_{CELP}^{2} \) is the tracking error of coherent delay-locked loop; \( \sigma_{NELP}^{2} \) is that of noncoherent delay-locked loop. Most of GNSS receivers adopt the noncoherent delay-locked loop. And \( K_{1} \), \( K_{2} \) are the coefficients which is related to loop bandwidth \( B_{L} \), integrate time \( T \), filter bandwidth \( \beta_{r} \), Code correlation interval \( \Delta \). \( G_{s} (f) \) is the normalized power spectral density with infinite bandwidth, and \( \int_{ - \beta /2}^{\beta /2} {G_{s} } (f)df = 1 \) [3]. Referring to the equation above, it is obvious that when CNR gets higher, the code tracking error increases as the range noise reducing.

As shown in Figs. 4 and 5, the range noise of Huawei P9 distribute from 5 to 40 m. The mean theoretical value of pseudorange noise is about 10.76 m. Comparing the theoretical pseudorange noise with CNR, it can be approved that the noise value reduces as the CNR values rises.

Fig. 4
figure 4

Distribution of pseudorange noise

Fig. 5
figure 5

Fitting curve: pseudorange noise and C/N0

3.2.2 Pseudorange Noise in Practice

In terms of the pseudorange measurements computed, the polynomial fitting method was used to get the pseudorange noise with each 120 adjacent measurements divided into one segment to compute the fitting parameters [4, 5].

Figure 6 has shown the Huawei P9 pseudorange noise of each satellite. In general, the value decreases when the CNR gets higher. Most of the pseudorange noise values of each satellite were within 8–12 m and no higher than 20 m. The mean noise value of all is 10.10 m, close to the theoretical pseudorange noise while that of Novatel receiver was only 0.023 m, as shown in Fig. 7.

Fig. 6
figure 6

Pseudorange noise of Huawei P9

Fig. 7
figure 7

Pseudorange noise of NovAtel receiver

3.3 Carrier Phase Measurements

3.3.1 Carrier Phase Noise

As mentioned already, the tracking noise of carrier phase measurements is the main factor of carrier phase range noise. The principles were shown as follows.

$$ \sigma_{coherent}^{2} = \frac{{K_{ 3} }}{{C_{s} /N_{0} }} $$
(3.5)
$$ \sigma_{cost}^{2} = \sigma_{coherent}^{2} \left[ {1 + \frac{{K_{ 4} }}{{C_{s} /N_{0} }}} \right] $$
(3.6)
$$ K_{3} = \frac{{B_{\theta } (1 - 0.5B_{\theta } T)}}{{\int_{ - \beta /2}^{{\beta_{r} /2}} {G_{s} } (f)df}} $$
(3.7)
$$ K_{4} = \frac{1}{{2T\int_{{ - \beta_{r} /2}}^{{\beta_{r} /2}} {G_{s} (f)df} }} $$
(3.8)

\( \sigma_{coherent}^{2} \) is the coherent delay-locked loop tracking error; \( \sigma_{cost}^{2} \) is the noncoherent delay-locked loop tracking error; \( B_{\theta } \) is loop bandwidth [5]. And also the tracking precision decreases as the CNR gets lower [3].

As is shown in Figs. 8 and 9, when cycle slip occurred, the carrier phase range noise overflows and without cycle slip, the noises mainly distributes within 0.001–0.006 m, reducing as the C/N0 gets higher.

Fig. 8
figure 8

Distribution of carrier phase noise

Fig. 9
figure 9

Fitting curve: carrier phase noise and C/N0

3.3.2 Cycle Slip Detection

Cubic epoch differential method was adopted to detect cycle slip with carrier phase measurement.

$$ \Delta \rho (t_{i} ) = \rho (t_{i} ) - \rho (t_{i - 1} ) $$
(3.9)
$$ \nabla \Delta \rho (t_{i} ) = \Delta \rho (t_{i} ) - \Delta \rho (t_{i - 1} ) $$
(3.10)
$$ \Delta \nabla \Delta \rho (t_{i} ) = \nabla \Delta \rho (t_{i} ) - \nabla \Delta \rho (t_{i - 1} ) $$
(3.11)

By means of differential method, the cycle slip of carrier phase can be amplified to be more detectable [6].

It was found after analysis that the cycle slip ratio of carrier phase measurements received from Huawei P9 smartphone is overtop. According to statistics, there are 120, 759 measurements with cycle slips in 227,831 carrier phase measurements (Table 2). Compared with Huawei P9, that of NovAtel is much lower with only 28 measurements containing cycle slip. However, not all the Android smart devices (Table 3) have this fault. In similar conditions, using the Nexus 9 tablet with better performance collecting 31,791 measurements during 22:32:21–23:36:59, Aug. 7th, 2017 (GPST), there was only 326 cycle slips detected (Table 4).

Table 2 Principle of cycle slip detection
Table 3 Cycle slip of Huawei P9
Table 4 Cycle slip of Nexus 9

4 Conclusion

The report briefly introduced GNSS libraries and raw measurements of Android system. Moreover, it assessed the Huawei P9 GNSS measurements and compared it with that of NovAtel receivers. It was demonstrated that in the same observing environment, the quality of Huawei P9 GNSS measurements still need to be improved.

  1. (1)

    The mean value of signals CNR from NovAtel GNSS receivers is 44.63 dBHz, much higher than that from Huawei P9, 28.88 dBHz.

  2. (2)

    The mean pseudorange noise of NovAtel receiver is only 0.023 m, while that of Huawei P9 smartphone reaches above 8 m. Moreover, the cycle slip of carrier phase measurements occurs much too frequent on Huawei P9.

  3. (3)

    Though the GNSS raw measurements are now available in the output of Android Nougat, the GNSS module inside smartphone still needs to be optimized.