mirror of
https://gitee.com/xiaohuolufeihua/bizhang_-obav.git
synced 2026-05-21 09:22:18 +00:00
mission: warn at 2/3 of the max distance
This was wrong, instead of warning at 2/3 of the max distance as mentioned in the comment, we would start to warn at 3/2 of the distance which would then never actually happen.
This commit is contained in:
@@ -497,7 +497,7 @@ MissionFeasibilityChecker::checkDistanceToFirstWaypoint(const mission_s &mission
|
||||
|
||||
if (dist_to_1wp < max_distance) {
|
||||
|
||||
if (dist_to_1wp > ((max_distance * 3) / 2)) {
|
||||
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);
|
||||
@@ -559,7 +559,7 @@ MissionFeasibilityChecker::checkDistancesBetweenWaypoints(const mission_s &missi
|
||||
|
||||
if (dist_between_waypoints < max_distance) {
|
||||
|
||||
if (dist_between_waypoints > ((max_distance * 3) / 2)) {
|
||||
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);
|
||||
|
||||
Reference in New Issue
Block a user