pub struct GyroFilters {
pub cutoff_hz: f32,
pub notch: NotchConfig,
}Expand description
The filters the body rates pass through before the rate loop, as
CopterStabilizerConfig sets them:
a notch for one vibration tone, then the low-pass. The low-pass after the notch cleans up
what it leaves, as ArduPilot and PX4 order them (apply_gyro_filters,
FilterAngularVelocity). The autotune’s design models both, since the rate loop’s P and
D act through them.
§Examples
use stable_flight::controllers::GyroFilters;
let filters = GyroFilters::low_pass(40.0);
assert!(!filters.notch.is_on());Fields§
§cutoff_hz: f32The low-pass cutoff, in Hz; 0, or at or past Nyquist, passes the rates through.
notch: NotchConfigThe notch; off when its center is 0.
Implementations§
Trait Implementations§
Source§impl Clone for GyroFilters
impl Clone for GyroFilters
impl Copy for GyroFilters
Source§impl Debug for GyroFilters
impl Debug for GyroFilters
Source§impl PartialEq for GyroFilters
impl PartialEq for GyroFilters
impl StructuralPartialEq for GyroFilters
Auto Trait Implementations§
impl Forget for GyroFilters
impl Freeze for GyroFilters
impl Move for GyroFilters
impl RefUnwindSafe for GyroFilters
impl Send for GyroFilters
impl Sync for GyroFilters
impl Unpin for GyroFilters
impl UnsafeUnpin for GyroFilters
impl UnwindSafe for GyroFilters
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
Mutably borrows from an owned value. Read more
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>
The inverse inclusion map: attempts to construct
self from the equivalent element of its
superset. Read moreSource§fn is_in_subset(&self) -> bool
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
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
fn from_subset(element: &SS) -> SP
The inclusion map: converts
self to the equivalent element of its superset.