From 7afa21ebb799698a4555196af70cb5a334570a67 Mon Sep 17 00:00:00 2001 From: sander Date: Sun, 14 Aug 2016 16:33:20 +0200 Subject: [PATCH] Revert altitude acceptance radius to combat overshoot --- src/modules/navigator/mission_block.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/modules/navigator/mission_block.cpp b/src/modules/navigator/mission_block.cpp index bb81641c1b..1fcb0f4098 100644 --- a/src/modules/navigator/mission_block.cpp +++ b/src/modules/navigator/mission_block.cpp @@ -166,7 +166,8 @@ MissionBlock::is_mission_item_reached() if ((_mission_item.nav_cmd == NAV_CMD_TAKEOFF || _mission_item.nav_cmd == NAV_CMD_VTOL_TAKEOFF) && _navigator->get_vstatus()->is_rotary_wing) { /* require only altitude for takeoff for multicopter, do not use waypoint acceptance radius */ - if (_navigator->get_global_position()->alt >= altitude_amsl) { + if (_navigator->get_global_position()->alt > + altitude_amsl - _navigator->get_acceptance_radius()) { _waypoint_position_reached = true; } } else if (_mission_item.nav_cmd == NAV_CMD_TAKEOFF) {