Skip to content

Commit

Permalink
Correct and improve geodetic marker frames
Browse files Browse the repository at this point in the history
* reflect that only comments may be repeated

Signed-off-by: Guillaume W. Bres <[email protected]>
  • Loading branch information
gwbres committed Nov 2, 2024
1 parent 5bf8494 commit 9257670
Show file tree
Hide file tree
Showing 6 changed files with 500 additions and 593 deletions.
12 changes: 5 additions & 7 deletions binex/src/message/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -445,7 +445,7 @@ impl Message {
#[cfg(test)]
mod test {
use super::Message;
use crate::message::{EphemerisFrame, GPSRaw, MonumentGeoRecord, Record};
use crate::message::{EphemerisFrame, GPSRaw, MonumentGeoMetadata, MonumentGeoRecord, Record};
use crate::message::{GALEphemeris, GPSEphemeris, TimeResolution};
use crate::prelude::Epoch;
use crate::{constants::Constants, Error};
Expand Down Expand Up @@ -648,14 +648,12 @@ mod test {
let enhanced_crc = false;
let reversed = false;

let geo: MonumentGeoRecord = MonumentGeoRecord::new(
Epoch::from_gpst_seconds(1.0),
crate::message::MonumentGeoMetadata::RNX2BIN,
)
.with_comment("simple");
let mut geo = MonumentGeoRecord::default().with_comment("simple");

let geo_len = geo.encoding_size();
geo.epoch = Epoch::from_gpst_seconds(1.0);
geo.meta = MonumentGeoMetadata::RNX2BIN;

let geo_len = geo.encoding_size();
let record = Record::new_monument_geo(geo);

let msg = Message::new(
Expand Down
6 changes: 3 additions & 3 deletions binex/src/message/record/monument/fid.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub enum FieldID {
/// Comment: simple comment (readable string)
/// about the Geodetic marker. Several RINEX comments
/// are described by several BINEX Geodetic comments (repeated frames).
Comment = 0,
Comments = 0,
/// Software (=Program) name used in the creation of this BINEX Geodetic Record.
/// Must be unique in any BINEX Geodetic Record. Field length (bytewise) must follow
SoftwareName = 1,
Expand Down Expand Up @@ -122,7 +122,7 @@ pub enum FieldID {
impl From<u32> for FieldID {
fn from(val: u32) -> Self {
match val {
0 => Self::Comment,
0 => Self::Comments,
1 => Self::SoftwareName,
2 => Self::OperatorName,
3 => Self::SiteLocation,
Expand Down Expand Up @@ -166,7 +166,7 @@ impl From<u32> for FieldID {
impl From<FieldID> for u32 {
fn from(val: FieldID) -> u32 {
match val {
FieldID::Comment => 0,
FieldID::Comments => 0,
FieldID::SoftwareName => 1,
FieldID::OperatorName => 2,
FieldID::SiteLocation => 3,
Expand Down
Loading

0 comments on commit 9257670

Please sign in to comment.