pub struct Gate<const DOF: usize>(/* private fields */);Expand description
Innovation gate threshold γ of equation (37), for an observation of DOF dimensions.
The degrees of freedom are a property of the observation rather than a choice, so they
are part of the type: a threshold for a one-dimensional observation cannot be written
into a three-dimensional source’s field, and Gate::at exists only for the dimensions
this crate observes. The only free parameter left is the Percentile.
Implementations§
Source§impl<const DOF: usize> Gate<DOF>
impl<const DOF: usize> Gate<DOF>
Sourcepub const fn new(threshold: f32) -> Option<Self>
pub const fn new(threshold: f32) -> Option<Self>
A threshold given as a number, for a caller with a reason to leave the Percentile
table; None unless it is finite and strictly positive.
Each refusal is a gate that fails silently. NaN compares false against every ε and
accepts everything; +∞ does the same while reporting a test ratio of zero; zero or
less rejects everything, and zero makes the ratio of (38) a division by zero.
Source§impl Gate<1>
impl Gate<1>
Sourcepub const fn at(percentile: Percentile) -> Self
pub const fn at(percentile: Percentile) -> Self
The chi-square quantile at percentile for one degree of freedom: barometric
altitude, GNSS height, magnetic heading.
Checked in this module’s tests against the closed-form CDF, not against another table.
Source§impl Gate<2>
impl Gate<2>
Sourcepub const fn at(percentile: Percentile) -> Self
pub const fn at(percentile: Percentile) -> Self
The chi-square quantile at percentile for two degrees of freedom: the horizontal half
of a GNSS position fix.
−2 ln(1 − p) exactly, since two degrees of freedom is the one case with a closed-form
CDF, F(x) = 1 − e^(−x/2); checked against it in this module’s tests.
Trait Implementations§
impl<const DOF: usize> Copy for Gate<DOF>
impl<const DOF: usize> StructuralPartialEq for Gate<DOF>
Auto Trait Implementations§
impl<const DOF: usize> Freeze for Gate<DOF>
impl<const DOF: usize> RefUnwindSafe for Gate<DOF>
impl<const DOF: usize> Send for Gate<DOF>
impl<const DOF: usize> Sync for Gate<DOF>
impl<const DOF: usize> Unpin for Gate<DOF>
impl<const DOF: usize> UnsafeUnpin for Gate<DOF>
impl<const DOF: usize> UnwindSafe for Gate<DOF>
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.