Struct ublox::NavTimeLsRef

source ·
pub struct NavTimeLsRef<'a>(/* private fields */);
Expand description

Leap second event information Contains a reference to an underlying buffer, contains accessor methods to retrieve data.

Implementations§

source§

impl<'a> NavTimeLsRef<'a>

source

pub fn as_bytes(&self) -> &[u8]

source

pub fn itow(&self) -> u32

GPS time of week of the navigation epoch in ms.

source

pub fn version(&self) -> u8

Message version (0x00 for this version)

source

pub fn reserved_1(&self) -> [u8; 3]

source

pub fn src_of_curr_ls(&self) -> u8

Information source for the current number of leap seconds. 0: Default (hardcoded in the firmware, can be outdated) 1: Derived from time difference between GPS and GLONASS time 2: GPS 3: SBAS 4: BeiDou 5: Galileo 6: Aided data 7: Configured 8: NavIC 255: Unknown

source

pub fn current_ls(&self) -> i8

Current number of leap seconds since start of GPS time (Jan 6, 1980). It reflects how much GPS time is ahead of UTC time. Galileo number of leap seconds is the same as GPS. BeiDou number of leap seconds is 14 less than GPS. GLONASS follows UTC time, so no leap seconds.

source

pub fn src_of_ls_change(&self) -> u8

Information source for the future leap second event. 0: No source 2: GPS 3: SBAS 4: BeiDou 5: Galileo 6: GLONASS 7: NavIC

source

pub fn ls_change(&self) -> i8

Future leap second change if one is scheduled. +1 = positive leap second, -1 = negative leap second, 0 = no future leap second event scheduled or no information available.

source

pub fn time_to_ls_event(&self) -> i32

Number of seconds until the next leap second event, or from the last leap second event if no future event scheduled. If > 0 event is in the future, = 0 event is now, < 0 event is in the past. Valid only if validTimeToLsEvent = 1.

source

pub fn date_of_ls_gps_wn(&self) -> u16

GPS week number (WN) of the next leap second event or the last one if no future event scheduled. Valid only if validTimeToLsEvent = 1.

source

pub fn date_of_ls_gps_dn(&self) -> u16

GPS day of week number (DN) for the next leap second event or the last one if no future event scheduled. Valid only if validTimeToLsEvent = 1. (GPS and Galileo DN: from 1 = Sun to 7 = Sat. BeiDou DN: from 0 = Sun to 6 = Sat.)

source

pub fn reserved_2(&self) -> [u8; 3]

source

pub fn valid_raw(&self) -> u8

Validity flags see NavTimeLsFlags

source

pub fn valid(&self) -> NavTimeLsFlags

Validity flags see NavTimeLsFlags

Trait Implementations§

source§

impl Debug for NavTimeLsRef<'_>

source§

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

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

impl Serialize for NavTimeLsRef<'_>

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

Auto Trait Implementations§

§

impl<'a> RefUnwindSafe for NavTimeLsRef<'a>

§

impl<'a> Send for NavTimeLsRef<'a>

§

impl<'a> Sync for NavTimeLsRef<'a>

§

impl<'a> Unpin for NavTimeLsRef<'a>

§

impl<'a> UnwindSafe for NavTimeLsRef<'a>

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, 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.