In this month’s column, we take a look at some initial efforts to independently process smartphone measurements. How good are the results? Read on.
IT WAS 1999. That was the year when the first mobile or cell phones equipped with GPS became available. Garmin introduced the NavTalk Pilot aimed at aviators and Benefon, a former Finnish cellphone manufacturer, offered the Benefon Esc! These devices benefited from the continuing reduction in the size (and power needs) of GPS receivers, which had been shrunk to just a few integrated circuits or chips.
I documented that progress in GPS technology in an article for this column in April 2000 titled “Smaller and Smaller: The Evolution of the GPS Receiver.” In that article, I also mentioned that receiver modules had been made small enough to be put in a wristwatch. This was something that I and other researchers at the University of New Brunswick had predicted in a paper presented at a meeting in 1983. Talk about prescient.
In our paper, we said “With the miniaturization and cost reduction being experienced continually, it is surely safe to postulate the limit of this evolution: a cheap ‘wrist locator’ giving instantaneous positions to an accuracy of 1 [millimeter].” Elsewhere in the paper, we suggested a price for this technological wonder of $10, and that it would be available sometime in the twenty-first century.
Costing about $400 and giving GPS Standard Positioning Service accuracies, the first “wrist locator” also came on the market in 1999 — before the 21st century began. While we may have been a bit overly optimistic in the capabilities and cost of the “wrist locator,” the basic prediction came true earlier than expected. And I said in that April 2000 column that there’s room for further development. No kidding. It wasn’t many years after that GPS World article appeared that we had announcements of single-chip receivers that could be more easily integrated into cell phones and other devices.
And today we have “system on chip” integrated circuits that combine many of the major functions of a cell phone into a single chip including a multi-core microprocessor, modems for two-way radio communications and most of the functioning of a GNSS receiver. And I say GNSS receiver as the latest chips support not just GPS but GLONASS, BeiDou, Galileo and the Quasi-Zenith Satellite System as well as satellite-based augmentation systems.
The widespread addition of GPS receivers to cell phones was initially stimulated by E-911 requirements in North America and similar initiatives elsewhere. In the United States, the Federal Communications Commission requires cell-phone carriers to report phone location to within 50 meters for 67 percent of emergency calls, and within 150 meters for 90 percent of calls. Such accuracies are readily achieved in most outdoor locations even with some multipath signal degradation. In fact, positioning accuracies for cell phones in benign environments are often better than 10 meters, even approaching the meter level at times. This allows us to use applications on our GNSS-equipped smartphones for navigation, for example. As a result, some smartphone users are abandoning their vehicle “satnavs” in a move not unlike the abandonment of landline telephones.
While positioning accuracy at the meter or few-meter level may be adequate for pedestrian and vehicle navigation, sub-meter-level accuracy might be desirable for certain tracking applications and other uses–including some we haven’t even dreamed of yet. So, are such cell-phone positioning accuracies achievable with current technology? How close are we to having personal navigation devices with the one-millimeter accuracy of our futuristic “wrist locator?” Thanks to Google’s recent release of code to permit access to the raw GNSS measurements from smartphones and tablets running a version of the Android operating system, researchers and developers are able to answer that question.
In this month’s column, we take a look at some initial efforts to independently process smartphone measurements. How good are the results? Read on.
By Simon Banville and Frank van Diggelen
The development of low-cost GNSS chips spurred a revolution in positioning, navigation and timing (PNT) devices. Once reserved for military operations and high-end geodetic applications, GNSS positioning eventually found its way into the lives of millions (if not billions) of users with the development of GNSS-enabled car navigation devices and smartphones.
The meter-level accuracies provided by GNSS receivers in smartphones enabled a wide range of location-based services including social networking, vehicle tracking, weather services and so on. At the other end of the spectrum, more expensive GNSS equipment can provide centimeter- and even millimeter-level accuracies by tracking signals on multiple frequencies and by using high-quality antenna and receiver components. Such GNSS receivers are utilized in a variety of applications such as tectonic motion monitoring, land surveying, precision farming, oil and gas exploration, and machine control.
During its “I/O 2016” conference held in May 2016, Google announced that raw GNSS measurements from smartphones and tablets running the Android N (“Nougat” = version 7) operating system would be made available to developers. The implications of this initiative are significant for the community since it allows us to move away from the black-box concept of the GNSS receiver providing meter-level accuracies and opens up the possibilities of using pseudorange, Doppler and carrier-phase measurements to derive more accurate positions. Even if the low-cost GNSS antennas and chips contained in smartphones will never outperform high-end geodetic instruments, it is an interesting research avenue to investigate how far these devices can take us. This opportunity could in turn spark the emergence of new applications that would not have been envisioned before.
Even though the opportunities for high-precision positioning with smartphones were limited prior to this announcement, scientists and engineers have already tried to tackle this issue. For instance, researchers at the University of Texas at Austin used a smartphone antenna to feed GNSS signals into a software-defined receiver built at their facility.
While carrier phases were affected by significant time-correlated errors such as multipath, centimeter-level differential positioning could still be achieved. Direct access to GNSS measurements from modified smartphone firmware was also reported. In one such experiment, a survey-grade antenna was used to feed GNSS signals to a modified Samsung Galaxy S5 smartphone running a Broadcom GNSS chip. The analysis revealed a nonzero and drifting bias in the carrier-phase measurements that prevented both floating-point-valued-ambiguity and integer-ambiguity-fixed solutions to be computed.
Microsoft Mobile also produced custom firmware for the Nokia Lumia 1520 “phablet” smartphone, allowing access to raw GNSS measurements from the phone’s internal Qualcomm integrated receiver. This data, analyzed by members of the Finnish Geospatial Research Institute, identified pseudorange measurement noise on the order of tens of meters and carrier-phase observations contaminated by several outliers. As a result, only meter-level positioning could be achieved.
In the following sections, we first explain how raw GNSS measurements can be accessed from the Android N operating system (os). After performing a preliminary assessment of the data quality, we use state-of-the-art positioning software developed at Natural Resources Canada to assess whether precise positioning can currently be achieved using raw GPS observations collected by a smartphone.
The Android operating system defines application programming interfaces (APIs), which are a collection of protocols allowing users to access the system’s functionalities. The GNSS raw measurements are contained in the GnssClock and GnssMeasurement software classes, which are described in the android.location APIs. Google has released the GnssLogger application or app along with its source code (see FIGURE 1). You can find the app here (download the file GnssLogger.apk).
You can use the app as-is to log the GNSS measurements to a text file, or you can use the source code to build the GNSS measurements into your own app. At the same GitHub repository, you will also find the measurement data used in this article, and Matlab files for reading, processing and plotting the data.
The GnssLogger app logs the measurement data in comma-separated-value (csv) text format, and sends the file by Internet to your e-mail, Google Drive or some other file-sharing facility. The data fields are described in the GnssClock and GnssMeasurement classes in the online android.location API documentation.
The app logs the decoded ephemeris data in decimal representations of the bytes defined by the respective constellation interface control documents (ICDs). The android.location format is more aligned with typical mobile devices than existing formats, and includes concepts such as hardware clock discontinuity (to support power-save duty cycling), and received satellite time modulo 1, 2, 4, 10 or 20 milliseconds; 0.6, 1, 2 or 6 seconds; 1 day; or 1 week; depending on the satellite system, and the highest sync state achieved per satellite (such as code lock, bit sync, subframe sync and so on).
This was done because smartphone fixes are often achieved before bit sync, frame sync or time of day/week have been decoded. Thus one can derive Radio Technical Commission for Maritime Services (RTCM) or Receiver-Independent Exchange (RINEX) formats from the Android raw measurements, but not vice-versa without losing information. Developers are encouraged to create RTCM and RINEX logging apps and publish them on the Google Play Store.
The first available Android products with GNSS raw measurements are the following devices running the Android N OS: Nexus 9 tablet, Nexus 5x phone, Nexus 6p phone, Pixel phone and the Pixel XL phone. The raw measurements from Nexus 9 include accumulated delta range (that is, carrier-phase measurements) for GPS and GLONASS. The Nexus 5x, Nexus 6p and Pixel phones track GPS and GLONASS, but the raw measurements from these phones are from GPS only, and do not include carrier phase.
Future Android phones with the Android N (or newer) OS, when paired with GPS chips manufactured in 2016 or later, will support the GNSS raw measurements API.
The Nexus 9 tablet has duty cycling disabled in the forthcoming Android N 7.1 release, so it is suitable for collecting continuous carrier-phase measurements over periods of many minutes. A more detailed explanation of duty cycling is given in a subsequent section of this article.
To get a first glance into the quality of the GNSS data provided by a smartphone, a 3-minute data set was collected on August 22, 2016, at the Googleplex, located in Mountain View, California. An engineering build of the Android N OS was used with the Samsung Galaxy S7 smartphone running the Broadcom 4774 GNSS chip. This device enabled logging of carrier-phase, Doppler and pseudorange measurements on the L1 signal for GPS, GLONASS, BeiDou, Galileo and QZSS. However, in the data processing described below, only GPS observations were used.
The GNSS antenna contained within the smartphone uses linear polarization, making it especially susceptible to multipath effects resulting from GNSS signals bouncing off the ground or nearby surfaces before reaching the antenna. In the process of computing the observations, the GNSS receiver must discriminate between the direct signal and the reflected ones, resulting in noisier and possibly biased measurements.
FIGURE 2 shows the carrier-to-noise-density ratio (C/N0) for the signal at the antenna input. Differences in the elevation angle of satellites above the horizon typically explains the differences of C/N0 values among satellites. The sudden sharp variations on all satellites simultaneously can be attributed to the operator touching the phone. The C/N0 values measured in this example are approximately 10 dB-Hz lower than typical values obtained from a geodetic-quality antenna and receiver, which, as we expect, impacts the quality of the smartphone measurements.
FIGURE 3. Pseudorange rate and Doppler errors of GPS satellite G29 with respect to carrier-phase measurements.
FIGURE 4. Position estimates using pseudorange data only. The plotted estimates are differences with respect to the mean values in each component.
FIGURE 5 Position estimates using pseudorange and Doppler data. The plotted estimates are differences with respect to the mean values in each component.
For instance, consider GPS satellite G29 that had, on average, the highest C/N0 values in our data set. FIGURE 3 displays, in red, the error in the time variation of the pseudorange with respect to the carrier-phase measurements, computed by differencing both observables between adjacent 1-second epochs. It is clear that, even for the satellite with the strongest signal, the noise level is at the meter level and is about one order of magnitude larger than geodetic-quality measurements. The noise in the Doppler measurements can also be evaluated in a similar fashion, by comparing the mean Doppler value of two epochs with respect to the epoch-difference of carrier phases. Doppler measurements, useful in deriving the velocity of the user (speed and direction), show a much better performance with a precision at the level of a few centimeters per second.
To obtain a better insight into how noisy measurements propagate into position estimates, we show the position errors in the north (latitude), east (longitude) and up (vertical) components in FIGURE 4. To mitigate satellite-related errors, we used precise satellite orbit and clock corrections computed at Natural Resources Canada (NRCan) instead of the broadcast values transmitted in the navigation message of the GPS satellites. Atmospheric delays affecting the propagation of the signals were also accounted for.
The tropospheric delay was computed based on temperature and pressure values provided by the Global Pressure and Temperature (GPT) model, while the ionospheric delay was mitigated by using a global ionospheric map, also computed at NRCan. Additional error sources affecting GNSS observations were also accounted for, such as relativistic effects caused by the Earth’s rotation during signal propagation (a dekameter-level effect often referred to as the Sagnac effect) and the satellite orbit eccentricity (a meter-level effect). Earth tides resulting from the gravitational pull of the sun and the moon (a decimeter-level effect) were also considered, although this error source is not quite perceptible at this point. Measurement weighting was performed using the C/N0 values provided by the smartphone.
Since the exact location of the smartphone is unknown, Figure 4 displays the position estimates with respect to the mean values for each component. With position dilution of precision (PDOP) values between 1.3 and 1.5, an indication of good satellite geometry, the meter-level precisions obtained reflect the quality of the pseudorange measurements. While a meter-level accuracy is sufficient for most applications such as car navigation or finding your friends, the purpose of our study is to determine if it is possible to improve on such results.
As we have seen from Figure 3, Doppler measurements can provide a better estimate of the smartphone velocity. They can be incorporated into a positioning solution by adding velocity states (in the north, east and up directions) and by defining a maximum acceleration for the phone (in this case, it was set to a conservative value of 4.9 ms-2).
FIGURE 5 shows the resulting solution, where the position has a much smoother variation due to the velocity information provided by the Doppler measurements. During the first few epochs, larger residuals for some satellites (at the meter level) were observed for the Doppler observations, which resulted in a poor velocity determination. The original csv format generated by the GnssLogger app also contained the precision of the Doppler observables, which could have allowed for the identification of these outliers, although this information was lost when translating this file to the RINEX format used by the positioning software.
To turn the smartphone into a high-precision positioning tool, it is imperative to make use of carrier-phase measurements, which are at least 100 times more precise than pseudorange measurements. Since a GNSS receiver can only track the change in carrier phases, these measurements contain an unknown offset with respect to a true range measurement, referred to as a carrier-phase ambiguity. This offset is a constant value as long as the receiver continuously tracks the satellite.
When obstructions such as trees, buildings, overpasses, and so on are present between the satellite and the GNSS receiver’s antenna, signal tracking interruptions are likely to occur. In this case, the initial offset value is changed and the carrier-phase ambiguity needs to be reset in the position filter. During poor signal tracking conditions, such as in urban canyons or under a tree canopy, carrier-phase measurements often suffer from many discontinuities and provide little to no benefit to the solution. However, with continuous signal tracking, a much more precise solution can be obtained.
FIGURE 6 shows that the number of ambiguity resets in the data set collected were typically low, except for a few epochs where three or four satellites experienced simultaneous discontinuities. In such instances, it is likely that the solution will not be quite as stable as during continuous tracking on all satellites.
FIGURE 7. Position estimates using pseudorange, Doppler and carrier-phase data. The plotted estimates are differences with respect to the mean values in each component.
To exploit the full potential of carrier-phase measurements, a careful modeling of all error sources must be achieved. In addition to the error sources discussed earlier, the so-called carrier-phase wind-up effect caused by the rotation of the satellite antennas as the satellites revolve around Earth was accounted for. High-precision GNSS processing strategies also typically include modeling of the user antenna phase-center variations, although this information is not yet available for smartphone antennas.
As illustrated in FIGURE 7, including carrier-phase measurements in the positioning filter dramatically improved the precision of the position estimates. Notice that the scale of the y-axis has been reduced from ±15 meters in Figure 5 to ± 1 meter in Figure 7. At this point, it should be stressed that the solution is becoming precise, but is by no means accurate. With noisy pseudorange measurements and only three minutes of data, we are still expecting an accuracy of only a few meters. Nevertheless, the displacement measured by the GPS data is now closer to its expected value.
Now, it is still not clear if some of the position fluctuations observed in Figure 7 are caused by the poor quality of carrier-phase measurements or by residual ionospheric effects. To answer this question, we extracted precise slant ionospheric delays from a nearby permanent GPS station operated by UNAVCO (formerly known as the University Navstar Consortium).
This station, labeled SLAC, is located approximately 10 kilometers to the west of the Googleplex. The slightly more stable position estimates obtained, and shown in FIGURE 8, confirm that residual ionospheric errors contaminated the solution shown in Figure 7.
These results demonstrate that, by using carrier-phase measurements and by carefully modeling the error sources affecting GPS observations, it is possible to derive a centimeter-level displacement of the smartphone. Noisier position estimates in Figure 8 correlate well with fluctuations in C/N0 presented in Figure 2 or the ambiguity resets identified in Figure 6, and highlights that careful handling of the phone is required for obtaining such results.
One of the major challenges for smartphone manufacturers is to increase battery life. Since continuous use of the smartphone’s GNSS receiver would quickly drain the battery, the receiver employs a process known as duty cycling; for example, tracking GNSS signals for 200 milliseconds before shutting down for 800 milliseconds, then repeating.
As you can imagine, it is not possible for the GNSS receiver to provide continuous carrier-phase measurements with duty cycling enabled. There is, however, an exception to this process: the receiver remains continually active while decoding the navigation message. From a cold start, it takes several minutes to decode the necessary parts of the message for the satellites in view, providing us with a few minutes of continuous carrier-phase tracking. This workaround was exploited to obtain the data set analyzed in this study, but is definitely not a viable option for real-life applications.
The results presented so far demonstrate that, at this point, precise displacements can be estimated using raw GPS measurements from a smartphone. While this feature can be useful in some applications, it could also be desirable to obtain centimeter-level accuracies with a smartphone.
So, what are the current limitations to performing real-time kinematic (RTK) positioning with smartphones? To answer this question, we need to invoke the concept of ambiguity resolution, the well-known technique in differential positioning allowing precise identification of the integer carrier-phase ambiguities. Ambiguity resolution is the key to centimeter-level accurate positioning since it effectively transforms carrier-phase measurements into very precise range measurements.
However, single-epoch ambiguity resolution requires a very good (decimeter-level or better) initial position. It should be obvious when examining Figure 4 that this condition cannot be satisfied with the current quality of pseudorange measurements. The smartphone antenna is definitely the main culprit for this issue, and the use of an external antenna could be a viable, although cumbersome and expensive, solution. Another option for obtaining centimeter-level accuracies would be to average measurement noise for several minutes while benefiting from the continuity of carrier phases.
In this case, duty cycling is certainly a barrier that needs to be addressed. Smartphone or tablet manufacturers could solve this issue by adding an option to disable duty cycling of the GNSS receiver, such as has been done on the Nexus 9 tablet.
The Android N operating system now allows us to access raw GNSS measurements from smartphones or tablets through various APIs. Making this data available opens up a world of possibilities to developers for the creation of new applications.
In the study reported in this article, we examined the quality of the data with the purpose of deriving precise positioning information from a smartphone. Our preliminary results confirmed that noisy pseudorange observations can, at the moment, only provide meter-level accuracies. Nevertheless, the current quality of carrier-phase measurements can potentially allow for a precise (centimeter-level) displacement of a smartphone to be computed.
There are still some obstacles preventing smartphones from competing with low-cost RTK units, namely the quality of the antenna and the duty cycling of the GNSS receiver. We hope that, by exposing these shortcomings, the scientific community will find solutions and improve on the results presented herein.
Precise positioning with smartphones will also reveal a plethora of new issues associated with using these devices as high-precision instruments. For example, centimeter-level accuracies can only really be achieved after antenna phase centers have been characterized. Centering of the devices over the point of interest also needs further investigation. The handling of the phone to avoid signal blockages or measurement degradation certainly requires special attention. These areas offer lots of room for improvements and could very well mark the beginning of a new research era in high-precision GNSS positioning.
We would like to thank Mohammed Khider and Daniel Estrada Alva of Google for creating and publishing the GnssLogger app. We also thank them and Lifu Tang, Marc Stogaitis, Steve Malkos and Wyatt Riley of Google for creating the GNSS raw measurement API. This article is published under the auspices of the NRCan Earth Sciences Sector as contribution number 20160169.
• Google Announcement
“User Location Takes Center Stage in New Android OS: Google to Provide Raw GNSS Measurements” by S. Malkos in GPS World, Vol. 27, No. 7, July 2016, p. 36.
“Google Opens Up GNSS Pseudoranges” by A. Cameron. Online GPS World article.
• Earlier Work on Smartphone Precise Positioning
“Precise Positioning for the Mass Market” by T. Humphreys, K. Pesyna, D. Shepard, M. Murrian, C. Gonzalez and T. Novlan, keynote presentation at the International GNSS Service Workshop, GNSS Futures, Sydney, Australia, February 8–12, 2016. Available on line: (video), (slides)
“Low-Cost Precise Positioning Using a National GNSS Network” by M. Kirkko-Jaakkola, S. Söderholm, S. Honkala, H. Koivula, S. Nyberg and H. Kuusniemi in the Proceedings of ION GNSS+ 2015, the 28th International Technical Meeting of the Satellite Division of The Institute of Navigation, Tampa, Florida, Sept. 14–18, 2015, pp. 2570–2577.
“Accuracy in the Palm of Your Hand: Centimeter Positioning with a Smartphone-Quality GNSS Antenna” by K.M. Pesyna, R.W. Heath and T.E. Humphreys in GPS World, Vol. 26, No. 2, February 2015, pp. 16–18 and 27–31.
• Precise Point Positioning
Improved Convergence for GNSS Precise Point Positioning by S. Banville, Ph.D. dissertation, Department of Geodesy and Geomatics Engineering, Technical Report No. 294, University of New Brunswick, Fredericton, New Brunswick, Canada, July 2014. Recipient of The Institute of Navigation Bradford W. Parkinson Award for 2014.
“Precise Point Positioning: A Powerful Technique with a Promising Future” by S.B. Bisnath and Y. Gao in GPS World, Vol. 20, No. 4, April 2009, pp. 43–50.
• Instant GPS Positioning
“Coarse-Time Navigation: Instant GPS,” Chapter 4 in A-GPS: Assisted GPS, GNSS, and SBAS by F. van Diggelen, published by Artech House, Boston, Massachusetts, 2009.
Richard B. Langley is a professor in the Department of Geodesy and Geomatics Engineering at the University of New Brunswick (UNB) in Fredericton, Canada, where he has been teaching and conducting research since 1981. He has a B.Sc. in applied physics from the University of Waterloo and a Ph.D. in experimental space science from York University, Toronto. He spent two years at MIT as a postdoctoral fellow, researching geodetic applications of lunar laser ranging and VLBI. For work in VLBI, he shared two NASA Group Achievement Awards. Professor Langley has worked extensively with the Global Positioning System. He has been active in the development of GPS error models since the early 1980s and is a co-author of the venerable “Guide to GPS Positioning” and a columnist and contributing editor of GPS World magazine. His research team is currently working on a number of GPS-related projects, including the study of atmospheric effects on wide-area augmentation systems, the adaptation of techniques for spaceborne GPS, and the development of GPS-based systems for machine control and deformation monitoring. Professor Langley is a collaborator in UNB’s Canadian High Arctic Ionospheric Network project and is the principal investigator for the GPS instrument on the Canadian CASSIOPE research satellite now in orbit. Professor Langley is a fellow of The Institute of Navigation (ION), the Royal Institute of Navigation, and the International Association of Geodesy. He shared the ION 2003 Burka Award with Don Kim and received the ION’s Johannes Kepler Award in 2007.
If you enjoyed this article, subscribe to GPS World to receive more articles just like it.