AprsPosition

Struct AprsPosition 

Source
pub struct AprsPosition {
    pub latitude: f64,
    pub longitude: f64,
    pub symbol_table: char,
    pub symbol_code: char,
    pub speed_knots: Option<u16>,
    pub course_degrees: Option<u16>,
    pub comment: String,
    pub weather: Option<AprsWeather>,
    pub extensions: AprsDataExtension,
    pub mice_message: Option<MiceMessage>,
    pub mice_altitude_m: Option<i32>,
    pub ambiguity: PositionAmbiguity,
}
Expand description

A parsed APRS position report.

Includes optional speed/course fields populated by Mic-E decoding and optional embedded weather data populated when the station reports with the weather-station symbol code _. Data extensions (course/speed, PHG, altitude, DAO) found in the comment field are parsed automatically and exposed via Self::extensions.

Fields§

§latitude: f64

Latitude in decimal degrees (positive = North).

§longitude: f64

Longitude in decimal degrees (positive = East).

§symbol_table: char

APRS symbol table identifier character.

§symbol_code: char

APRS symbol code character.

§speed_knots: Option<u16>

Speed in knots (from Mic-E or course/speed extension).

§course_degrees: Option<u16>

Course in degrees (from Mic-E or course/speed extension).

§comment: String

Optional comment/extension text after the position.

§weather: Option<AprsWeather>

Optional weather data embedded in the position comment.

Populated when the symbol code is _ (weather station) and the comment starts with the DDD/SSS wind direction/speed extension, followed by the remaining weather fields. See APRS 1.0.1 §12.1.

§extensions: AprsDataExtension

Parsed data extensions (course/speed, PHG, altitude, DAO) found in the comment field.

Populated automatically by parse_aprs_position via parse_aprs_extensions. Fields that aren’t present in the comment are None.

§mice_message: Option<MiceMessage>

Mic-E standard message code (only populated by crate::mic_e::parse_mice_position).

§mice_altitude_m: Option<i32>

Mic-E altitude in metres, decoded from the comment per APRS 1.0.1 §10.1.1 (three base-91 chars followed by }, offset from -10000).

§ambiguity: PositionAmbiguity

Position ambiguity level (APRS 1.0.1 §8.1.6).

Stations can deliberately reduce their precision by replacing trailing lat/lon digits with spaces; this field records how many digits were masked. Mic-E and compressed positions do not use ambiguity and always report PositionAmbiguity::None.

Trait Implementations§

Source§

impl Clone for AprsPosition

Source§

fn clone(&self) -> AprsPosition

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 AprsPosition

Source§

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

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

impl PartialEq for AprsPosition

Source§

fn eq(&self, other: &AprsPosition) -> 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 AprsPosition

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.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more