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” local time tags, the receiving end will expect either a MSG_GNSS_TIME_OFFSET or MSG_PPS_TIME to establish the relationship between IMU time and GNSS time. Regardless of the timestamping mode, the timestamp is required to roll over to zero when reaching one week (604800 seconds, or 604800000 milliseconds). 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§
source§impl 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
.