GNSS mobile apps: using Nougat to access raw GNSS measurements

This page has been archived and is provided for historical reference purposes only.
The content and links are no longer maintained and may now be outdated.

01 December 2016
The ability to access GNSS raw data on Android devices opens up a range of possibilities and opportunities.


The ability to access raw GNSS measurements opens up a range of opportunities for mobile app developers, but how do you access the data? During the first European GNSS Agency (GSA) Galileo Hackathon at the WhereCamp ‘unconference’ in Berlin Dr Lukasz Bonenberg from the University of Nottingham explained how app-developers can access raw GNSS measurements on smartphones via the latest release of the Android operating system.

The technical briefing for app-developers at the first GSA Hackathon at Beuth Hochschule für Technik in Berlin covered the latest developments and opportunities for GNSS and Location Based Services (LBS) including both hardware and software.

The hardware that the hackers used in the Hackathon - the Galileo-enabled BQ Aquaris X5 Plus Android smartphone - was described by Alvaro Fructuoso and Olaja Segura from the phone’s manufacturer. At the heart of the phone is the Qualcomm Snapdragon 652 chip that provides a true multi-constellation GNSS experience.

1st Galileo Hackathon - watch the video here

Digging down in Nougat

The next generation of Android operating system (7.0) is named Nougat and allows access to GNSS raw measurements using a new version of Google’s application programme interfaces (APIs) that give more flexible and deeper access to positioning data. Dr Lukasz Bonenberg from the University of Nottingham opened up the ‘black box’ that is the modern smartphone and shed some light on where hackers and coders needed to look to get access to this data.

Currently, location in Android is accessed via Google Play Services GMS Location providing activity and location awareness that can be easily harnessed by coders to provide enhanced location data (e.g. geofencing, near services etc.) for their apps. New Android Nougat (API v24) adds extra capacities. It directly accesses sensor data via android.location. This data has previously been hidden away in physical drivers, but access now opens up possibilities for higher accuracy and deployment of algorithms currently restricted to more advanced GNSS receivers.

While access to the raw data becomes easier, its use is still a challenging task. The key to reading GNSS measurements is the synching of clocks between the phone and the GNSS satellites to give pseudoranges – effectively the distance from the phone to the satellite degraded by the clock errors. To get an accurate and reliable fix requires signals – and therefore calculated pseudoranges - from at least four GNSS satellites, explained Bonenberg.

MatLab codes

To support this Google has released the MatLlab code demonstrating both the data collection (GNSS data logger application) as well as calculation details for obtaining observations and calculating position. To further support the development community, Bonenberg is developing a version of the processing code in the Python programming language. It is available at his GitHub together with his edits to the original Google MatLab code.

“The ability to access raw data opens up a range of possibilities and opportunities,” claimed Bonenberg. These comprise the use of external corrections including existing differential-GNSS and augmentations services such as EGNOS for high precision. More opportunities come with advanced algorithms to reduce errors in urban areas by, for example, removing satellites that are blocked by buildings from the positioning calculation, and the ability to fuse GNSS data with data from other phone based sensors such as the Inertial Measurement Unit (IMU).

Work is also carried out using carrier phase measurements offering even better positional performance. Not only do these developments promise improved accuracy, availability and reliability or data fusion for mass market applications, but also the ability to use those devices in the domains currently reserved for much more expensive and dedicated GNSS receivers Bonenberg concluded.

“The ability to access GNSS raw data on Android devices opens up a range of possibilities and opportunities.”

More information:

Android Developers: Location
Lukasz Bonenberg’s GitHub on Android GNSS

Media note: This feature can be republished without charge provided the European GNSS Agency (GSA) is acknowledged as the source at the top or the bottom of the story. You must request permission before you use any of the photographs on the site. If you republish, we would be grateful if you could link back to the GSA website (

Updated: Jan 16, 2017