Fixed-wing autoland: Adapt according to @dagar's and @antiheavy's comments.

This commit is contained in:
Philipp Oettershagen
2018-08-24 10:13:07 -04:00
committed by Daniel Agar
parent 08ceddaddb
commit 20c02ae093
4 changed files with 32 additions and 17 deletions
@@ -847,7 +847,7 @@ FixedwingPositionControl::control_position(const Vector2f &curr_pos, const Vecto
float alt_sp = pos_sp_curr.alt;
if (pos_sp_next.type == position_setpoint_s::SETPOINT_TYPE_LAND && pos_sp_next.valid) {
if (pos_sp_next.type == position_setpoint_s::SETPOINT_TYPE_LAND && pos_sp_next.valid && _l1_control.circle_mode()) {
// We're in a loiter directly before a landing WP. Enable our landing configuration (flaps,
// landing airspeed and potentially tighter throttle control) already such that we don't
// have to do this switch (which can cause significant altitude errors) close to the ground.