mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-29 09:33:34 +08:00
l1: change a max to min in wp switch-distance calculation
This commit is contained in:
@@ -70,7 +70,7 @@ float ECL_L1_Pos_Controller::target_bearing()
|
|||||||
float ECL_L1_Pos_Controller::switch_distance(float wp_radius)
|
float ECL_L1_Pos_Controller::switch_distance(float wp_radius)
|
||||||
{
|
{
|
||||||
/* following [2], switching on L1 distance */
|
/* 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)
|
bool ECL_L1_Pos_Controller::reached_loiter_target(void)
|
||||||
|
|||||||
Reference in New Issue
Block a user