l1: change a max to min in wp switch-distance calculation

This commit is contained in:
Thomas Gubler 2013-11-17 13:41:14 +01:00
parent 74a7d9693d
commit fefaab91cf
1 changed files with 1 additions and 1 deletions

View File

@ -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)