mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 13:58:53 +08:00
Navigator: mission_block: reduce enforce eexit course margin to 105% (#22511)
With this margin it is made sure that if the loiter is not perfectly tracked, (vehicle outside of path setpoint) a wp just at the border of the loiter is still reachable. It should though be as small as necessary, as otherwise, with good loiter tracking, waypoints that are close but not right on the loiter radius are not enforcing the exit course neither. Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
@@ -465,8 +465,8 @@ MissionBlock::is_mission_item_reached_or_completed()
|
||||
&& curr_sp_new->type == position_setpoint_s::SETPOINT_TYPE_LOITER
|
||||
&& (_mission_item.force_heading || _mission_item.nav_cmd == NAV_CMD_WAYPOINT);
|
||||
|
||||
// can only enforce exit course if next waypoint is not within loiter radius of current waypoint
|
||||
const bool exit_course_is_reachable = dist_current_next > 1.2f * curr_sp_new->loiter_radius;
|
||||
// can only enforce exit course if next waypoint is not within loiter radius of current waypoint (with small margin)
|
||||
const bool exit_course_is_reachable = dist_current_next > 1.05f * curr_sp_new->loiter_radius;
|
||||
|
||||
if (enforce_exit_course && exit_course_is_reachable) {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user