mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
l1: change a max to min in wp switch-distance calculation
This commit is contained in:
parent
74a7d9693d
commit
fefaab91cf
@ -70,7 +70,7 @@ float ECL_L1_Pos_Controller::target_bearing()
|
||||
float ECL_L1_Pos_Controller::switch_distance(float wp_radius)
|
||||
{
|
||||
/* following [2], switching on L1 distance */
|
||||
return math::max(wp_radius, _L1_distance);
|
||||
return math::min(wp_radius, _L1_distance);
|
||||
}
|
||||
|
||||
bool ECL_L1_Pos_Controller::reached_loiter_target(void)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user