Struct sbp::messages::system::msg_pps_time::MsgPpsTime
source · [−]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 syncronisation 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. A separate MSG_PPS_TIME message should be sent for each source of sensor data which uses PPS-relative 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
sourceimpl 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
sourceimpl Clone for MsgPpsTime
impl Clone for MsgPpsTime
sourcefn clone(&self) -> MsgPpsTime
fn clone(&self) -> MsgPpsTime
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 MsgPpsTime
impl ConcreteMessage for MsgPpsTime
sourceconst MESSAGE_TYPE: u16 = 65_288u16
const MESSAGE_TYPE: u16 = 65_288u16
The message type.
sourceconst MESSAGE_NAME: &'static str = "MSG_PPS_TIME"
const MESSAGE_NAME: &'static str = "MSG_PPS_TIME"
The message name.
sourceimpl Debug for MsgPpsTime
impl Debug for MsgPpsTime
sourceimpl From<MsgPpsTime> for Sbp
impl From<MsgPpsTime> for Sbp
sourcefn from(msg: MsgPpsTime) -> Self
fn from(msg: MsgPpsTime) -> Self
Converts to this type from the input type.
sourceimpl SbpMessage for MsgPpsTime
impl SbpMessage for MsgPpsTime
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 MsgPpsTime
impl Send for MsgPpsTime
impl Sync for MsgPpsTime
impl Unpin for MsgPpsTime
impl UnwindSafe for MsgPpsTime
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more