pub struct Meas3BlockSet {
pub ranges: Option<Meas3RangesBlock>,
pub cn0_hi_res: Option<Meas3Cn0HiResBlock>,
pub doppler: Option<Meas3DopplerBlock>,
pub pp: Option<Meas3PpBlock>,
pub mp: Option<Meas3MpBlock>,
}Expand description
One same-epoch bundle of Meas3 blocks for a single antenna.
Fields§
§ranges: Option<Meas3RangesBlock>§cn0_hi_res: Option<Meas3Cn0HiResBlock>§doppler: Option<Meas3DopplerBlock>§pp: Option<Meas3PpBlock>§mp: Option<Meas3MpBlock>Implementations§
Source§impl Meas3BlockSet
impl Meas3BlockSet
pub fn tow_ms(&self) -> Option<u32>
pub fn wnc(&self) -> Option<u16>
pub fn antenna_id(&self) -> Option<u8>
Sourcepub fn insert_block(&mut self, block: &SbfBlock) -> bool
pub fn insert_block(&mut self, block: &SbfBlock) -> bool
Examples found in repository?
examples/decode_meas3.rs (line 28)
8fn main() -> Result<(), Box<dyn Error>> {
9 let path = env::args()
10 .nth(1)
11 .ok_or("usage: cargo run --example decode_meas3 -- <path-to-file.sbf>")?;
12
13 let file = File::open(&path)?;
14 let reader = SbfReader::new(file);
15
16 let mut decoder = Meas3Decoder::new();
17 let mut current_tow: Option<u32> = None;
18 let mut bundles: HashMap<u8, Meas3BlockSet> = HashMap::new();
19
20 for block in reader {
21 let block = block?;
22
23 if let Some((tow_ms, antenna_id)) = meas3_epoch_key(&block) {
24 if current_tow != Some(tow_ms) {
25 flush_bundles(&mut bundles, &mut decoder)?;
26 current_tow = Some(tow_ms);
27 }
28 bundles.entry(antenna_id).or_default().insert_block(&block);
29 continue;
30 }
31
32 if matches!(block, SbfBlock::EndOfMeas(_)) {
33 flush_bundles(&mut bundles, &mut decoder)?;
34 current_tow = None;
35 }
36 }
37
38 flush_bundles(&mut bundles, &mut decoder)?;
39 Ok(())
40}pub fn clear(&mut self)
Trait Implementations§
Source§impl Clone for Meas3BlockSet
impl Clone for Meas3BlockSet
Source§fn clone(&self) -> Meas3BlockSet
fn clone(&self) -> Meas3BlockSet
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Meas3BlockSet
impl Debug for Meas3BlockSet
Source§impl Default for Meas3BlockSet
impl Default for Meas3BlockSet
Source§fn default() -> Meas3BlockSet
fn default() -> Meas3BlockSet
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for Meas3BlockSet
impl RefUnwindSafe for Meas3BlockSet
impl Send for Meas3BlockSet
impl Sync for Meas3BlockSet
impl Unpin for Meas3BlockSet
impl UnsafeUnpin for Meas3BlockSet
impl UnwindSafe for Meas3BlockSet
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more