Introduction

The advent of smartphones featuring built-in GNSS receivers has revolutionized the field of positioning technology, granting users the ability to access accurate location data on a global scale. The development of cost-effective GNSS chips has sparked a significant revolution in the realm of positioning and navigation devices. The widespread availability of GNSS-enabled smartphones has opened up new and exciting opportunities across various domains, including but not limited to location-based services, transportation management, disaster response, and environmental monitoring. (Realini et al. 2017).

At the “I/O 2016” conference held in May 2016, Google made a notable announcement regarding the release of raw GNSS measurements from Android devices running the Android N operating system, also known as “Nougat,” version 7 (GSA 2017). Following this, in May 2018, the market saw the debut of the Xiaomi MI 8, the first mobile phone supporting multiple satellite constellations and dual frequencies (Robustelli et al. 2019). These developments mark significant milestones, ushering in a new era in positioning and navigation. The implications of these advancements are profound for the scientific community, signaling a departure from the traditional GNSS receiver black box model, which previously provided accuracy at the metric level. With access to pseudorange, Doppler, and carrier phase measurements, the door has opened for achieving more precise positions (Robustelli et al. 2019). These breakthroughs could transform the field of positioning and navigation, offering fresh possibilities for improved accuracy and performance.

Zangenehnejad et al. (2023) offer a comprehensive examination of contemporary smartphone positioning research in their work. They delve into recent breakthroughs, existing challenges, and prospective outlooks in the field. The discussion encompasses the availability of raw GNSS measurements, especially with the advent of Android 7 and the creation of Android GNSS loggers. The paper underscores the significance of scrutinizing the quality of smartphone GNSS observations for achieving high-precision positioning. Furthermore, it sheds light on the hurdles associated with smartphone GNSS positioning, encompassing factors like observation quality, device variations, environmental influences, and algorithmic advancements.

With the ubiquity of smartphones and the increasing accuracy of GNSS receivers embedded in these devices, the demand for utilizing GNSS data from Android platforms in research and applications has grown. However, the proprietary nature of the raw GNSS data collected by Android devices often poses a challenge for researchers and developers seeking to integrate this data into standard GNSS processing workflows. Hence, there is a necessity to develop a tool facilitating the conversion of raw GNSS data obtained from smartphones into a standardized format, such as RINEX.

RINEX is widely recognized as the standard for storing GNSS data, enabling the seamless exchange of raw satellite measurements across various GNSS processing software platforms. RINEX is a data interchange format for raw satellite navigation system data used in the field of geodesy. It allows the storage of measurements of pseudorange, carrier phase, Doppler, and signal-to-noise from various satellite navigation systems, including GPS, GLONASS, Galileo, BeiDou, SBAS, QZSS, and IRNSS. RINEX files are the industry standard for GNSS data, enabling software-independent processing and sequential file combination (Romero 2020).

The creation of tools like the Rokubun (2020) Android GNSS Logger to RINEX Converter has played a crucial role in various research endeavors. For instance, Everett et al. (2022) utilized this Python script to convert data from Google’s GNSS measurement tools to RINEX. Their research focused on optimizing the application of RTKLIB for measurements conducted with Android smartphones. They emphasized the necessity for adjustments due to the suboptimal quality of measurements from mobile platforms.

However, recent updates to the Google Application Programming Interface (API) for accessing raw data and enhancements to the GNSSLogger app (Raw GNSS Measurements 2023) have prompted the development of new conversion tools. These tools aim to accommodate the updated input data while maintaining backward compatibility with previous versions.

Hence, this article introduces raw_android_to_rinex, a Python toolbox designed to bridge this gap by facilitating the conversion of Android GNSS raw data to the widely used RINEX format, enabling seamless integration with existing GNSS processing tools. This tool would enhance interoperability within the GNSS community, ensuring efficient data sharing and utilization across different applications and systems.

Features of raw_android_to_rinex

In this section, we highlight key features of raw_android_to_rinex: compatibility with diverse Android devices, flexibility in handling various GNSS constellations, user-friendly interface for easy initiation, and its open-source nature, fostering collaboration and customization for users.

  • Compatibility: raw_android_to_rinex supports raw GNSS data collected from a variety of Android devices, ensuring compatibility with different manufacturers and models.

  • Flexibility: The toolbox provides flexibility in handling different GNSS constellations, including GPS, GLONASS, Galileo, BeiDou, SBAS, QZSS, and IRNSS. This flexibility ensures that researchers can work with data from a wide range of satellites.

  • Ease of Use: raw_android_to_rinex is designed with a user-friendly interface, making it accessible to both novice and experienced users. The conversion process can be initiated with a simple command, and the toolbox includes comprehensive documentation for guidance.

  • Open Source: raw_android_to_rinex is an open-source project, allowing users to contribute to its development, report issues, and customize the toolbox according to their specific needs.

Workflow

Having elucidated the comprehensive workflow of raw_android_to_rinex, it is imperative to underscore the seamless progression from data input through processing and RINEX conversion. The subsequent sections expound upon each pivotal stage, as depicted in Fig. 1, elucidating the intricacies involved in transforming raw GNSS data from Android devices into standardized RINEX files. This elucidation aims to provide a thorough understanding of the methodology employed, ensuring clarity for users and facilitating the optimal utilization of the designated tool.

Fig. 1
figure 1

Overall architecture of raw_android_to_rinex

Data input

To transform raw GNSS data from an Android device, the initial step involves capturing the data using an app equipped for this purpose. Presently, the tool accommodates data inputs from the logs of both the GEA and GNSSLogger apps. These apps save the raw data in a uniform format, aligning with the structure proposed by the GNSSLogger app. This standardized data input format ensures seamless compatibility, simplifying the conversion process and streamlining the utilization of raw GNSS data within the designated tool. For more details, please refer to Sect. 4.3 in the attached user manual of the tool.

The GEA app, developed by the authors of this article, serves as a specialized tool for processing raw GNSS data extracted from Android devices. This application offers dual functionalities, enabling the storage of raw GNSS data for subsequent post-processing and facilitating real-time positioning calculations through cloud computing. By providing users with the capability to both archive data for later analysis and perform on-the-fly positioning computations, the GEA app stands as a versatile solution for managing and utilizing GNSS information effectively. In this context, the noteworthy functionality is the ability to store raw GNSS data in plain text files, utilizing a format consistent with that of the GNSSLogger app. The app is available from GitHub website at https://github.com/jorgeho1995/geagnss.

The GNSSLogger app, created by Google, serves as a comprehensive tool for examining, visualizing, and recording location and sensor data on Android devices. This application facilitates in-depth analysis and logging of diverse data types. Notable features of the app include the ability to control data logging, view both location and raw measurement data, visualize locations on Google Maps, and analyze GNSS (Global Navigation Satellite System) satellites. The app’s capability extends to capturing raw GNSS measurements and other location data, systematically logging them into a file for further reference or analysis (Raw GNSS Measurements 2023). The app is available from Google Play at https://play.google.com/store/apps/details?id=com.google.android.apps.location.gps.gnsslogger&pcampaignid=web_share.

Data processing

To obtain the pseudorange, carrier phase, Doppler measurements, and temporal values, a series of computations must be performed. As explained by the GSA (2017) since these measurements are not directly accessible through the Android API, a specific methodology is needed to determine them (Raw GNSS Measurements 2023). For more details, please refer to Appendix A in the attached user manual of the tool. This section contains the essential formulas for computing the previously mentioned data.

RINEX conversion

After calculating the pseudorange, carrier phase, Doppler, and signal-to-noise ratio (SNR) values from the raw GNSS data for all satellites at each epoch, the tool then formats the data into RINEX format. This involves two main steps: first, creating the header, which includes pertinent information such as the capturing app, observables for each constellation in the file, and the initial calculation epoch. Subsequently, the tool generates the observable data section, ordered chronologically, and organized by constellation.

Output

The naming convention for a RINEX file typically incorporates essential information, including the station or site identifier and the commencement time of data collection. Specifically for this tool, the key components of a RINEX 3.05 file name are outlined as follows (Romero 2020):

  1. 1.

    Station Identifier: A unique label for the GPS station or site where the data were gathered. It may consist of a combination of letters and numbers, providing a distinctive identification for the specific location. In the output of this tool, there are two distinct Station Identifiers:

    • GNSS00GEA: Used when raw data are recorded using GEA.

    • GNSS00LOG: Applied when raw data are logged using GNSSLogger.

  1. 2.

    Session Start Time: The date and time when the data collection session commenced. Typically expressed in the format YYYYMMDDHHMM, where:

  • YYYY represents the four-digit year,

  • MM denotes the two-digit month,

  • DD stands for the two-digit day,

  • HH signifies the two-digit hour (in UTC), and

  • MM specifies the two-digit minute.

Software development and example usage

Having introduced the raw_android_to_rinex tool and its functionality, we now delve into its practical applications and integration capabilities. The subsequent sections outline the exemplary use of the tool through its command-line interface and shed light on the messages communicated during execution. Following this, we explore an alternative avenue for users seeking more control and integration possibilities by discussing the import library/package aspect of raw_android_to_rinex. This modular library empowers developers to seamlessly incorporate GNSS data conversion into their Python projects, offering a customizable approach that aligns with specific project requirements. The discussion in the following sections aims to provide a comprehensive understanding of the software’s usability and adaptability, catering to users with diverse needs and preferences. For more details, please refer to Sects. “4. Usage” and “5. Usage for developers” in the attached user manual of the tool, where usage of the tool is explained.

Script with entry point

The raw_android_to_rinex tool simplifies the conversion of GNSS data to RINEX format through a command-line interface. Users can effortlessly convert data by providing input parameters such as the input GNSS file, output RINEX file, and additional configuration options. The script is designed with an intuitive command-line interface, making it accessible to both beginners and experienced users.

The tool communicates with the user through a set of messages displayed on the console, conveying information about the execution status. There are three main types of messages:

  • Info: These messages provide informative details about the status of execution.

  • Warning: This type of message is triggered when one of the observables is considered invalid and is therefore excluded from the process. It is crucial to note that this exclusion does not hinder the overall execution. This situation arises when certain values essential for calculating pseudorange, carrier phase, or Doppler are either invalid or recorded inaccurately. Additionally, it can occur when the observable is in an invalid state.

  • Error: If an error occurs during execution, this message is displayed, indicating that the tool could not generate results due to the encountered issue.

Import library/package

For users who require more control or wish to integrate GNSS data conversion into existing Python projects, raw_android_to_rinex is designed as a modular import library. The library exposes a set of functions that can be seamlessly integrated into custom scripts or applications. By using the raw_android_to_rinex library, developers have the flexibility to customize the conversion process according to their specific needs. This approach is particularly beneficial for those who want to incorporate GNSS data conversion as part of a larger workflow or application.

Conclusion

Raw_android_to_rinex provides a valuable tool for researchers and developers working with Android GNSS data by facilitating the conversion of raw data to the standard RINEX format. This opens opportunities for integrating Android GNSS data into existing GNSS processing workflows, enabling more comprehensive and interoperable analyses. It also strikes a balance between simplicity and flexibility, offering a convenient script for quick conversions and an importable library for more advanced use cases. Whether you are a casual user needing a straightforward conversion or a developer looking to integrate GNSS data processing into a larger project, raw_android_to_rinex provides a reliable and efficient solution. The open-source nature of the toolbox encourages collaboration and further development within the GNSS community.