Struct sbp::messages::system::msg_pps_time::MsgPpsTime
source · pub struct MsgPpsTime {
pub sender_id: Option<u16>,
pub time: u64,
pub flags: u8,
}
Expand description
Local time at detection of PPS pulse
The PPS time message contains the value of the sender’s local time in microseconds at the moment a pulse is detected on the PPS input. This is to be used for synchronisation of sensor data sampled with a local timestamp (e.g. IMU or wheeltick messages) where GNSS time is unknown to the sender.
The local time used to timestamp the PPS pulse must be generated by the same clock which is used to timestamp the IMU/wheel sensor data and should follow the same roll-over rules (i.e. it should roll over to zero after 604800 seconds). A separate MSG_PPS_TIME message should be sent for each source of sensor data which uses local timestamping. The sender ID for each of these MSG_PPS_TIME messages should match the sender ID of the respective sensor data.
Fields§
§sender_id: Option<u16>
The message sender_id
time: u64
Local time in microseconds
flags: u8
Status flags
Implementations§
source§impl MsgPpsTime
impl MsgPpsTime
sourcepub fn reserved_set_to_zero(&self) -> u8
pub fn reserved_set_to_zero(&self) -> u8
Gets the reserved_set_to_zero
stored in flags
.
sourcepub fn set_reserved_set_to_zero(&mut self, reserved_set_to_zero: u8)
pub fn set_reserved_set_to_zero(&mut self, reserved_set_to_zero: u8)
Sets the reserved_set_to_zero
bitrange of flags
.
sourcepub fn time_uncertainty(&self) -> Result<TimeUncertainty, u8>
pub fn time_uncertainty(&self) -> Result<TimeUncertainty, u8>
Gets the TimeUncertainty stored in the flags
bitfield.
Returns Ok
if the bitrange contains a known TimeUncertainty
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 TimeUncertainty
were added.
sourcepub fn set_time_uncertainty(&mut self, time_uncertainty: TimeUncertainty)
pub fn set_time_uncertainty(&mut self, time_uncertainty: TimeUncertainty)
Set the bitrange corresponding to the TimeUncertainty of the flags
bitfield.
Trait Implementations§
source§impl Clone for MsgPpsTime
impl Clone for MsgPpsTime
source§fn clone(&self) -> MsgPpsTime
fn clone(&self) -> MsgPpsTime
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl ConcreteMessage for MsgPpsTime
impl ConcreteMessage for MsgPpsTime
source§const MESSAGE_TYPE: u16 = 65_288u16
const MESSAGE_TYPE: u16 = 65_288u16
source§const MESSAGE_NAME: &'static str = "MSG_PPS_TIME"
const MESSAGE_NAME: &'static str = "MSG_PPS_TIME"
source§impl Debug for MsgPpsTime
impl Debug for MsgPpsTime
source§impl<'de> Deserialize<'de> for MsgPpsTime
impl<'de> Deserialize<'de> for MsgPpsTime
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 MsgPpsTime
impl FriendlyName for MsgPpsTime
fn friendly_name() -> &'static str
source§impl From<MsgPpsTime> for Sbp
impl From<MsgPpsTime> for Sbp
source§fn from(msg: MsgPpsTime) -> Self
fn from(msg: MsgPpsTime) -> Self
source§impl PartialEq for MsgPpsTime
impl PartialEq for MsgPpsTime
source§fn eq(&self, other: &MsgPpsTime) -> bool
fn eq(&self, other: &MsgPpsTime) -> bool
self
and other
values to be equal, and is used
by ==
.