mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-31 10:26:52 +08:00
Hotfix: Ensure that a minimum of 10 degrees pitch is set on takeoff
This commit is contained in:
@@ -734,9 +734,10 @@ FixedwingPositionControl::control_position(const math::Vector2f ¤t_positio
|
|||||||
/* apply minimum pitch and limit roll if target altitude is not within 10 meters */
|
/* apply minimum pitch and limit roll if target altitude is not within 10 meters */
|
||||||
if (altitude_error > 10.0f) {
|
if (altitude_error > 10.0f) {
|
||||||
|
|
||||||
|
/* enforce a minimum of 10 degrees pitch up on takeoff, or take parameter */
|
||||||
_tecs.update_pitch_throttle(_R_nb, _att.pitch, _global_pos.alt, _global_triplet.current.altitude, calculate_target_airspeed(_parameters.airspeed_min),
|
_tecs.update_pitch_throttle(_R_nb, _att.pitch, _global_pos.alt, _global_triplet.current.altitude, calculate_target_airspeed(_parameters.airspeed_min),
|
||||||
_airspeed.indicated_airspeed_m_s, eas2tas,
|
_airspeed.indicated_airspeed_m_s, eas2tas,
|
||||||
true, math::radians(global_triplet.current.param1),
|
true, math::max(math::radians(global_triplet.current.param1), math::radians(10.0f)),
|
||||||
_parameters.throttle_min, _parameters.throttle_max, _parameters.throttle_cruise,
|
_parameters.throttle_min, _parameters.throttle_max, _parameters.throttle_cruise,
|
||||||
math::radians(_parameters.pitch_limit_min), math::radians(_parameters.pitch_limit_max));
|
math::radians(_parameters.pitch_limit_min), math::radians(_parameters.pitch_limit_max));
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user