pub struct Validity {
pub tilt: bool,
pub heading: bool,
pub horizontal_position: bool,
pub vertical_position: bool,
pub horizontal_velocity: bool,
pub vertical_velocity: bool,
}Expand description
Which parts of the estimate are good enough to use.
The single Status answers how bad is the worst thing; this answers which
outputs can I use, which is the question a controller actually has. They are
independent axes, and collapsing them loses real information: a filter that started
coarse and has adopted a GNSS fix has position as good as the receiver while its
attitude is still converging, and Status::Aligning alone cannot say so.
Every flag is derived from the covariance against
Config::accuracy, plus the requirement that the quantity
was ever established at all — a coarse start has no position until a fix arrives, a
window with no magnetometer has no heading until a heading source is fused, and a tight prior on a
number nobody set is not validity. Nor is a covariance the position hold bounded: horizontal
position and velocity stay invalid after one until measured again; see
Hold.
Horizontal and vertical are separate because sources are: a vehicle with a barometer and no GNSS has a usable height and no horizontal position at all, as one log in the replay corpus does. Another carries neither source, so it has no position of either kind.
Fields§
§tilt: boolTilt: rotation about north and about east, each within
Accuracy::tilt. Read on navigation axes rather than body
ones, which are tilt only while the vehicle is level; see
AttitudeVariance.
heading: boolHeading. False until something observes the rotation about gravity: a
magnetometer in the initialization window, or an accepted
Eskf::fuse_mag_heading,
fuse_gnss_heading or
fuse_course. Stillness does not
observe it, so a perfect static alignment on a vehicle with no magnetometer
reports tilt and not this.
horizontal_position: boolNorth and east position.
vertical_position: boolDown position.
horizontal_velocity: boolNorth and east velocity.
vertical_velocity: boolDown velocity.
Implementations§
Trait Implementations§
impl Copy for Validity
Source§impl Display for Validity
Six flags in the order the struct declares them, a letter where the quantity is usable and
- where it is not: att:T- pos:HV vel:HV is tilt without heading, position and velocity
on both axes. The shape PX4’s *_valid flags and ArduPilot’s nav_filter_status bits
are read in, and short enough for every line of a 1 Hz log.
impl Display for Validity
Six flags in the order the struct declares them, a letter where the quantity is usable and
- where it is not: att:T- pos:HV vel:HV is tilt without heading, position and velocity
on both axes. The shape PX4’s *_valid flags and ArduPilot’s nav_filter_status bits
are read in, and short enough for every line of a 1 Hz log.
impl Eq for Validity
impl StructuralPartialEq for Validity
Auto Trait Implementations§
impl Freeze for Validity
impl RefUnwindSafe for Validity
impl Send for Validity
impl Sync for Validity
impl Unpin for Validity
impl UnsafeUnpin for Validity
impl UnwindSafe for Validity
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.