#gnss #gps #glonass #galileo

gnss-rs

GNSS constellations and space vehicles support

11 stable releases

2.3.1 Jan 3, 2025
2.2.4 Aug 27, 2024
2.2.1 Jul 28, 2024
2.1.3 Jan 5, 2024
2.1.0 Oct 14, 2023

#76 in Geospatial

Download history 305/week @ 2024-09-19 250/week @ 2024-09-26 217/week @ 2024-10-03 270/week @ 2024-10-10 60/week @ 2024-10-17 36/week @ 2024-10-24 60/week @ 2024-10-31 145/week @ 2024-11-07 105/week @ 2024-11-14 51/week @ 2024-11-21 56/week @ 2024-11-28 68/week @ 2024-12-05 95/week @ 2024-12-12 144/week @ 2024-12-19 57/week @ 2024-12-26 730/week @ 2025-01-02

1,030 downloads per month
Used in 15 crates (11 directly)

MPL-2.0 license

40KB
789 lines

GNSS

crates.io rustc v1.63 Rust crates.io

High level definitions to work with GNSS in Rust

  • Space Vehicles definitions: SV
  • GNSS Constellations: Constellation
  • GNSS Timescales: Constellation.timescale()

Getting started

Add "gnss" to your Cargo.toml

gnss-rs = "2"

Import "gnss-rs":

extern crate gnss_rs as gnss;

Space Vehicles

extern crate gnss_rs as gnss;

use gnss::sv;
use gnss::prelude::*;
use std::str::FromStr;
use hifitime::TimeScale;

let sv = SV::new(Constellation::GPS, 1);
assert_eq!(sv.constellation, Constellation::GPS);
assert_eq!(sv.prn, 1);
assert_eq!(sv.timescale(), Some(TimeScale::GPST));
assert_eq!(sv, sv!("G01"));
assert_eq!(sv.launched_date(), None);

SBAS support

We support SBAS (geostationary augmentations) systems.

extern crate gnss_rs as gnss;

use gnss::sv;
use gnss::prelude::*;
use std::str::FromStr;
use hifitime::{Epoch, TimeScale};

let sv = sv!("S23");
assert_eq!(sv.constellation, Constellation::EGNOS);
let launched_date = Epoch::from_str("2021-11-01T00:00:00 UTC")
    .unwrap();
assert_eq!(sv.launched_date(), Some(launched_date));

Other definitions and features

Other definitions and features exist. Use compilation options (crate features) to unlock them. The idea is to maintain a very minimal default library.

  • The SERDE features unlocks serialization/deserialization of the main structures defined here.

  • The DOMES features unlocks the definition of DOMES GNSS/IGS reference station, that are widely used in GNSS data processing. This number identifies a station uniquely.

  • The COSPAR features unlocks the definition of the COSPAR (Launch) ID number. This number identifies the launch of a vehicule uniquely. It is used in RINEX and other files format.

  • The SBAS feature will create a static database that defines each SBAS service areas, projected on ground as WKT/GEO objects, with one method to select a SBAS service based on Latitude and Longitude coordinates.

Relevant Ecosystems

Many libraries exist nowadays to process GNSS data or perform typical GNSS processing tasks.
Amongst them, be sure to checkout:

  • Nyx: Orbital navigation
  • ANISE: Earth orientation modeling and Orbital navigation
  • Rtk-rs: Precise Point Positioning, related calculations and modeling
  • RINEX: files processing and management
  • SP3: files processing and management
  • Hifitime: Timescale and related calculations
  • CGGTTS: files production and processing

License

Licensed under MPL-2.0

Dependencies

~3–6.5MB
~118K SLoC