https://github.com/rtk-rs/gnss
Definitions for GNSS in Rust
https://github.com/rtk-rs/gnss
gnss rust
Last synced: 4 months ago
JSON representation
Definitions for GNSS in Rust
- Host: GitHub
- URL: https://github.com/rtk-rs/gnss
- Owner: rtk-rs
- License: mpl-2.0
- Created: 2023-10-30T09:37:33.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-05-25T09:17:52.000Z (6 months ago)
- Last Synced: 2025-05-25T09:39:09.406Z (6 months ago)
- Topics: gnss, rust
- Language: Rust
- Homepage:
- Size: 85.9 KB
- Stars: 7
- Watchers: 2
- Forks: 3
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# GNSS
[](https://github.com/rtk-rs/gnss/actions/workflows/rust.yml)
[](https://github.com/rtk-rs/gnss/actions/workflows/daily.yml)
[](https://crates.io/crates/gnss-rs)
[](https://docs.rs/gnss-rs)
[](https://github.com/rtk-rs/qc-traits/blob/main/LICENSE)
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
```toml
gnss-rs = "2"
```
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));
```
## 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](https://github.com/nyx-space/nyx): Orbital navigation
- [ANISE](https://github.com/nyx-space/anise): Earth orientation modeling and Orbital navigation
- [Rtk-rs](https://github.com/rtk-rs/gnss-rtk): Precise Point Positioning, related calculations and modeling
- [RINEX](https://github.com/georust/rinex): files processing and management
- [SP3](https://github.com/georust/rinex): files processing and management
- [Hifitime](https://github.com/nyx-space/hifitime): Timescale and related calculations
- [CGGTTS](https://github.com/gwbres/cggtts): files production and processing
## License
This library is part of the [RTK-rs framework](https://github.com/rtk-rs) which
is delivered under the [Mozilla V2 Public](https://www.mozilla.org/en-US/MPL/2.0) license.