#[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
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.gnss_position: SourceHealthGNSS position updates, horizontal: north and east. See GnssFusion.
gnss_height: SourceHealthGNSS position updates, vertical: the height half of the same fix.
gnss_velocity: SourceHealthGNSS velocity updates.
baro_altitude: SourceHealthBarometric altitude updates.
mag_heading: SourceHealthMagnetic heading updates.
gnss_heading: SourceHealthDual-antenna GNSS heading updates.
course: SourceHealthCourse constraint updates: heading along the estimated velocity.
stationary: SourceHealthZero-velocity updates from a caller’s claim that the vehicle is still; see
Eskf::fuse_stationary.
position_hold: SourceHealthPosition-hold updates the filter fuses itself while unaided; see
Config::hold.
yaw_estimator: SourceHealthThe 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: PropagationHealthWhat Eskf::predict refused. Not a source, so not in
sources.
floored: u32Variances 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
impl Diagnostics
Sourcepub const fn sources(&self) -> [(&'static str, &SourceHealth); 10]
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
impl Clone for Diagnostics
impl Copy for Diagnostics
Source§impl Debug for Diagnostics
impl Debug for Diagnostics
Source§impl Default for Diagnostics
impl Default for Diagnostics
Source§impl Format for Diagnostics
Available on crate feature defmt only.
impl Format for Diagnostics
defmt only.Source§impl PartialEq for Diagnostics
impl PartialEq for Diagnostics
impl StructuralPartialEq for Diagnostics
Auto Trait Implementations§
impl Freeze for Diagnostics
impl RefUnwindSafe for Diagnostics
impl Send for Diagnostics
impl Sync for Diagnostics
impl Unpin for Diagnostics
impl UnsafeUnpin for Diagnostics
impl UnwindSafe for Diagnostics
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> Scalar for T
Source§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
Source§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).Source§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.Source§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.