diff options
author | Thomas Gubler <thomasgubler@student.ethz.ch> | 2013-10-31 17:53:03 +0100 |
---|---|---|
committer | Thomas Gubler <thomasgubler@student.ethz.ch> | 2013-10-31 17:53:03 +0100 |
commit | 18c5d901889e33167f0967f612fb7e57b3b4a018 (patch) | |
tree | ef332a0929fbc2fc6ef694ecdf4cc2da540d9133 /src/modules/fw_pos_control_l1 | |
parent | 1214cbe71f57e980e26d520dda693c089265e1e3 (diff) | |
download | px4-firmware-18c5d901889e33167f0967f612fb7e57b3b4a018.tar.gz px4-firmware-18c5d901889e33167f0967f612fb7e57b3b4a018.tar.bz2 px4-firmware-18c5d901889e33167f0967f612fb7e57b3b4a018.zip |
change logic to avoid overshoot over landing spot
Diffstat (limited to 'src/modules/fw_pos_control_l1')
-rw-r--r-- | src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp b/src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp index 000fa5fa3..be6cc0e8c 100644 --- a/src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp +++ b/src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp @@ -799,10 +799,9 @@ FixedwingPositionControl::control_position(const math::Vector2f ¤t_positio /* limit roll motion to prevent wings from touching the ground first */ _att_sp.roll_body = math::constrain(_att_sp.roll_body, math::radians(-10.0f), math::radians(10.0f)); - } else if (wp_distance < 60.0f && altitude_error > -20.0f) { + } else if (wp_distance < 60.0f || altitude_error > -20.0f) { /* minimize speed to approach speed, stay on glide slope */ - _tecs.update_pitch_throttle(_R_nb, _att.pitch, _global_pos.alt, landing_slope_alt_desired, calculate_target_airspeed(airspeed_approach), _airspeed.indicated_airspeed_m_s, eas2tas, false, flare_angle_rad, |