Skip to main content

StaticSample

Struct StaticSample 

Source
pub struct StaticSample {
    pub imu: ImuSample,
    pub mag: Option<MagField<Body>>,
    pub baro: Option<Altitude>,
    pub velocity: Option<Velocity<Ned>>,
}
Expand description

One sample from the quasi-static initialization window.

The magnetometer is optional: without it nothing observes the rotation about gravity, ψ₀ of equation (6) stays zero, and the first accepted heading, magnetic, GNSS or course, is what establishes it. A window with none anywhere in it says so: Validity::heading stays false until a heading source accepts one, because sigma_yaw is a prior and would otherwise read as an estimate of a quantity nothing measured.

The barometer is optional in the same way, but less forgivingly: its reference is established by a start and only refined after one (30′), so a window carrying none leaves nothing for a later altitude to be relative to and barometric fusion is refused for the whole flight.

GNSS velocity is the one field a window taken in motion can use, and the only reason this type is not simply an IMU sample plus what stillness needs: see velocity.

Fields§

§imu: ImuSample

IMU measurement.

§mag: Option<MagField<Body>>

Magnetometer measurement, if the vehicle has one.

Averaged over the window to fix ψ₀, the initial heading (equation (6)), and averaged rather than taken from one sample for the reason the barometer and the gyroscope bias are: a single reading carries the sensor’s full noise.

§baro: Option<Altitude>

Barometric altitude, if the vehicle has a barometer.

Averaged over the window to fix α₀, the barometer’s reference at the navigation origin (equation (30)). Averaged rather than taken from one sample for the same reason the gyroscope bias is: a single reading carries the sensor’s full noise.

Without it the window fixes no reference, and Eskf::fuse_baro_altitude reads one from the estimate at the first altitude instead. α₀ is refined in flight by (30′), and the scatter of these readings is the variance it starts with, so a window needs two of them.

§velocity: Option<Velocity<Ned>>

GNSS velocity in the navigation frame, if the vehicle has a receiver.

Differenced across the window for ā_n, the vehicle’s own acceleration (equation (5′)). At rest that term is zero and equation (5) reads tilt straight off the accelerometer; in motion the accelerometer reads specific force, and ā_n is what separates the two. It is the whole of what a moving window has that a still one does not need.

Attach it to the epoch it arrived on rather than holding it across the IMU epochs that follow, as mag and baro may be held: those are averaged, and an average survives a repeated value, while a difference is dated by the samples carrying it and a held reading dates from before the epoch it sits on. Holding costs up to one GNSS interval of span, in either direction.

Stub. Measured and reported on Coarse::NotStationary; nothing levels with it. Not built: equation (5′), #59.

Trait Implementations§

Source§

impl Clone for StaticSample

Source§

fn clone(&self) -> Self

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Copy for StaticSample

Source§

impl Debug for StaticSample

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for StaticSample

Source§

fn default() -> Self

Returns the “default value” for a type. Read more
Source§

impl PartialEq for StaticSample

Source§

fn eq(&self, other: &Self) -> bool

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

fn ne(&self, other: &Rhs) -> bool

Inequality operator !=. Read more
Source§

impl StructuralPartialEq for StaticSample

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,

Source§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

Source§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
Source§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
Source§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
Source§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.