pub struct StepSummary {
pub overshoot: Stat,
pub overshoot_positive: Stat,
pub overshoot_negative: Stat,
pub rise_time_s: Stat,
pub settling_time_s: Stat,
pub bounce_back: Stat,
pub final_value: Stat,
pub overshoot_past_end: Stat,
pub not_risen: usize,
pub not_settled: usize,
}Expand description
Statistics over a series of StepMetrics (e.g. alternating steps of one loop): each
metric’s mean and range, how many steps never rose or settled, and the overshoot per
direction, whose difference shows a trim or CG offset. Plain data, no allocation.
§Examples
use stable_flight::tuning::{StepMetrics, StepSummary};
let mut summary = StepSummary::default();
summary.add(&StepMetrics { amplitude: 1.0, overshoot: 0.2, ..Default::default() });
summary.add(&StepMetrics { amplitude: -1.0, overshoot: 0.1, ..Default::default() });
assert_eq!(summary.overshoot.mean(), Some(0.15));
assert_eq!(summary.overshoot_positive.mean(), Some(0.2));Fields§
§overshoot: StatStepMetrics::overshoot over every step.
overshoot_positive: StatOvershoot of the steps with a positive amplitude.
overshoot_negative: StatOvershoot of the steps with a negative amplitude.
rise_time_s: StatStepMetrics::rise_time_s over the steps that rose.
settling_time_s: StatStepMetrics::settling_time_s over the steps that settled.
bounce_back: Stat§final_value: Stat§overshoot_past_end: StatHow far each step’s peak went past where it ended, or past the step when it ended short
of it: peak − max(1, final_value), or 0. A step held past the step by a disturbance,
without ringing, reads 0 here though its overshoot reads how
far past it ended (#564). Meaningful when the window outlasts the rise, so the end is
where the response settled.
not_risen: usizeSteps that never reached 90%.
not_settled: usizeSteps that ended outside the settle band.
Implementations§
Source§impl StepSummary
impl StepSummary
Trait Implementations§
Source§impl Clone for StepSummary
impl Clone for StepSummary
impl Copy for StepSummary
Source§impl Debug for StepSummary
impl Debug for StepSummary
Source§impl Default for StepSummary
impl Default for StepSummary
Source§impl PartialEq for StepSummary
impl PartialEq for StepSummary
impl StructuralPartialEq for StepSummary
Auto Trait Implementations§
impl Forget for StepSummary
impl Freeze for StepSummary
impl Move for StepSummary
impl RefUnwindSafe for StepSummary
impl Send for StepSummary
impl Sync for StepSummary
impl Unpin for StepSummary
impl UnsafeUnpin for StepSummary
impl UnwindSafe for StepSummary
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.