Skip to content

Utilities for reading GNSS snapshots collected with SnapperGPS.

License

Notifications You must be signed in to change notification settings

JonasBchrt/snapshot-gnss-data

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 

Repository files navigation

GNSS Signal Snapshot Dataset Utilities

Author: Jonas Beuchert

Is this ☝️ title too long? Then let us break it down:

  • There are several global navigation satellite systems (GNSS), e.g., GPS, Galileo, and BeiDou, which allow us to localise humans, objects, and animals anywhere on the Earth.
  • The satellites of these systems orbit the Earth and broadcast signals to its surface.
  • We built an energy-efficient low-cost receiver - called SnapperGPS - that captures short twelve-millisecond snapshots of these signals.
  • After months of testing, we ended up with many datasets that contain thousands of these snapshots in total:

Jonas Beuchert and Alex Rogers. 2021. SnapperGPS: Collection of GNSS Signal Snapshots. University of Oxford, Oxford, UK. https://doi.org/10.5287/bodleian:eXrp1xydM

  • This repository provides open-source Python utilities to simplify working with the raw signal snapshots from the dataset if you want to use them for your own project, e.g., to develop your own GNSS satellite acquisition or positioning algorithms.

The basic idea is that the class dataset.Dataset can represent a single dataset that was recorded with a SnapperGPS receiver and offers methods to access the data.

Table of Contents

  1. Dependencies
  2. Usage
  3. Data

Dependencies

The code was tested with Python 3.7.2 on Ubuntu 16.04, with Python 3.7.7 on Windows 10, and with Python 3.7.10 on Ubuntu 18.04 and macOS Big Sur.

The basic functionality requires numpy. In addition, working with ground truth data requires pymap3d and Shapely. You can install all three packages via pip with the requirements.txt file in this repository

python -m pip install -r requirements.txt

Usage

First, download the data. For a detailed description of its structure, see Section Data. Just note that you will end up with eleven folders named A-K, each of which contains one signal snapshot dataset. If you want to read the GNSS signal snapshot with index 19 from the dataset stored in the directory data/J, then type

>>> import dataset
>>> ds = dataset.Dataset("data/J")
Open ground truth file of type gpx.
>>> ds.get_snapshot(19)
array([ 1,  1,  1, ..., -1, -1, -1], dtype=int8)

To view an estimate of the intermediate frequency at which the GNSS signal was recorded, type

>>> ds.get_intermediate_frequency()
4091232.0

To obtain the timestamps that are associated with the recorded snapshots, type

>>> ds.get_timestamps()
array(['2021-03-24T10:37:46.000', ..., '2021-03-24T11:42:19.000'],
      dtype='datetime64[ms]')

If you calculated a position from the raw snapshot and want to compare it to the ground truth, type

>>> ds.get_error(my_estimated_latitude, my_estimated_longitude)
2.3513792721992006

There are more methods. To view the full class documentation, type

>>> help(dataset.Dataset)

Still questions? Go to Discussions or open an Issue.

Data

We recorded the data in 2020 and 2021 using three of our SnapperGPS low-cost receivers, whose core components are an Echo 27 GPS L1 antenna and an SE4150L integrated GPS receiver circuit. Like most civilian low-cost GPS receivers, SnapperGPS operates in the L1 band with a centre frequency of 1.57542 GHz. However, Galileo's E1 signal, BeiDou's B1C signal, GPS' novel L1C signal, and SBAS' L1 signal have the identical centre frequency. So, we captured those signals, too. A SnapperGPS receiver down-mixes the incoming signal to a nominal intermediate frequency of 4.092 MHz, samples the resulting near-baseband signal at 4.092 MHz and digitises it with an amplitude resolution of one bit per sample. It considers only the in-phase component and discards the quadrature component.

The data collection consists of four static and seven dynamic tests under various conditions with 3700 GNSS signal snapshots in total. We captured the 225 static snapshots on a hill top, on a bridge, in a courtyard, and in a park in 5-30 s intervals and the 3475 dynamic ones while cycling in either urban or rural environments and using 10 s intervals. We obtained ground truth locations or tracks either by using an Ordnance Survey trig point, by employing satellite imagery from Google Maps or Google Earth, or with a Moto C smartphone with built-in GPS and A-GPS receiver. While the trig point provides a ground-truth position with centimetre-level accuracy, the positions obtained from satellite imagery or with the Moto C are up to 5 m wrong with outliers up to 10 m.

dataset size type location ground truth temperatures & pressures
A 181 static hill top trig point no
B 14 static bridge Google Maps no
C 6 static courtyard Google Maps no
D 24 static park Google Maps yes
E 380 dynamic urban Google Earth yes
F 339 dynamic urban Google Earth yes
G 693 dynamic urban/rural Google Earth yes
H 628 dynamic urban Moto C yes
I 1023 dynamic urban/rural Google Earth / Moto C yes
J 346 dynamic urban/rural Moto C yes
K 66 dynamic urban Moto C yes

The eleven datasets are stored in one folder per set named A-K. Each snapshot is in a single binary .bin file with a name derived from the timestamp. One byte of the file holds the amplitude values of eight signal samples, i.e., the first byte holds the first eight samples. A zero bit represents a signal amplitude of +1 and a one bit a signal amplitude of -1. The order of the bits is 'little', i.e., reversed. For example, the byte 0b01100000 corresponds to the signal chunk [1 1 1 1 1 -1 -1 1]. In addition to the raw GNSS signal snapshots, you can find more data in a single meta.json file in each folder. The JSON struct in this file provides approximate latitude and longitude of the ground truth location of a static test in decimal degrees, an estimate of the true intermediate_frequency in Hertz (the actual value differs from the nominal 4.092 MHz due to imprecisions of the hardware), all the file names of the binary files, the UTC timestamps of all files, and optionally temperature and pressure measurements from an on-board BMP280 sensor in degrees Celsius and pascal, respectively. Furthermore, a .gpx or .kml file holds the ground truth track for a dynamic test as nodes of a polyline. (Folder I contains two files that represent the first and the second part of the track, respectively.) Finally, each folder incorporates the broadcasted satellite navigation data from the respective day as RINEX 3.04 .rnx file downloaded from NASA's archive. The RINEX files allow to calculate, e.g., satellite orbits and clock corrections for all GNSS.

Funding statment

SnapperGPS was supported by an EPSRC IAA Technology Fund.

Additionally, Jonas Beuchert is supported by the EPSRC Centre for Doctoral Training in Autonomous Intelligent Machines and Systems.