GNSS, Interrupted: The hidden Android setting you need to know

Sean Barbeau
5 min readJan 23, 2021

--

The last several versions of Android have turned it into a powerhouse for processing Global Navigation Satellite System (GNSS) data from systems such as Global Positioning System (GPS) and Galileo. Device with Android 7.0 and higher support an official API for pseudorange measurements and navigation messages, which allows developers to calculate positions within apps. Previously, all apps were limited to using positions calculated by the GNSS hardware, which was a black box. The European Union GNSS Agency (GSA) has even produced a how-to manual describing the technical process of using raw measurement data. Google has also open-sourced a set of tools to process and visualize measurements.

The problem

Let’s say you’re excited to get working with GNSS raw measurement data. You fire up an app to collect raw measurement data (e.g., my GPSTest app or GNSSLogger), and then use Google’s tools to visualize this information. But you see something surprising — the data looks all choppy with frequent gaps.

Using default Android settings, you may see “choppy” GNSS measurement data, especially for L5 (Source: Andrew Wu, GPSTest Google Group)

Is something wrong with your device? Is the app not recording the data correctly?

It turns out that this is the expected default behavior for GNSS on Android. When an app activates GNSS, from the user’s point of view it appears as though the GNSS hardware is continuously active — you see location updates around once per second when you move around the map.

However, to save battery energy, Android actually “duty-cycles,” or powers the GNSS hardware on and off repeatedly, during this time. So GNSS is only powered on for a fraction of a second before it shuts back down, and these “off” periods can result in gaps in data. These gaps seem particularly prominent for L5 or E5a signals on dual-frequency devices.

The solution

Thankfully, if you want to leave your GNSS hardware on continuously while an app is using GNSS, a setting was added in Android 9 to enable this. However, it’s not easy to find.

EDIT Aug 2021 — On Android 12 and higher, in GPSTest v3.9.13 and up you can now enable this as an in-app setting in GPSTest due to a new Android 12 system API. It’s easy to find — no more messing with Developer Options!

First, you’ll need to enabled the hidden “Developer options” menu. Head to your Android system settings, then scroll down and tap on “About phone”, then scroll down and tap on “Build number” seven times:

To active developer options, in your Android system settings under “About phone” tap “Build number” seven times

You should see a message congratulating you on becoming a developer.

(Note: Depending on your version of Android, the “Build number” menu may be in a different location— see this page for more details if your device doesn’t match the above screenshots)

Next, head back to your main Android setting page. Depending on your Android version, the newly visible “Developer options” menu should be visible here towards the bottom, or under the “System” submenu (it may be collapsed under an “Advanced” setting). The below screenshot shows the setting on Android 11.

“Developer options” is usually under system settings or under “System” submenu, depending on Android version. Android 11 is shown above.

Once you’re into the “Developer options”, scroll down until you find the “Force full GNSS measurements” option — you’ll want to turn this on.

Turn on “Force full GNSS measurements” to avoid gaps in raw measurement data

If you go back to your GNSS raw measurements data collection app and record new data, the repeated gaps should now be gone:

With “Force full GNSS measurements” setting enabled, the repeated gaps in the data are gone (Source: Andrew Wu, GPSTest Google Group)

This setting is particularly important if you want to use an app that leverages real-time kinematic (RTK), or carrier-phase measurements, as interruptions in the data will prevent it from working correctly. If you want a more detailed explanation of why duty-cycling is an RTK killer, check out this excellent Google I/O presentation “How to get one-meter location-accuracy from Android devices” by Frank van Diggelen from Google.

Closing thoughts

Now you know how to use the hidden setting in the Android system “Developer options” to “Force full GNSS measurements”, which will disable duty-cycling of GNSS on your device. Note that this only keeps GNSS hardware active while an app is actively listening for location updates — GNSS will remain powered off otherwise.

Keep in mind that there is a tradeoff with battery life when this option is enabled and GNSS is active, because the hardware will no longer be intermittently shutting down for fractions of a second to conserve energy. How much? To give you a rough idea, in the above Google I/O presentation Frank Van Diggelen says that “when on continuously, GNSS uses less than 20% of the energy that the screen uses when it’s on.”

A big open question — will enabling this setting give you better location accuracy in popular apps like Google Maps?

Apps that would see the biggest benefit would be those that can calculate their own locations via RTK/carrier-phase measurements (as opposed to using locations calculated by GNSS hardware), although I’m not sure what, if any, popular apps do this. Google announced in December 2020 that they are rolling out a new feature to Android devices to leverage 3D building data in their “fused” location provider— but no mention of RTK specifically.

For the rest of the apps using location directly from GNSS hardware that don’t use RTK, presumably if the device can retain a GNSS lock it would be better than having to reacquire it, but only real-world testing can tell if this makes a noticeable difference in the real world with today’s devices.

If you’re curious, try measuring the GNSS accuracy of your Android device using GPSTest before and after enabling “Force full GNSS measurements” and let me know what you see in the comments below.

Happy uninterrupted GNSS measuring! Do you have more experience working with “Force full GNSS measurements”? Please share your thoughts by commenting below!

Was this article helpful? Consider following me on Medium. If you’re a user of the open-source GPSTest app and you’d like to support it, check out the GitHub page for ways you can help!

--

--

Sean Barbeau
Sean Barbeau

Written by Sean Barbeau

Improving the world, one byte at a time. @sjbarbeau, https://github.com/barbeau, https://www.linkedin.com/in/seanbarbeau/. I work @CUTRUSF. Posts are my own.

Responses (6)