Skip to content

Commit

Permalink
Mission feasibility: remove 2/3rds distance warnings that don't rejec…
Browse files Browse the repository at this point in the history
…t a mission (#9743)
  • Loading branch information
dagar authored Jun 23, 2018
1 parent 1a363be commit aa270fc
Showing 1 changed file with 1 addition and 19 deletions.
20 changes: 1 addition & 19 deletions src/modules/navigator/mission_feasibility_checker.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -497,14 +497,6 @@ MissionFeasibilityChecker::checkDistanceToFirstWaypoint(const mission_s &mission

if (dist_to_1wp < max_distance) {

if (dist_to_1wp > ((max_distance * 2) / 3)) {
/* allow at 2/3 distance, but warn */
mavlink_log_critical(_navigator->get_mavlink_log_pub(),
"First waypoint far away: %d meters.", (int)dist_to_1wp);

_navigator->get_mission_result()->warning = true;
}

return true;

} else {
Expand Down Expand Up @@ -557,17 +549,7 @@ MissionFeasibilityChecker::checkDistancesBetweenWaypoints(const mission_s &missi
mission_item.lat, mission_item.lon,
last_lat, last_lon);

if (dist_between_waypoints < max_distance) {

if (dist_between_waypoints > ((max_distance * 2) / 3)) {
/* allow at 2/3 distance, but warn */
mavlink_log_critical(_navigator->get_mavlink_log_pub(),
"Distance between waypoints very far: %d meters.", (int)dist_between_waypoints);

_navigator->get_mission_result()->warning = true;
}

} else {
if (dist_between_waypoints > max_distance) {
/* item is too far from home */
mavlink_log_critical(_navigator->get_mavlink_log_pub(),
"Distance between waypoints too far: %d meters, %d max.",
Expand Down

0 comments on commit aa270fc

Please sign in to comment.