From 0fc35ef082155ed0df1ba445559bec94040b215f Mon Sep 17 00:00:00 2001 From: Thomas Stastny Date: Fri, 28 Oct 2022 23:23:06 +0200 Subject: [PATCH] fixed-wing landing abort: disable early landing config during a landing abort previously, the next position setpoint in the triplet was left unchanged during an abort, which meant that the abort loiter current point combined with land next point triggered the early landing config logic. this commit is only a hack to make things work temporarily.. this needs to be handled better. --- src/modules/navigator/mission.cpp | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/modules/navigator/mission.cpp b/src/modules/navigator/mission.cpp index e29198c00a..5e79bc205e 100644 --- a/src/modules/navigator/mission.cpp +++ b/src/modules/navigator/mission.cpp @@ -1460,6 +1460,14 @@ Mission::do_abort_landing() mission_apply_limitation(_mission_item); mission_item_to_position_setpoint(_mission_item, &_navigator->get_position_setpoint_triplet()->current); + + // XXX: this is a hack to invalidate the "next" position setpoint for the fixed-wing position controller during + // the landing abort hold. otherwise, the "next" setpoint would still register as a "LAND" point, and trigger + // the early landing configuration (flaps and landing airspeed) during the hold. + _navigator->get_position_setpoint_triplet()->next.lat = NAN; + _navigator->get_position_setpoint_triplet()->next.lon = NAN; + _navigator->get_position_setpoint_triplet()->next.alt = NAN; + publish_navigator_mission_item(); // for logging _navigator->set_position_setpoint_triplet_updated();