pub struct WindConfig {
pub ballistic_kgpm2: Vec2,
pub momentum_per_s: Vec2,
pub force_noise_mps2: f32,
pub process_noise_mps_per_rt_s: f32,
}Expand description
The drag model, per thrust-frame axis (x, y), and the filter’s noise.
With every coefficient 0 (the default, as both stacks ship drag fusion off) the estimator never updates.
Fields§
§ballistic_kgpm2: Vec2Ballistic coefficient along x and y, in kg/m²: mass over drag coefficient times
area, so the bluff-body drag is ½ρv²/B per kg. 0 leaves the term out. Must be
non-negative and finite.
momentum_per_s: Vec2Momentum drag along x and y, in 1/s: drag acceleration per m/s of air velocity.
0 leaves the term out. Must be non-negative and finite.
force_noise_mps2: f32Specific-force noise on each averaged measurement, in m/s². Must be positive and
finite. Defaults to DEFAULT_FORCE_NOISE_MPS2.
process_noise_mps_per_rt_s: f32How fast the wind may wander, in m/s per √s (process noise). Must be non-negative and
finite. Defaults to DEFAULT_PROCESS_NOISE_MPS_PER_RT_S.
Implementations§
Source§impl WindConfig
impl WindConfig
Sourcepub fn validate(&self) -> Result<(), InvalidConfig>
pub fn validate(&self) -> Result<(), InvalidConfig>
Checks that the coefficients and process_noise_mps_per_rt_s are non-negative and finite and
that force_noise_mps2 is positive and finite.
§Examples
use stable_flight::estimation::wind::WindConfig;
let mut config = WindConfig::default();
assert!(config.validate().is_ok());
config.force_noise_mps2 = 0.0;
assert!(config.validate().is_err());Trait Implementations§
Source§impl Clone for WindConfig
impl Clone for WindConfig
impl Copy for WindConfig
Source§impl Debug for WindConfig
impl Debug for WindConfig
Source§impl Default for WindConfig
impl Default for WindConfig
Source§impl<'de> Deserialize<'de> for WindConfig
impl<'de> Deserialize<'de> for WindConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Source§impl PartialEq for WindConfig
impl PartialEq for WindConfig
Source§impl Serialize for WindConfig
impl Serialize for WindConfig
impl StructuralPartialEq for WindConfig
Auto Trait Implementations§
impl Freeze for WindConfig
impl RefUnwindSafe for WindConfig
impl Send for WindConfig
impl Sync for WindConfig
impl Unpin for WindConfig
impl UnsafeUnpin for WindConfig
impl UnwindSafe for WindConfig
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> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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.