Skip to main content

InitError

Enum InitError 

Source
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.

Fields

§interval: Seconds

The interval offered.

§

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.

Fields

§dt: Seconds

The time from the previous sample to this one.

§

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§

Source§

impl Clone for InitError

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 InitError

Source§

impl Debug for InitError

Source§

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

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

impl Display for InitError

Source§

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

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

impl Error for InitError

1.30.0 · Source§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0:

use the Display impl or to_string()

1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0:

replaced by Error::source, which can support downcasting

Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
Source§

impl Format for InitError
where Seconds: Format,

Available on crate feature defmt only.
Source§

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

Writes the defmt representation of self to fmt.
Source§

impl From<SampleRefusal> for InitError

Source§

fn from(refusal: SampleRefusal) -> Self

Converts to this type from the input type.
Source§

impl PartialEq for InitError

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 InitError

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.