Skip to main content

Crate gnss_time

Crate gnss_time 

Source
Expand description

§gnss-time

A type-safe GNSS time scale library with zero runtime overhead.

§Quick start

use gnss_time::{prelude::*, DurationParts};

let gps = Time::<Gps>::from_week_tow(
    2345,
    DurationParts {
        seconds: 432_000,
        nanos: 0,
    },
)
.unwrap();
assert_eq!(gps.to_string(), "GPS 2345:432000.000");

let utc: Time<Utc> = gps.into_scale_with(LeapSeconds::builtin()).unwrap();

Re-exports§

pub use convert::*;
pub use duration::*;
pub use epoch::*;
pub use error::*;
pub use leap::*;
pub use matrix::*;
pub use scale::*;
pub use time::*;

Modules§

convert
Unified type-safe conversion API
duration
Duration
epoch
Epochs and calendar arithmetic
error
Error types for the gnss-time crate.
leap
Leap seconds — conversion context
matrix
Conversion matrix: the full graph of supported transformations
prelude
Prelude: convenient imports for most use cases.
scale
GNSS time scale marker types
time
Time<S> — the core timestamp type.