Skip to main content

Diagnostics

Struct Diagnostics 

Source
#[non_exhaustive]
pub struct Diagnostics { pub gnss_position: SourceHealth, pub gnss_height: SourceHealth, pub gnss_velocity: SourceHealth, pub baro_altitude: SourceHealth, pub mag_heading: SourceHealth, pub gnss_heading: SourceHealth, pub course: SourceHealth, pub stationary: SourceHealth, pub position_hold: SourceHealth, pub yaw_estimator: SourceHealth, pub propagation: PropagationHealth, pub floored: u32, /* private fields */ }
Expand description

Per-source health and what propagation refused, off the hot path.

Returned by Eskf::diagnostics.

Every count here describes the filter’s life since it last initialized, not since it was constructed: committing a window resets these. Measurements offered before then are refused with Fusion::NotInitialized and counted, and that count goes with the reset — which is what makes a refusal count afterwards a statement about the flight rather than about the caller’s startup order.

#[non_exhaustive]; see SourceHealth.

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§gnss_position: SourceHealth

GNSS position updates, horizontal: north and east. See GnssFusion.

§gnss_height: SourceHealth

GNSS position updates, vertical: the height half of the same fix.

§gnss_velocity: SourceHealth

GNSS velocity updates.

§baro_altitude: SourceHealth

Barometric altitude updates.

§mag_heading: SourceHealth

Magnetic heading updates.

§gnss_heading: SourceHealth

Dual-antenna GNSS heading updates.

§course: SourceHealth

Course constraint updates: heading along the estimated velocity.

§stationary: SourceHealth

Zero-velocity updates from a caller’s claim that the vehicle is still; see Eskf::fuse_stationary.

§position_hold: SourceHealth

Position-hold updates the filter fuses itself while unaided; see Config::hold.

§yaw_estimator: SourceHealth

The yaw estimator of (45)–(52): each GNSS velocity it weighed is an arrival, and each heading the filter took from it an adoption, counted in adopted and, as every adoption is, in accepted. Never rejected, since its answer is not gated; see Config::yaw_estimator.

§propagation: PropagationHealth

What Eskf::predict refused. Not a source, so not in sources.

§floored: u32

Variances raised to the floor of equation (42′), counted per entry rather than per covariance.

Expected to stay at zero, and it does across the whole corpus — the floor is set well below anything the filter reaches there (measured). So a count climbing here says a variance is collapsing for a reason of its own — an R far smaller than what the measurement actually observes, or a source fused faster than it carries independent information — and that the floor is masking it rather than protecting against it. It is the one number here whose interesting value is the one it does not have.

Not counted per state, which would say which variance collapsed: a count that should be zero needs only to be non-zero to be worth reading, and the sigma_* columns of examples/replay/main.rs name the state as soon as anybody looks.

Implementations§

Source§

impl Diagnostics

Source

pub const fn sources(&self) -> [(&'static str, &SourceHealth); 10]

Every source, for iteration.

By reference, since Status reads this on every Eskf::state and a copy of nine SourceHealths is most of that call’s stack frame.

Trait Implementations§

Source§

impl Clone for Diagnostics

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 Diagnostics

Source§

impl Debug for Diagnostics

Source§

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

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

impl Default for Diagnostics

Source§

fn default() -> Self

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

impl Format for Diagnostics

Available on crate feature defmt only.
Source§

fn format(&self, f: Formatter<'_>)

Writes the defmt representation of self to fmt.
Source§

impl PartialEq for Diagnostics

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 Diagnostics

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.