pub struct PositionReport {
pub msg_type: u8,
pub mmsi: u32,
pub nav_status: Option<NavigationStatus>,
pub rate_of_turn: Option<f32>,
pub sog: Option<f32>,
pub position_accuracy: bool,
pub longitude: Option<f64>,
pub latitude: Option<f64>,
pub cog: Option<f32>,
pub heading: Option<u16>,
pub timestamp: Option<u8>,
pub ais_class: AisClass,
}Expand description
AIS Position Report — Types 1, 2, 3 (Class A) and 18 (Class B) and 19 (B+).
Fields§
§msg_type: u8§mmsi: u32§rate_of_turn: Option<f32>§sog: Option<f32>§position_accuracy: bool§longitude: Option<f64>§latitude: Option<f64>§cog: Option<f32>§heading: Option<u16>True heading in degrees (integer, 0-359). AIS has no fractional resolution for heading.
timestamp: Option<u8>§ais_class: AisClassImplementations§
Source§impl PositionReport
impl PositionReport
Sourcepub fn decode_class_a(bits: &[u8]) -> Option<Self>
pub fn decode_class_a(bits: &[u8]) -> Option<Self>
Decode a Type 1/2/3 Class A position report from AIS bits.
Source§impl PositionReport
impl PositionReport
Sourcepub fn decode_class_b(bits: &[u8]) -> Option<Self>
pub fn decode_class_b(bits: &[u8]) -> Option<Self>
Decode a Type 18 Class B standard position report.
Source§impl PositionReport
impl PositionReport
Sourcepub fn decode_class_b_extended(bits: &[u8]) -> Option<Self>
pub fn decode_class_b_extended(bits: &[u8]) -> Option<Self>
Decode a Type 19 Class B+ extended position report.
Trait Implementations§
Source§impl Clone for PositionReport
impl Clone for PositionReport
Source§fn clone(&self) -> PositionReport
fn clone(&self) -> PositionReport
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 PositionReport
impl Debug for PositionReport
Source§impl PartialEq for PositionReport
impl PartialEq for PositionReport
impl StructuralPartialEq for PositionReport
Auto Trait Implementations§
impl Freeze for PositionReport
impl RefUnwindSafe for PositionReport
impl Send for PositionReport
impl Sync for PositionReport
impl Unpin for PositionReport
impl UnsafeUnpin for PositionReport
impl UnwindSafe for PositionReport
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