Skip to main content

Meas3DecodedEpoch

Struct Meas3DecodedEpoch 

Source
pub struct Meas3DecodedEpoch {
    pub antenna_id: u8,
    pub common_flags: u8,
    pub total_clock_jump_ms: i32,
    pub reference_epoch_interval_ms: u32,
    pub is_reference_epoch: bool,
    pub reference_epoch_contains_pr_rate: bool,
    pub satellites: Vec<Meas3Satellite>,
    /* private fields */
}
Expand description

One decoded Meas3 epoch for a single antenna.

Fields§

§antenna_id: u8§common_flags: u8§total_clock_jump_ms: i32§reference_epoch_interval_ms: u32§is_reference_epoch: bool§reference_epoch_contains_pr_rate: bool§satellites: Vec<Meas3Satellite>

Implementations§

Source§

impl Meas3DecodedEpoch

Source

pub fn tow_seconds(&self) -> f64

Source

pub fn tow_ms(&self) -> u32

Examples found in repository?
examples/decode_meas3.rs (line 69)
53fn flush_bundles(
54    bundles: &mut HashMap<u8, Meas3BlockSet>,
55    decoder: &mut Meas3Decoder,
56) -> Result<(), Box<dyn Error>> {
57    let mut antenna_ids: Vec<u8> = bundles.keys().copied().collect();
58    antenna_ids.sort_unstable();
59
60    for antenna_id in antenna_ids {
61        if let Some(block_set) = bundles.get(&antenna_id) {
62            if block_set.ranges.is_none() {
63                continue;
64            }
65
66            let epoch = decoder.decode_block_set(block_set)?;
67            println!(
68                "TOW {} WNc {} antenna {}: {} satellites, {} measurements",
69                epoch.tow_ms(),
70                epoch.wnc(),
71                epoch.antenna_id,
72                epoch.num_satellites(),
73                epoch.num_measurements()
74            );
75
76            for satellite in epoch.satellites.iter().take(4) {
77                let signal_summary = satellite
78                    .measurements
79                    .iter()
80                    .map(|meas| match meas.cn0_dbhz() {
81                        Some(cn0) => format!("{}:{cn0:.2}dB-Hz", meas.signal_type),
82                        None => meas.signal_type.to_string(),
83                    })
84                    .collect::<Vec<_>>()
85                    .join(", ");
86                println!("  {}  {}", satellite.sat_id, signal_summary);
87            }
88        }
89    }
90
91    bundles.clear();
92    Ok(())
93}
Source

pub fn wnc(&self) -> u16

Examples found in repository?
examples/decode_meas3.rs (line 70)
53fn flush_bundles(
54    bundles: &mut HashMap<u8, Meas3BlockSet>,
55    decoder: &mut Meas3Decoder,
56) -> Result<(), Box<dyn Error>> {
57    let mut antenna_ids: Vec<u8> = bundles.keys().copied().collect();
58    antenna_ids.sort_unstable();
59
60    for antenna_id in antenna_ids {
61        if let Some(block_set) = bundles.get(&antenna_id) {
62            if block_set.ranges.is_none() {
63                continue;
64            }
65
66            let epoch = decoder.decode_block_set(block_set)?;
67            println!(
68                "TOW {} WNc {} antenna {}: {} satellites, {} measurements",
69                epoch.tow_ms(),
70                epoch.wnc(),
71                epoch.antenna_id,
72                epoch.num_satellites(),
73                epoch.num_measurements()
74            );
75
76            for satellite in epoch.satellites.iter().take(4) {
77                let signal_summary = satellite
78                    .measurements
79                    .iter()
80                    .map(|meas| match meas.cn0_dbhz() {
81                        Some(cn0) => format!("{}:{cn0:.2}dB-Hz", meas.signal_type),
82                        None => meas.signal_type.to_string(),
83                    })
84                    .collect::<Vec<_>>()
85                    .join(", ");
86                println!("  {}  {}", satellite.sat_id, signal_summary);
87            }
88        }
89    }
90
91    bundles.clear();
92    Ok(())
93}
Source

pub fn num_satellites(&self) -> usize

Examples found in repository?
examples/decode_meas3.rs (line 72)
53fn flush_bundles(
54    bundles: &mut HashMap<u8, Meas3BlockSet>,
55    decoder: &mut Meas3Decoder,
56) -> Result<(), Box<dyn Error>> {
57    let mut antenna_ids: Vec<u8> = bundles.keys().copied().collect();
58    antenna_ids.sort_unstable();
59
60    for antenna_id in antenna_ids {
61        if let Some(block_set) = bundles.get(&antenna_id) {
62            if block_set.ranges.is_none() {
63                continue;
64            }
65
66            let epoch = decoder.decode_block_set(block_set)?;
67            println!(
68                "TOW {} WNc {} antenna {}: {} satellites, {} measurements",
69                epoch.tow_ms(),
70                epoch.wnc(),
71                epoch.antenna_id,
72                epoch.num_satellites(),
73                epoch.num_measurements()
74            );
75
76            for satellite in epoch.satellites.iter().take(4) {
77                let signal_summary = satellite
78                    .measurements
79                    .iter()
80                    .map(|meas| match meas.cn0_dbhz() {
81                        Some(cn0) => format!("{}:{cn0:.2}dB-Hz", meas.signal_type),
82                        None => meas.signal_type.to_string(),
83                    })
84                    .collect::<Vec<_>>()
85                    .join(", ");
86                println!("  {}  {}", satellite.sat_id, signal_summary);
87            }
88        }
89    }
90
91    bundles.clear();
92    Ok(())
93}
Source

pub fn num_measurements(&self) -> usize

Examples found in repository?
examples/decode_meas3.rs (line 73)
53fn flush_bundles(
54    bundles: &mut HashMap<u8, Meas3BlockSet>,
55    decoder: &mut Meas3Decoder,
56) -> Result<(), Box<dyn Error>> {
57    let mut antenna_ids: Vec<u8> = bundles.keys().copied().collect();
58    antenna_ids.sort_unstable();
59
60    for antenna_id in antenna_ids {
61        if let Some(block_set) = bundles.get(&antenna_id) {
62            if block_set.ranges.is_none() {
63                continue;
64            }
65
66            let epoch = decoder.decode_block_set(block_set)?;
67            println!(
68                "TOW {} WNc {} antenna {}: {} satellites, {} measurements",
69                epoch.tow_ms(),
70                epoch.wnc(),
71                epoch.antenna_id,
72                epoch.num_satellites(),
73                epoch.num_measurements()
74            );
75
76            for satellite in epoch.satellites.iter().take(4) {
77                let signal_summary = satellite
78                    .measurements
79                    .iter()
80                    .map(|meas| match meas.cn0_dbhz() {
81                        Some(cn0) => format!("{}:{cn0:.2}dB-Hz", meas.signal_type),
82                        None => meas.signal_type.to_string(),
83                    })
84                    .collect::<Vec<_>>()
85                    .join(", ");
86                println!("  {}  {}", satellite.sat_id, signal_summary);
87            }
88        }
89    }
90
91    bundles.clear();
92    Ok(())
93}

Trait Implementations§

Source§

impl Clone for Meas3DecodedEpoch

Source§

fn clone(&self) -> Meas3DecodedEpoch

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for Meas3DecodedEpoch

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.