rinex/navigation/
mod.rs

1//! Navigation module
2mod earth_orientation;
3mod ephemeris;
4mod frame;
5mod header;
6mod ionosphere;
7mod message;
8mod parsing;
9mod time;
10
11pub mod rinex;
12
13pub(crate) mod formatting;
14
15pub(crate) use formatting::format;
16pub(crate) use parsing::{is_new_epoch, parse_epoch};
17
18pub use crate::navigation::{
19    earth_orientation::EarthOrientation,
20    ephemeris::{flags::*, orbits::OrbitItem, Ephemeris},
21    frame::{NavFrame, NavFrameType},
22    header::HeaderFields,
23    ionosphere::{BdModel, IonosphereModel, KbModel, KbRegionCode, NgModel, NgRegionFlags},
24    message::NavMessageType,
25    time::TimeOffset,
26};
27
28#[cfg(feature = "nav")]
29pub use crate::navigation::ephemeris::kepler::{Helper, Kepler, Perturbations};
30
31#[cfg(feature = "processing")]
32pub(crate) mod mask; // mask Trait implementation
33
34#[cfg(feature = "processing")]
35pub(crate) mod decim; // decim Trait implementation
36
37#[cfg(feature = "processing")]
38pub(crate) mod repair; // repair Trait implementation
39
40#[cfg(feature = "serde")]
41use serde::{Deserialize, Serialize};
42
43use std::collections::BTreeMap;
44
45use crate::prelude::{Epoch, SV};
46
47#[derive(Debug, Copy, Clone, PartialEq, PartialOrd, Eq, Ord, Hash)]
48#[cfg_attr(feature = "serde", derive(Serialize, Deserialize))]
49pub struct NavKey {
50    /// Time of Clock (ToC) as [Epoch].
51    pub epoch: Epoch,
52
53    /// [SV] broadcasting this information.
54    pub sv: SV,
55
56    /// [NavMessageType] associated to following [NavFrame]
57    pub msgtype: NavMessageType,
58
59    /// [NavFrame] type following.
60    pub frmtype: NavFrameType,
61}
62
63/// Navigation data are [NavFrame]s indexed by [NavKey].
64/// [NavKey] contains everything that is required to store & index a [NavFrame].
65/// Several types of frames may exist (in modern RINEX). Refer to following types.
66pub type Record = BTreeMap<NavKey, NavFrame>;