pub enum InitError {
NoSamples,
InvalidInterval {
interval: Seconds,
},
InvalidStep {
dt: Seconds,
},
NotFinite,
InvalidVariance,
}Expand description
Why initialization could not run at all.
Distinct from Coarse: these are inputs the filter can make nothing of, not starts
of lower quality. Every one of them is the caller handing over something broken, which
is why they are checked rather than trusted — a seed in particular crosses a boundary
the filter does not control, arriving from another estimator or from storage that may
be stale or corrupt.
Variants§
NoSamples
The window held no samples, so there is nothing to align from.
InvalidInterval
A sample’s integration interval was under a microsecond, so it covers no span of time
to measure the window over or divide its increments by. One that is not a number is
NotFinite.
InvalidStep
A sample was timed no later than the one before it, so the window’s timestamps say
nothing about when it ended, which is where the filter’s clock starts. As
Propagation::InvalidStep for a step.
NotFinite
A measurement, state, or covariance carried a value that is not finite.
InvalidVariance
A seed covariance had a variance on its diagonal that no prior has: below the floor of equation (42′), which includes zero and negative.
Zero is the one that arrives in practice, from a warm start deserialized out of
storage that never populated the diagonal. It reads as a tight prior and is not
one: it claims perfect knowledge, so the gain K = P Hᵀ S⁻¹ of equation (25) is
zero for that quantity and no measurement ever corrects it, while
Validity compares the zero variance against
Config::accuracy and reports the quantity good from
the first read. A negative variance claims better than perfect.
The bar is the floor rather than zero because zero is only the tidiest member of
that class: the same accident with an exponent left in it arrives at 1e-30 and is
indistinguishable in f32 — the gain is still zero and the quantity still reads good
from the first epoch. A seed is the one path that writes a covariance in whole, so
it is refused here where a reset_*_to writing one block is floored instead. See
Fusion::InvalidNoise for the bar every fuse_*
puts on R, which is still strict positivity.
Symmetry is imposed by (42) rather than checked, and positive-definiteness is not checked: that is a factorization on the caller’s data, not a guard.
Trait Implementations§
impl Copy for InitError
Source§impl Error for InitError
impl Error for InitError
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<SampleRefusal> for InitError
impl From<SampleRefusal> for InitError
Source§fn from(refusal: SampleRefusal) -> Self
fn from(refusal: SampleRefusal) -> Self
impl StructuralPartialEq for InitError
Auto Trait Implementations§
impl Freeze for InitError
impl RefUnwindSafe for InitError
impl Send for InitError
impl Sync for InitError
impl Unpin for InitError
impl UnsafeUnpin for InitError
impl UnwindSafe for InitError
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.