Struct sbp::messages::navigation::msg_gps_time_gnss::MsgGpsTimeGnss
source · [−]pub struct MsgGpsTimeGnss {
pub sender_id: Option<u16>,
pub wn: u16,
pub tow: u32,
pub ns_residual: i32,
pub flags: u8,
}
Expand description
GPS Time
This message reports the GPS time, representing the time since the GPS epoch began on midnight January 6, 1980 UTC. GPS time counts the weeks and seconds of the week. The weeks begin at the Saturday/Sunday transition. GPS week 0 began at the beginning of the GPS time scale.
Within each week number, the GPS time of the week is between between 0 and 604800 seconds (=606024*7). Note that GPS time does not accumulate leap seconds, and as of now, has a small offset from UTC. In a message stream, this message precedes a set of other navigation messages referenced to the same time (but lacking the ns field) and indicates a more precise time of these messages.
Fields
sender_id: Option<u16>
The message sender_id
wn: u16
GPS week number
tow: u32
GPS time of week rounded to the nearest millisecond
ns_residual: i32
Nanosecond residual of millisecond-rounded TOW (ranges from -500000 to 500000)
flags: u8
Status flags (reserved)
Implementations
sourceimpl MsgGpsTimeGnss
impl MsgGpsTimeGnss
sourcepub fn time_source(&self) -> Result<TimeSource, u8>
pub fn time_source(&self) -> Result<TimeSource, u8>
Gets the TimeSource stored in the flags
bitfield.
Returns Ok
if the bitrange contains a known TimeSource
variant.
Otherwise the value of the bitrange is returned as an Err(u8)
. This may be because of a malformed message,
or because new variants of TimeSource
were added.
sourcepub fn set_time_source(&mut self, time_source: TimeSource)
pub fn set_time_source(&mut self, time_source: TimeSource)
Set the bitrange corresponding to the TimeSource of the flags
bitfield.
Trait Implementations
sourceimpl Clone for MsgGpsTimeGnss
impl Clone for MsgGpsTimeGnss
sourcefn clone(&self) -> MsgGpsTimeGnss
fn clone(&self) -> MsgGpsTimeGnss
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
sourceimpl ConcreteMessage for MsgGpsTimeGnss
impl ConcreteMessage for MsgGpsTimeGnss
sourceconst MESSAGE_TYPE: u16
const MESSAGE_TYPE: u16
The message type.
sourceconst MESSAGE_NAME: &'static str
const MESSAGE_NAME: &'static str
The message name.
sourceimpl Debug for MsgGpsTimeGnss
impl Debug for MsgGpsTimeGnss
sourceimpl From<MsgGpsTimeGnss> for Sbp
impl From<MsgGpsTimeGnss> for Sbp
sourcefn from(msg: MsgGpsTimeGnss) -> Self
fn from(msg: MsgGpsTimeGnss) -> Self
Performs the conversion.
sourceimpl SbpMessage for MsgGpsTimeGnss
impl SbpMessage for MsgGpsTimeGnss
sourcefn message_name(&self) -> &'static str
fn message_name(&self) -> &'static str
Get the message name.
sourcefn message_type(&self) -> u16
fn message_type(&self) -> u16
Get the message type.
sourcefn set_sender_id(&mut self, new_id: u16)
fn set_sender_id(&mut self, new_id: u16)
Set the sender id.
sourcefn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
Number of bytes this message will take on the wire.
Auto Trait Implementations
impl RefUnwindSafe for MsgGpsTimeGnss
impl Send for MsgGpsTimeGnss
impl Sync for MsgGpsTimeGnss
impl Unpin for MsgGpsTimeGnss
impl UnwindSafe for MsgGpsTimeGnss
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcepub fn borrow_mut(&mut self) -> &mut T
pub fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> ToOwned for T where
T: Clone,
impl<T> ToOwned for T where
T: Clone,
type Owned = T
type Owned = T
The resulting type after obtaining ownership.
sourcepub fn to_owned(&self) -> T
pub fn to_owned(&self) -> T
Creates owned data from borrowed data, usually by cloning. Read more
sourcepub fn clone_into(&self, target: &mut T)
pub fn clone_into(&self, target: &mut T)
toowned_clone_into
)Uses borrowed data to replace owned data, usually by cloning. Read more