mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-26 11:53:34 +08:00
math: support max of three values additional to min and use it everywhere
This commit is contained in:
@@ -1059,7 +1059,7 @@ FixedwingPositionControl::control_auto_position(const hrt_abstime &now, const Ve
|
||||
|
||||
// Save distance to waypoint if it is the smallest ever achieved, however make sure that
|
||||
// _min_current_sp_distance_xy is never larger than the distance between the current and the previous wp
|
||||
_min_current_sp_distance_xy = math::min(math::min(d_curr, _min_current_sp_distance_xy), d_curr_prev);
|
||||
_min_current_sp_distance_xy = math::min(d_curr, _min_current_sp_distance_xy, d_curr_prev);
|
||||
|
||||
// if the minimal distance is smaller than the acceptance radius, we should be at waypoint alt
|
||||
// navigator will soon switch to the next waypoint item (if there is one) as soon as we reach this altitude
|
||||
|
||||
Reference in New Issue
Block a user