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
GNSS-only 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.
The values in this message are from GNSS measurements only. To get values fused with inertial measurements use MSG_GPS_TIME.
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§
source§impl 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§
source§impl Clone for MsgGpsTimeGnss
impl Clone for MsgGpsTimeGnss
source§fn clone(&self) -> MsgGpsTimeGnss
fn clone(&self) -> MsgGpsTimeGnss
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl ConcreteMessage for MsgGpsTimeGnss
impl ConcreteMessage for MsgGpsTimeGnss
source§const MESSAGE_TYPE: u16 = 260u16
const MESSAGE_TYPE: u16 = 260u16
source§const MESSAGE_NAME: &'static str = "MSG_GPS_TIME_GNSS"
const MESSAGE_NAME: &'static str = "MSG_GPS_TIME_GNSS"
source§impl Debug for MsgGpsTimeGnss
impl Debug for MsgGpsTimeGnss
source§impl<'de> Deserialize<'de> for MsgGpsTimeGnss
impl<'de> Deserialize<'de> for MsgGpsTimeGnss
source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
source§impl FriendlyName for MsgGpsTimeGnss
impl FriendlyName for MsgGpsTimeGnss
fn friendly_name() -> &'static str
source§impl From<MsgGpsTimeGnss> for Sbp
impl From<MsgGpsTimeGnss> for Sbp
source§fn from(msg: MsgGpsTimeGnss) -> Self
fn from(msg: MsgGpsTimeGnss) -> Self
source§impl PartialEq for MsgGpsTimeGnss
impl PartialEq for MsgGpsTimeGnss
source§fn eq(&self, other: &MsgGpsTimeGnss) -> bool
fn eq(&self, other: &MsgGpsTimeGnss) -> bool
self
and other
values to be equal, and is used
by ==
.