gnss-rs

Crates.iognss-rs
lib.rsgnss-rs
version2.1.3
sourcesrc
created_at2023-10-11 09:41:02.627056
updated_at2024-01-05 07:08:08.13497
descriptionGNSS constellations and space vehicles support
homepagehttps://github.com/rtk-rs/gnss
repositoryhttps://github.com/rtk-rs/gnss
max_upload_size
id1000027
size46,398
gwbres (gwbres)

documentation

README

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:

Commit count: 15

cargo fmt