pub enum Status {
Healthy,
Degraded,
Aligning,
DeadReckoning,
}Expand description
How far the estimate can be trusted: whether attitude has converged, and how well aided it is.
Payload-free, so State stays Copy and cheap to read on the hot
path. The detail is in Diagnostics.
Declared in order of increasing severity. When more than one applies the most severe
is reported, so Aligning hides Degraded — an
attitude that has not converged is the larger problem — and
DeadReckoning hides everything, since position is unusable
whatever the attitude is doing. So a vehicle waiting on the ground for its first GNSS fix
reads DeadReckoning rather than Aligning, although its barometer and magnetometer are
arriving: Aligning is reachable only with horizontal aiding.
Variants§
Healthy
Every source that has ever been fused is still being accepted, and attitude has
converged. The course constraint is not counted: it reads the filter’s own velocity
rather than a sensor; see Eskf::fuse_course.
Degraded
At least one source has timed out against its own
timeout, and horizontal position is still aided.
Aligning
The filter is running and aided, but its attitude has not converged: it was initialized without a static window, seeded coarsely, or started from a window with no magnetometer in it, and is still learning.
Position and velocity are being estimated and are usable to the extent the covariance says. Attitude is not yet good enough to fly on.
Two ways out, and neither is a timer or an acknowledgement. Tilt and a widened
yaw leave on their own, as soon as the covariance falls within
ALIGNED_TILT and ALIGNED_HEADING
— fixed bars, not Config::accuracy, which is the
mission’s and moves only Validity. A heading nothing has observed
needs a measurement instead: stillness never supplies yaw, so a filter that
started without a magnetometer stays here however small the covariance is, until a
heading source — Eskf::fuse_mag_heading,
fuse_gnss_heading or
fuse_course — accepts one. A vehicle with none of the
three therefore never leaves, and — since this hides
Degraded — its source timeouts stop showing in Status and
have to be read from Diagnostics.
Leaving is permanent, and that is a claim about this variant rather than about the
estimate: it reports a start that has not been resolved yet, not attitude quality
now. Quality now is Validity::tilt, which does fall back,
and which an unaided filter loses within seconds of propagating. See
Eskf::is_aligned for what re-entering this state cost on
the corpus.
DeadReckoning
Neither GNSS position nor GNSS velocity has been accepted within
Timeouts::dead_reckoning_after, or ever: horizontal position and velocity error grow
without bound. A barometer or magnetometer still arriving holds height or heading, and
does not change this; Validity says per quantity what is held.
Trait Implementations§
impl Copy for Status
impl Eq for Status
impl StructuralPartialEq for Status
Auto Trait Implementations§
impl Freeze for Status
impl RefUnwindSafe for Status
impl Send for Status
impl Sync for Status
impl Unpin for Status
impl UnsafeUnpin for Status
impl UnwindSafe for Status
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.