pub struct ImuSample { /* private fields */ }Expand description
One IMU sample: angular rate and specific force in the body frame, averaged over the interval since the previous sample.
Angular rate about forward, right, down in rad/s; specific force along them
in m/s². At rest the specific force is minus gravity, about [0, 0, −9.8]
(down positive).
Implementations§
Source§impl ImuSample
impl ImuSample
Sourcepub fn new(
angular_rate: [f64; 3],
specific_force: [f64; 3],
over: Duration,
) -> Result<Self>
pub fn new( angular_rate: [f64; 3], specific_force: [f64; 3], over: Duration, ) -> Result<Self>
Sample from angular rate, specific force and interval.
§Errors
kinavis_kernel::KernelError::NotFinite for a non-finite component;
kinavis_kernel::KernelError::OutOfRange for an interval of zero or
over one second.
Sourcepub const fn angular_rate(&self) -> [f64; 3]
pub const fn angular_rate(&self) -> [f64; 3]
Angular rate about forward, right, down, rad/s.
Sourcepub const fn specific_force(&self) -> [f64; 3]
pub const fn specific_force(&self) -> [f64; 3]
Specific force along forward, right, down, m/s².
Trait Implementations§
impl Copy for ImuSample
impl StructuralPartialEq for ImuSample
Auto Trait Implementations§
impl Freeze for ImuSample
impl RefUnwindSafe for ImuSample
impl Send for ImuSample
impl Sync for ImuSample
impl Unpin for ImuSample
impl UnsafeUnpin for ImuSample
impl UnwindSafe for ImuSample
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