pub struct MsgImuRaw {
pub sender_id: Option<u16>,
pub tow: u32,
pub tow_f: u8,
pub acc_x: i16,
pub acc_y: i16,
pub acc_z: i16,
pub gyr_x: i16,
pub gyr_y: i16,
pub gyr_z: i16,
}
Expand description
Raw IMU data
Raw data from the Inertial Measurement Unit, containing accelerometer and
gyroscope readings. The sense of the measurements are to be aligned with
the indications on the device itself. Measurement units, which are
specific to the device hardware and settings, are communicated via the
MSG_IMU_AUX message. If using “time since startup” time tags, the
receiving end will expect a MSG_GNSS_TIME_OFFSET
when a PVT fix becomes
available to synchronise IMU measurements with GNSS. The timestamp must
wrap around to zero when reaching one week (604800 seconds).
The time-tagging mode should not change throughout a run.
Fields
sender_id: Option<u16>
The message sender_id
tow: u32
Milliseconds since reference epoch and time status.
tow_f: u8
Milliseconds since reference epoch, fractional part
acc_x: i16
Acceleration in the IMU frame X axis
acc_y: i16
Acceleration in the IMU frame Y axis
acc_z: i16
Acceleration in the IMU frame Z axis
gyr_x: i16
Angular rate around IMU frame X axis
gyr_y: i16
Angular rate around IMU frame Y axis
gyr_z: i16
Angular rate around IMU frame Z axis
Implementations
sourceimpl MsgImuRaw
impl MsgImuRaw
sourcepub fn time_status(&self) -> Result<TimeStatus, u8>
pub fn time_status(&self) -> Result<TimeStatus, u8>
Gets the TimeStatus stored in the tow
bitfield.
Returns Ok
if the bitrange contains a known TimeStatus
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 TimeStatus
were added.
sourcepub fn set_time_status(&mut self, time_status: TimeStatus)
pub fn set_time_status(&mut self, time_status: TimeStatus)
Set the bitrange corresponding to the TimeStatus of the tow
bitfield.
sourcepub fn time_since_reference_epoch_in_milliseconds(&self) -> u32
pub fn time_since_reference_epoch_in_milliseconds(&self) -> u32
Gets the time_since_reference_epoch_in_milliseconds
stored in tow
.
sourcepub fn set_time_since_reference_epoch_in_milliseconds(
&mut self,
time_since_reference_epoch_in_milliseconds: u32
)
pub fn set_time_since_reference_epoch_in_milliseconds(
&mut self,
time_since_reference_epoch_in_milliseconds: u32
)
Sets the time_since_reference_epoch_in_milliseconds
bitrange of tow
.
Trait Implementations
sourceimpl ConcreteMessage for MsgImuRaw
impl ConcreteMessage for MsgImuRaw
sourceconst MESSAGE_TYPE: u16 = 2_304u16
const MESSAGE_TYPE: u16 = 2_304u16
The message type.
sourceconst MESSAGE_NAME: &'static str = "MSG_IMU_RAW"
const MESSAGE_NAME: &'static str = "MSG_IMU_RAW"
The message name.
sourceimpl SbpMessage for MsgImuRaw
impl SbpMessage for MsgImuRaw
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 MsgImuRaw
impl Send for MsgImuRaw
impl Sync for MsgImuRaw
impl Unpin for MsgImuRaw
impl UnwindSafe for MsgImuRaw
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