#gnss #gps #glonass #galileo

gnss-rs

GNSS constellations and space vehicles support

5 stable releases

2.1.3 Jan 5, 2024
2.1.2 Nov 2, 2023
2.1.1 Nov 1, 2023
2.1.0 Oct 14, 2023
2.0.0 Oct 11, 2023

#121 in Geospatial

Download history 12/week @ 2024-01-29 6/week @ 2024-02-05 20/week @ 2024-02-12 66/week @ 2024-02-19 66/week @ 2024-02-26 94/week @ 2024-03-04 48/week @ 2024-03-11 79/week @ 2024-03-18 88/week @ 2024-03-25 82/week @ 2024-04-01 89/week @ 2024-04-08 79/week @ 2024-04-15 185/week @ 2024-04-22 87/week @ 2024-04-29 88/week @ 2024-05-06

451 downloads per month
Used in 12 crates (9 directly)

MIT/Apache

29KB
574 lines

GNSS

crates.io rustc v1.63 Rust crates.io

High level definitions to work with GNSS in Rust

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

Getting started

Add "gnss" to your Cargo.toml

gnss-rs = "2.1"

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));

License

Licensed under either of:

Dependencies

~2.4–5MB
~99K SLoC