Skip to content

Commit

Permalink
Merge Binex lib (#291)
Browse files Browse the repository at this point in the history
Signed-off-by: Guillaume W. Bres <[email protected]>
  • Loading branch information
gwbres authored Feb 4, 2025
1 parent 882b01b commit 9a33d9d
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 9 deletions.
7 changes: 4 additions & 3 deletions binex/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,10 @@ pub mod prelude {
pub use crate::{
decoder::Decoder,
message::{
EphemerisFrame, GALEphemeris, GLOEphemeris, GPSEphemeris, GPSRaw, Message, Meta,
MonumentGeoMetadata, MonumentGeoRecord, PositionEcef3d, PositionGeo3d, Record,
SBASEphemeris, Solutions, SolutionsFrame, TemporalSolution, Velocity3d, VelocityNED3d,
EphemerisFrame, GALEphemeris, GLOEphemeris, GPSEphemeris, GPSRaw, GeoStringFrame,
Message, Meta, MonumentGeoMetadata, MonumentGeoRecord, PositionEcef3d, PositionGeo3d,
Record, SBASEphemeris, Solutions, SolutionsFrame, TemporalSolution, Velocity3d,
VelocityNED3d,
},
stream::{ClosedSourceElement, Provider, StreamElement},
ClosedSourceMeta, Error,
Expand Down
6 changes: 3 additions & 3 deletions binex/src/message/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ mod record; // Record: message content
mod time; // Epoch encoding/decoding // checksum calc.

pub use record::{
EphemerisFrame, GALEphemeris, GLOEphemeris, GPSEphemeris, GPSRaw, MonumentGeoMetadata,
MonumentGeoRecord, PositionEcef3d, PositionGeo3d, Record, SBASEphemeris, Solutions,
SolutionsFrame, TemporalSolution, Velocity3d, VelocityNED3d,
EphemerisFrame, GALEphemeris, GLOEphemeris, GPSEphemeris, GPSRaw, GeoStringFrame,
MonumentGeoMetadata, MonumentGeoRecord, PositionEcef3d, PositionGeo3d, Record, SBASEphemeris,
Solutions, SolutionsFrame, TemporalSolution, Velocity3d, VelocityNED3d,
};

pub use meta::Meta;
Expand Down
3 changes: 2 additions & 1 deletion binex/src/message/record/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ pub use ephemeris::{
EphemerisFrame, GALEphemeris, GLOEphemeris, GPSEphemeris, GPSRaw, SBASEphemeris,
};

pub use monument::{MonumentGeoMetadata, MonumentGeoRecord};
pub use monument::{GeoStringFrame, MonumentGeoMetadata, MonumentGeoRecord};

pub use solutions::{
PositionEcef3d, PositionGeo3d, Solutions, SolutionsFrame, TemporalSolution, Velocity3d,
VelocityNED3d,
Expand Down
10 changes: 8 additions & 2 deletions binex/src/message/record/monument/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,6 @@ use std::str::from_utf8 as str_from_utf8;
mod fid;
mod src;

// private
use fid::FieldID;

// public
Expand Down Expand Up @@ -416,6 +415,13 @@ impl MonumentGeoRecord {
}
}

/// Define software name
pub fn with_software_name(&self, name: &str) -> Self {
let mut s = self.clone();
s.push_or_update(FieldID::SoftwareName, name);
s
}

/// Define receiver model.
pub fn with_receiver_model(&self, model: &str) -> Self {
let mut s = self.clone();
Expand All @@ -431,7 +437,7 @@ impl MonumentGeoRecord {
}

/// Define receiver firmware version (if known).
pub fn with_receiver_firm_version(&self, version: &str) -> Self {
pub fn with_receiver_firmware_version(&self, version: &str) -> Self {
let mut s = self.clone();
s.push_or_update(FieldID::ReceiverFirmwareVersion, version);
s
Expand Down

0 comments on commit 9a33d9d

Please sign in to comment.