#[repr(C)]pub struct EkfMagSample {
pub time_us: u64,
pub mag: [f32; 3],
pub reset: u8,
pub _pad: [u8; 3],
}Expand description
Magnetometer sample
Fields§
§time_us: u64< timestamp [µs]
mag: [f32; 3]< field vector in body frame [Gauss]
reset: u8< 1 if sensor replaced or calibration changed mid-flight
_pad: [u8; 3]< explicit padding to 24 bytes
Implementations§
Source§impl EkfMagSample
impl EkfMagSample
Sourcepub const fn with_reset(self) -> Self
pub const fn with_reset(self) -> Self
Mark this sample as a sensor-replacement or calibration-change event.
Set when the magnetometer source changed mid-flight so the EKF can reinitialise its magnetometer states.
Trait Implementations§
Source§impl Clone for EkfMagSample
impl Clone for EkfMagSample
impl Copy for EkfMagSample
Source§impl Debug for EkfMagSample
impl Debug for EkfMagSample
Auto Trait Implementations§
impl Freeze for EkfMagSample
impl RefUnwindSafe for EkfMagSample
impl Send for EkfMagSample
impl Sync for EkfMagSample
impl Unpin for EkfMagSample
impl UnsafeUnpin for EkfMagSample
impl UnwindSafe for EkfMagSample
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