Skip to main content

LongRangePosition

Struct LongRangePosition 

Source
pub struct LongRangePosition {
    pub mmsi: u32,
    pub position_accuracy: bool,
    pub raim: bool,
    pub nav_status: Option<NavigationStatus>,
    pub longitude: Option<f64>,
    pub latitude: Option<f64>,
    pub sog: Option<u8>,
    pub cog: Option<u16>,
    pub gnss_position_status: bool,
}
Expand description

AIS Type 27 — Long Range Position Report.

ITU-R M.1371 bit layout (96 bits):

  • bits 0–5: message type (= 27)
  • bits 6–7: repeat indicator
  • bits 8–37: MMSI (30 bits)
  • bit 38: position accuracy
  • bit 39: RAIM flag
  • bits 40–43: navigational status (4 bits)
  • bits 44–61: longitude in 1/10° (18 bits, signed)
  • bits 62–78: latitude in 1/10° (17 bits, signed)
  • bits 79–84: SOG in knots (6 bits, integer, 63 = not available)
  • bits 85–93: COG in degrees (9 bits, integer, 511 = not available)
  • bit 94: GNSS position status

Fields§

§mmsi: u32§position_accuracy: bool

High position accuracy (DGPS / differential fix).

§raim: bool

RAIM (Receiver Autonomous Integrity Monitoring) flag.

§nav_status: Option<NavigationStatus>

Navigational status. None if not defined.

§longitude: Option<f64>

Longitude in decimal degrees WGS-84 (1/10° precision). None if sentinel (181°).

§latitude: Option<f64>

Latitude in decimal degrees WGS-84 (1/10° precision). None if sentinel (91°).

§sog: Option<u8>

Speed over ground in integer knots. None if not available (raw = 63).

§cog: Option<u16>

Course over ground in integer degrees (0–359). None if not available (raw = 511).

§gnss_position_status: bool

true = current GNSS position; false = not GNSS position (4 h old or more).

Trait Implementations§

Source§

impl Clone for LongRangePosition

Source§

fn clone(&self) -> LongRangePosition

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 LongRangePosition

Source§

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

Formats the value using the given formatter. Read more
Source§

impl PartialEq for LongRangePosition

Source§

fn eq(&self, other: &LongRangePosition) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl StructuralPartialEq for LongRangePosition

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.