Skip to main content

Accuracy

Struct Accuracy 

Source
pub struct Accuracy {
    pub tilt: Radians,
    pub heading: Radians,
    pub position: Meters,
    pub velocity: MetersPerSecond,
    pub horizon: Seconds,
}
Expand description

How good an estimate has to be before the filter calls it valid.

The one group of numbers here that is meant to be supplied rather than derived: a survey platform and a racing quadrotor disagree about what “good enough” means, and no amount of flight data settles it. Everything else in Config is a property of the hardware or the mathematics; this is a property of the mission.

Each is a standard deviation, compared against the covariance the filter carries. For limits that differ between axes, read Eskf::covariance directly — these are the coarse per-quantity bar.

Nothing here moves Status. Whether the start has been resolved is ALIGNED_TILT and ALIGNED_HEADING’s question, so a survey platform can ask for 1° of roll without also waiting for 1° before the filter stops reporting Aligning.

A bar tighter than the prior Initialization starts from is accepted and never met: that quantity is invalid from the first epoch, while the filter aligns and reports Healthy as usual. On a replay it reads attitude_lost=0.00 — out of service the moment the start resolved — beside an aligned_at= that has not moved.

Fields§

§tilt: Radians

Tilt, per axis: the attitude’s σ about north and about east, each held to this. See AttitudeVariance.

§heading: Radians

Heading.

§position: Meters

Position, horizontally and vertically.

§velocity: MetersPerSecond

Velocity, horizontally and vertically.

§horizon: Seconds

How far ahead Eskf::predicted_validity asks: how long after arming the vehicle needs the estimate to still be good.

The one number in this crate that no data could settle. Every other default here was measured or could be, by replaying what real vehicles do; this one is a statement about the mission ahead rather than about any sensor, and a multirotor that will be under a GNSS fix within a second disagrees completely with a fixed-wing hand-launched into a minute of dead reckoning.

Read as a duration of unaided flight: the covariance is propagated this far with nothing fusing and each quantity tested at the far end. A value that is not a positive duration projects nothing, which leaves predicted_validity its other clause — the current answer widened by whatever source is being accepted — rather than reducing it to validity.

The projection is (22′), exact at any horizon under its assumption of a vehicle that stays put, and one step: a horizon of minutes costs what one of a second does.

Trait Implementations§

Source§

impl Clone for Accuracy

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 Accuracy

Source§

impl Debug for Accuracy

Source§

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

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

impl Default for Accuracy

Source§

fn default() -> Self

Attitude clears the prior a static alignment starts from, by the margin an unaided filter takes to drift through. All four are placeholders for a mission nobody has named: tilt and heading are ALIGNED_TILT and ALIGNED_HEADING because a bar some estimator uses is a better starting point than none, and position and velocity are loose enough to admit a 1 Hz GNSS solution.

Exactly those, not rounded near them. A mission bar a hair under the alignment bar opens a sliver where a start aligns and is out of service at the same epoch, for a reason nobody chose: 0.052 rad against 3°’s 0.0524 did exactly that.

A bar equal to the prior it is compared against is no bar at all: with tilt at Initialization::sigma_tilt exactly and heading at Initialization::sigma_yaw exactly, compared with <=, a static start passes by zero margin and the first Q of equation (21) takes it away again. On every static log in data/manifest.txt that read as a valid attitude for exactly one sample.

What these buy, measured on a static start at ImuNoise’s defaults: 10.3 s of unaided propagation before tilt leaves the bar and 274 s before heading does, from a window that measured its gyroscope, and 4.84 s and 51.4 s from one whose gyroscope never scattered (an_unaided_start_holds_its_attitude_for_the_margin_the_defaults_buy). The window sets them: the gyroscope-bias prior enters attitude through equation (20)’s −I Δt and grows as σ_βg² t², and only a window that measured the bias makes that prior small (see Initialization::sigma_gyro_bias). They are the schedule with Config::hold off. The position hold engages at the same 3° and pulls tilt back toward the bar each fusion, so with it on tilt stays valid until one fusion every 0.2 s is no longer enough: 16.28 s on f16771dd rather than 9.83, which is not a better attitude.

What those two times move is Validity, and nothing else. Status is already answering on the aiding timers by then — an unaided filter reports DeadReckoning from Timeouts::dead_reckoning_after without horizontal aiding, or from its first step if none was ever accepted — and Aligning reads the alignment bars rather than these. So these are a claim about which outputs a controller may still use, which is the question Accuracy exists to answer. Supply your own numbers.

horizon is 1 s, and it is a placeholder in a stronger sense than the other four: they are bars some estimator uses, while no estimator publishes this one at all. A second is the shortest horizon that is not simply validity asked twice — long enough that (20) has started to tell on tilt, short enough that a vehicle expecting a GNSS fix on takeoff is not failed for the gap before it.

Source§

impl PartialEq for Accuracy

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 Accuracy

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.