pub struct ImuPayload {
pub accel_x: Acceleration,
pub accel_y: Acceleration,
pub accel_z: Acceleration,
pub gyro_x: AngularVelocity,
pub gyro_y: AngularVelocity,
pub gyro_z: AngularVelocity,
pub temperature: ThermodynamicTemperature,
}Expand description
Standardized IMU payload carrying acceleration, angular velocity, and optional magnetometer data.
Fields§
§accel_x: Acceleration§accel_y: Acceleration§accel_z: Acceleration§gyro_x: AngularVelocity§gyro_y: AngularVelocity§gyro_z: AngularVelocity§temperature: ThermodynamicTemperatureImplementations§
Source§impl ImuPayload
impl ImuPayload
Sourcepub fn from_raw(
accel_mps2: [f32; 3],
gyro_rad: [f32; 3],
temperature_c: f32,
) -> Self
pub fn from_raw( accel_mps2: [f32; 3], gyro_rad: [f32; 3], temperature_c: f32, ) -> Self
Build an IMU payload from plain scalar values.
accel_mps2- acceleration in m/s².gyro_rad- angular velocity in rad/s.temperature_c- temperature in °C.
Sourcepub fn from_uom(
accel_x: Acceleration,
accel_y: Acceleration,
accel_z: Acceleration,
gyro_x: AngularVelocity,
gyro_y: AngularVelocity,
gyro_z: AngularVelocity,
temperature: ThermodynamicTemperature,
) -> Self
pub fn from_uom( accel_x: Acceleration, accel_y: Acceleration, accel_z: Acceleration, gyro_x: AngularVelocity, gyro_y: AngularVelocity, gyro_z: AngularVelocity, temperature: ThermodynamicTemperature, ) -> Self
Build an IMU payload from unit-carrying types.
Trait Implementations§
Source§impl Clone for ImuPayload
impl Clone for ImuPayload
Source§fn clone(&self) -> ImuPayload
fn clone(&self) -> ImuPayload
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ImuPayload
impl Debug for ImuPayload
Source§impl Decode<()> for ImuPayload
impl Decode<()> for ImuPayload
Source§impl Default for ImuPayload
impl Default for ImuPayload
Source§impl<'de> Deserialize<'de> for ImuPayload
impl<'de> Deserialize<'de> for ImuPayload
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>,
Deserialize this value from the given Serde deserializer. Read more
Source§impl Encode for ImuPayload
impl Encode for ImuPayload
Source§impl PartialEq for ImuPayload
impl PartialEq for ImuPayload
Source§impl Serialize for ImuPayload
impl Serialize for ImuPayload
impl Copy for ImuPayload
impl StructuralPartialEq for ImuPayload
Auto Trait Implementations§
impl Freeze for ImuPayload
impl !RefUnwindSafe for ImuPayload
impl Send for ImuPayload
impl Sync for ImuPayload
impl Unpin for ImuPayload
impl !UnwindSafe for ImuPayload
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> ElementType for T
impl<T> ElementType for T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more