Struct nmea::sentences::AlmData

source ·
pub struct AlmData {
Show 15 fields pub total_number_of_messages: Option<u16>, pub sentence_number: Option<u16>, pub satellite_prn_number: Option<u8>, pub gps_week_number: Option<u16>, pub sv_health: Option<u8>, pub eccentricity: Option<u16>, pub almanac_reference_time: Option<u8>, pub inclination_angle: Option<u16>, pub rate_of_right_ascension: Option<u16>, pub root_of_semi_major_axis: Option<u32>, pub argument_of_perigee: Option<u32>, pub longitude_of_ascension_node: Option<u32>, pub mean_anomaly: Option<u32>, pub f0_clock_parameter: Option<u16>, pub f1_clock_parameter: Option<u16>,
}
Expand description

ALM - GPS Almanac Data

https://gpsd.gitlab.io/gpsd/NMEA.html#_alm_gps_almanac_data

        1   2   3  4   5  6    7  8    9    10     11     12     13     14  15   16
        |   |   |  |   |  |    |  |    |    |      |      |      |      |   |    |
 $--ALM,x.x,x.x,xx,x.x,hh,hhhh,hh,hhhh,hhhh,hhhhhh,hhhhhh,hhhhhh,hhhhhh,hhh,hhh*hh<CR><LF>

Field Number:

  1. Total number of messages
  2. Sentence Number
  3. Satellite PRN number (01 to 32)
  4. GPS Week Number (range 0 to 2^13 - 1), where:
    • 0 is the week of the GPS Week Number epoch on January 6th 1980;
    • 8191 is the week that precedes the next rollover on January 6th 2137; Note: the legacy representation started at the same epoch, but the number is 10-bit wide only, with a rollover every 19.7 years.
  5. Eccentricity
  6. Almanac Reference Time
  7. Inclination Angle
  8. Rate of Right Ascension
  9. Root of semi-major axis
  10. Argument of perigee
  11. Longitude of ascension node
  12. Mean anomaly
  13. F0 Clock Parameter
  14. F1 Clock Parameter
  15. Checksum

Fields 5 through 15 are dumped as raw hex.

Fields§

§total_number_of_messages: Option<u16>§sentence_number: Option<u16>§satellite_prn_number: Option<u8>§gps_week_number: Option<u16>

This is the modern 13-bit representation of the GPS week number. Use AlmData::get_10bit_gps_week_number() to get the legacy 10-bit representation.

§sv_health: Option<u8>§eccentricity: Option<u16>§almanac_reference_time: Option<u8>§inclination_angle: Option<u16>§rate_of_right_ascension: Option<u16>§root_of_semi_major_axis: Option<u32>§argument_of_perigee: Option<u32>§longitude_of_ascension_node: Option<u32>§mean_anomaly: Option<u32>§f0_clock_parameter: Option<u16>§f1_clock_parameter: Option<u16>

Implementations§

source§

impl AlmData

source

pub fn get_10bit_gps_week_number(&self) -> Option<u16>

Returns the 10-bit representation of the GPS week number (range 0 to 1023)

Trait Implementations§

source§

impl Clone for AlmData

source§

fn clone(&self) -> AlmData

Returns a copy 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 AlmData

source§

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

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

impl<'de> Deserialize<'de> for AlmData

source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
source§

impl PartialEq<AlmData> for AlmData

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl Serialize for AlmData

source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>where __S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl Copy for AlmData

source§

impl Eq for AlmData

source§

impl StructuralEq for AlmData

source§

impl StructuralPartialEq for AlmData

Auto Trait Implementations§

Blanket Implementations§

source§

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

source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
source§

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

source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
source§

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

source§

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

Mutably borrows from an owned value. 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 Twhere 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 Twhere T: Clone,

§

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 Twhere U: Into<T>,

§

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 Twhere U: TryFrom<T>,

§

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.
source§

impl<T> DeserializeOwned for Twhere T: for<'de> Deserialize<'de>,