pub struct WingModel {
pub stiffness_per_s2: f32,
pub damping_per_s: f32,
pub control_radps2: f32,
pub lag_s: f32,
pub delay_s: f32,
pub path_turn_per_s: f32,
pub trim_moment: f32,
}Expand description
A wing axis’s response to its moment command, fitted in flight: how the moment, through the surfaces’ lag and a delay, accelerates the axis against its damping and, in pitch, the wing’s stiffness in angle of attack.
rate′ = −stiffness·α − damping·rate + control·surface, with rate the body rate in rad/s,
α the angle of attack off its trim in rad, and surface the normalized moment command
through a first-order lag of lag_s, delay_s late. A stable wing has positive stiffness
and damping. In pitch the flight path turns with angle of attack, γ′ = path_turn·α, so a
held pitch settles back to the trim angle of attack over 1 / path_turn seconds.
Fields§
§stiffness_per_s2: f32Pitch acceleration per rad of angle of attack, nose down for a positive one, in 1/s²; 0 on a roll axis.
damping_per_s: f32Rate acceleration per rad/s of body rate, against the rate, in 1/s.
control_radps2: f32Rate acceleration per unit moment at full surface, in rad/s².
lag_s: f32The surfaces’ first-order lag, in s.
delay_s: f32Time from a moment command to its first effect, in s.
path_turn_per_s: f32The flight path’s turn per rad of angle of attack (lift over mass and speed), in 1/s; 0 on a roll axis.
trim_moment: f32The moment that holds the axis in trim: the window’s mean moment command (the square wave, washed out, averages near 0). Normalized.
Implementations§
Source§impl WingModel
impl WingModel
Sourcepub fn feedforward(&self) -> f32
pub fn feedforward(&self) -> f32
The moment per rad/s of body rate that holds a rate against the damping: the rate
loop’s feedforward, damping / control.
§Examples
use stable_flight::tuning::WingModel;
let model = WingModel {
stiffness_per_s2: 0.0,
damping_per_s: 7.0,
control_radps2: 14.0,
lag_s: 0.0,
delay_s: 0.0,
path_turn_per_s: 0.0,
trim_moment: 0.0,
};
assert_eq!(model.feedforward(), 0.5);Trait Implementations§
impl Copy for WingModel
impl StructuralPartialEq for WingModel
Auto Trait Implementations§
impl Forget for WingModel
impl Freeze for WingModel
impl Move for WingModel
impl RefUnwindSafe for WingModel
impl Send for WingModel
impl Sync for WingModel
impl Unpin for WingModel
impl UnsafeUnpin for WingModel
impl UnwindSafe for WingModel
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.