Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rtk-rs/gnss
GNSS definitions in Rust
https://github.com/rtk-rs/gnss
gnss rust
Last synced: about 2 months ago
JSON representation
GNSS definitions in Rust
- Host: GitHub
- URL: https://github.com/rtk-rs/gnss
- Owner: rtk-rs
- License: apache-2.0
- Created: 2023-10-30T09:37:33.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-04-28T09:17:44.000Z (2 months ago)
- Last Synced: 2024-05-02T13:14:58.921Z (about 2 months ago)
- Topics: gnss, rust
- Language: Rust
- Homepage:
- Size: 44.9 KB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE-APACHE
Lists
- awesome-gnss - GNSS - Rust - GNSS definitions in Rust. Includes detailed SBAS support. (Uncategorized / Uncategorized)
README
# GNSS
[![crates.io](https://img.shields.io/crates/v/gnss-rs.svg)](https://crates.io/crates/gnss-rs)
[![rustc v1.63](https://img.shields.io/badge/minimum%20rustc-1.63-blue?logo=rust)](https://www.whatrustisit.com)
[![Rust](https://github.com/rtk-rs/gnss/actions/workflows/rust.yml/badge.svg)](https://github.com/rtk-rs/gnss/actions/workflows/rust.yml)
[![crates.io](https://docs.rs/gnss-rs/badge.svg)](https://docs.rs/gnss-rs/badge.svg)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
```toml
gnss-rs = "2.1"
```Import "gnss-rs":
```rust
extern crate gnss_rs as gnss;
```## Space Vehicles
```rust
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.
```rust
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:
* Apache Version 2.0 ([LICENSE-APACHE](http://www.apache.org/licenses/LICENSE-2.0))
* MIT ([LICENSE-MIT](http://opensource.org/licenses/MIT))