pub struct PlaneStabilizerConfig {
pub rate: PlaneRateControllerConfig,
pub time_constant_s: Vec2,
pub max_attitude_rate_radps: Vec2,
pub max_body_rate_radps: Vec3,
pub max_bank_rad: f32,
pub max_pitch_rad: f32,
pub trim_airspeed_mps: f32,
pub min_airspeed_mps: f32,
pub max_airspeed_mps: f32,
pub thrust_curve_exponent: f32,
}Expand description
PlaneStabilizer settings.
Fields§
§rate: PlaneRateControllerConfigThe rate loop’s gains and integral limit.
time_constant_s: Vec2How fast the attitude loops close their error, roll (x) and pitch (y), in s: the
rate target is the error divided by it.
max_attitude_rate_radps: Vec2Largest roll (x) and pitch (y) rate the attitude loops ask for, in rad/s.
max_body_rate_radps: Vec3Largest body rate an absolute-rate setpoint gets, per axis, in rad/s.
max_bank_rad: f32Largest bank an attitude setpoint gets, in radians.
max_pitch_rad: f32Largest pitch, up or down, an attitude setpoint gets, in radians; a
transition ramp’s isn’t held to it.
trim_airspeed_mps: f32The airspeed the gains are tuned at (scale 1), in m/s; assumed without an airspeed.
min_airspeed_mps: f32Below this airspeed the scale stops growing and the rate integrals hold, in m/s.
max_airspeed_mps: f32Above this airspeed the scale stops shrinking, in m/s.
thrust_curve_exponent: f32Linear throttle → motor command exponent (1 passes throttle through). A tailsitter uses its hover stabilizer’s, so a handoff keeps motor commands continuous.
Implementations§
Source§impl PlaneStabilizerConfig
impl PlaneStabilizerConfig
Sourcepub fn validate(&self) -> Result<(), InvalidConfig>
pub fn validate(&self) -> Result<(), InvalidConfig>
Ok when every field is in range: positive time constants, non-negative rate limits,
bank and pitch limits in [0, π], positive airspeeds, and a positive thrust exponent.
Each is checked on its own; the scale clamps the airspeed to [min, max] with a max
below min read as min, so out-of-order airspeeds degrade, not fail.
§Errors
InvalidConfig naming the first field out of range.
Trait Implementations§
Source§impl Clone for PlaneStabilizerConfig
impl Clone for PlaneStabilizerConfig
impl Copy for PlaneStabilizerConfig
Source§impl Debug for PlaneStabilizerConfig
impl Debug for PlaneStabilizerConfig
Source§impl Default for PlaneStabilizerConfig
impl Default for PlaneStabilizerConfig
Source§fn default() -> Self
fn default() -> Self
PX4’s fixed-wing defaults (time constants 0.4 s, attitude rate limits 70°/s roll and
60°/s pitch, fw_att_control_params.yaml), acro up to 180°/s roll and pitch and 60°/s
yaw, 50° bank and 30° pitch, airspeeds 10/15/25 m/s, and throttle passed through.
Placeholders until an airframe is tuned.
Source§impl ParamTable for PlaneStabilizerConfig
impl ParamTable for PlaneStabilizerConfig
Source§impl PartialEq for PlaneStabilizerConfig
impl PartialEq for PlaneStabilizerConfig
Source§impl SideConfig<PlaneSide> for PlaneStabilizerConfig
impl SideConfig<PlaneSide> for PlaneStabilizerConfig
Source§fn side(&self) -> &PlaneStabilizerConfig
fn side(&self) -> &PlaneStabilizerConfig
Source§fn side_mut(&mut self) -> &mut PlaneStabilizerConfig
fn side_mut(&mut self) -> &mut PlaneStabilizerConfig
impl StructuralPartialEq for PlaneStabilizerConfig
Auto Trait Implementations§
impl Forget for PlaneStabilizerConfig
impl Freeze for PlaneStabilizerConfig
impl Move for PlaneStabilizerConfig
impl RefUnwindSafe for PlaneStabilizerConfig
impl Send for PlaneStabilizerConfig
impl Sync for PlaneStabilizerConfig
impl Unpin for PlaneStabilizerConfig
impl UnsafeUnpin for PlaneStabilizerConfig
impl UnwindSafe for PlaneStabilizerConfig
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.