• Stars
    star
    647
  • Rank 69,579 (Top 2 %)
  • Language
    Python
  • License
    MIT License
  • Created about 6 years ago
  • Updated about 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Simple Python GNSS processing library

Introduction

Laika is an open-source GNSS processing library. Laika is similar to projects like RTKlib and GPSTK, but in Python and with a strong focus on readability, usability and easy integration with other optimizers. Laika can process raw GNSS observations with data gathered online from various analysis groups to produce data ready for position/velocity estimation. Laika is designed to produce accurate results whilst still being readable and easy to use. Laika is the perfect tool to develop accurate GNSS-only or GNSS-fusion localisation algorithms.

alt text

The GNSS problem

GNSS satellites orbit the earth broadcasting signals that allow the receiver to determine the distance to each satellite. These satellites have known orbits and so their positions are known. This makes determining the receiver's position a basic 3-dimensional trilateration problem. In practice observed distances to each satellite will be measured with some offset that is caused by the receiver's clock error. This offset also needs to be determined, making it a 4-dimensional trilateration problem.

Since this problem is generally overdetermined (more than 4 satellites to solve the 4d problem) there is a variety of methods to compute a position estimate from the measurements. Laika provides a basic weighted least squares solver for experimental purposes. This is far from optimal due to the dynamic nature of the system, this makes a Bayesian estimator like a Kalman filter the preferred estimator.

However, the above description is over-simplified. Getting accurate distance estimates to satellites and the satellite's position from the receiver observations is not trivial. This is what we call processing of the GNSS observables and it is this procedure laika is designed to make easy.

Astrodog

Astrodog is the main component of the laika. It is a python object, and like the soviet space dogs to which it owes its name, an astrodog will do everything to make the life of its owner easier. Which in this case is fetch and process all the necessary data to transform raw GNSS observables into usable distance measurements and satellite positions ready for position estimation.

Satellite info

Astrodog has a get_sat_info function that will provide an accurate position, velocity and clock error for any satellite at any time in history.

Pseudorange corrections

Astrodog has a get_delay function that will provide a pseudorange delay correction for any satellite at any time in history for the requested receiver position. This delay correction includes a correction for the tropospheric signal delay, ionospheric signal delay and differential code biases (DCBs) of the transmitting satellite.

This delay can either be estimated with mathematical models or with DGPS station observations, which is more accurate, but slower and only supported in the continental United States.

Architecture

GNSS processing requires getting data from the internet from various analysis groups such as NASA's CDDIS. AstroDog downloads files from FTP servers from these groups when it needs them. Downloading and parsing all this data can be slow. AstroDog caches all downloaded files locally to avoid re-downloading.

These files are then parsed by AstroDog and kept in memory. Every one of these parsed objects (DCBs, ionospheric models, satellite orbit polynomials, etc.) has a valid location area and/or a valid time window. Within those windows these objects can provide information relevant to GNSS processing.

Design principles of laika

  • Should work without configuration or setup
  • Default configuration should not compromise accuracy for anything

Laika's accuracy

To confirm the quality of Laika's GNSS processing, we ran laika's processing and a simple Kalman filter (procedure described in examples) on 2000 minutes of driving of a regular commute in San Francisco. The data comes from a "u-blox M8" chip. The fixes computed with laika's processed data are compared to the live navigation fixes given by the u-blox chip. They compared by looking at the standard deviation of all measured altitudes within every 5Γ—5 mΒ² in the dataset. There is no way to compare horizontal accuracy without ground truth, but there is no reason to believe that vertical and horizontal accuracy are not equally correlated for laika computed positions and u-blox's live positions. Data with the antenna on the roof and antenna inside the car are compared separately, since the results are significantly different. altitude distributionplot

Examples

Installation

Laika runs in Python 3.8.2, and has only been tested on Ubuntu 20.04. Running in a virtual environment is recommended.

laika

If you do not yet have numpy and scipy installed. Install them with pip. Having accelerated numpy will make laika much faster.

pip install numpy scipy

Then laika can be installed with

python setup.py install

The tests should now pass.

Eathdata account

It is no longer possible to download GNSS data from NASA servers without an account. You can make an account here. Then create a .netrc file in the laika folder with content:

machine urs.earthdata.nasa.gov login your_username password your_password

notebook examples

The notebook examples require some visualisation packages. To install them first you need

sudo apt-get install libfreetype6-dev

and then with pip

pip install -r requirements_examples.txt --user

Then you should be able to run the notebooks. The notebooks can be opened by running jupyter notebook and then navigating to the desired .ipynb file.

Useful GNSS references

More Repositories

1

openpilot

openpilot is an open source driver assistance system. openpilot performs the functions of Automated Lane Centering and Adaptive Cruise Control for over 200 supported car makes and models.
Python
40,192
star
2

research

dataset and code for 2016 paper "Learning a Driving Simulator"
Python
4,105
star
3

neo

comma neo research platform
1,627
star
4

opendbc

democratize access to car decoder rings
C++
1,393
star
5

panda

code powering the comma.ai panda
C
1,340
star
6

speedchallenge

The comma.ai Speed Prediction Challenge!
784
star
7

calib_challenge

The comma.ai Calibration Challenge!
Python
780
star
8

comma10k

10k crowdsourced images for training segnets
Python
670
star
9

comma2k19

A driving dataset for the development and validation of fused pose estimators and mapping algorithms
Jupyter Notebook
572
star
10

rednose

Kalman filter library
Python
297
star
11

commavq

commaVQ is a dataset of compressed driving video
Jupyter Notebook
291
star
12

cereal

capnp struct definitions and messaging used in comma ecosystem
Cap'n Proto
157
star
13

cabana

CAN visualizer and DBC maker
JavaScript
154
star
14

chffrplus

open source dashcam software
C
133
star
15

eon-neos

Operating System for your comma two and EON
Python
122
star
16

connect

comma connect PWA
JavaScript
108
star
17

commacoloring

you like coloring books?
JavaScript
101
star
18

body

firmware for the comma body robotics dev kit
C
56
star
19

chffr-api

API to access chffr data!
JavaScript
51
star
20

monitoring

The comma.ai Driver Monitoring Challenge!
51
star
21

openpilot-apks

The source code for the APK that runs inside openpilot.
JavaScript
47
star
22

pandajs

JavaScript
46
star
23

agnos

the operating system for your comma 3/3X
Python
39
star
24

depth10k

10k images for unsupervised depthnets
HTML
37
star
25

agnos-builder

Build AGNOS, the operating system for your comma 3/3X
Python
32
star
26

eon-neos-builder

Build NEOS, the operating system for your EON
C
27
star
27

comma-steering-control

Jupyter Notebook
25
star
28

entium

A helper for converting entwine tile data into cesium tiles
Python
21
star
29

connect-app

comma Connect Mobile App
JavaScript
21
star
30

trafficlights

Simple neural network to recognize the color of traffic lights
Jupyter Notebook
20
star
31

panda-artifacts

Releases of panda code.
Python
16
star
32

eon-neos-leeco

Operating System for your EON Gold
Shell
13
star
33

android_kernel_comma_msm8996

C
12
star
34

comma-x-native

X UI Library for React Native
JavaScript
12
star
35

vidutil.js

Decode H.264 and HEVC bitstreams in the browser using FFmpeg and WebAssembly
C
10
star
36

log_reader_js

Javascript implementation of the capnp log reader
JavaScript
10
star
37

android_device_oneplus_oneplus3

upstream: https://github.com/sultanxda/android_device_oneplus_oneplus3
C
8
star
38

gnss-data

Shell
8
star
39

agnos-kernel-sdm845

Kernel for the SDM845 modules
C
8
star
40

usr

usr directory from NEOS
Python
8
star
41

jobs

work @ comma.ai
8
star
42

new-connect

a rewrite of comma connect
TypeScript
8
star
43

android_kernel_leeco_msm8996

upstream: https://github.com/LineageOS/android_kernel_leeco_msm8996/commits/cm-13.0
C
6
star
44

android_system_core

upstream: https://github.com/CyanogenMod/android_system_core
C++
6
star
45

gnss-data-alt

Shell
5
star
46

android_vendor_oneplus_oneplus3

Makefile
5
star
47

android_frameworks_base

upstream: https://github.com/CyanogenMod/android_frameworks_base
Java
5
star
48

comma-api

JavaScript
5
star
49

android_build

upstream: https://github.com/cyanogenmod/android_build
Makefile
5
star
50

flash

JavaScript
5
star
51

panda_jungle

Code powering the Panda Jungle debug board
C
4
star
52

can-message

JavaScript
4
star
53

openpilot-pyextra

Python
4
star
54

tipsi-stripe

Fork of tipsi-stripe removing Android firebase dependency
JavaScript
4
star
55

android_system_extras_su

upstream: https://github.com/CyanogenMod/android_system_extras_su
C
3
star
56

android_packages_apps_NEOSSetup

JavaScript
3
star
57

my-comma-auth

shared auth utils for my.comma.ai apps (explorer, cabana)
JavaScript
3
star
58

tensorflow-autodetect

Automatically install the cpu or gpu version of Tensorflow
Python
3
star
59

cabana-issues

Public issue tracker for https://cabana.comma.ai
3
star
60

android_packages_apps_Settings

upstream: https://github.com/CyanogenMod/android_packages_apps_Settings
Java
3
star
61

qtlocation

C++
2
star
62

gnss-data-hourly

Shell
2
star
63

android

upstream: https://github.com/CyanogenMod/android -b cm-13.0
2
star
64

android_kernel_oneplus_msm8996

upstream: https://github.com/CyanogenMod/android_kernel_oneplus_msm8996
C
2
star
65

apkpatch

generates and applies efficient patch files to whole apks
Java
2
star
66

android_frameworks_opt_net_wifi

upstream: https://github.com/CyanogenMod/android_frameworks_opt_net_wifi
Java
2
star
67

android_packages_inputmethods_LatinIME

upstream: https://github.com/CyanogenMod/android_packages_inputmethods_LatinIME
Java
2
star
68

slurm-builder

Shell
1
star
69

android_hardware_quectel

Prebuilt RIL binaries for Quectel modems
Makefile
1
star
70

android_frameworks_opt_telephony

upstream: https://github.com/CyanogenMod/android_frameworks_opt_telephony
Java
1
star
71

android_device_oppo_common

upstream: https://github.com/CyanogenMod/android_device_oppo_common
Java
1
star
72

android_vendor_cm

upstream: https://github.com/CyanogenMod/android_vendor_cm
CSS
1
star
73

opencv-python-builder

Dockerfile
1
star
74

android_packages_apps_Bluetooth

upstream: https://github.com/CyanogenMod/android_packages_apps_Bluetooth
Java
1
star