l1_pos_control: set gndspeed_undershoot to 0 in loiter

This commit is contained in:
Julian Oes 2014-02-24 14:19:57 +01:00
parent ab8ece3961
commit 75c6706278
1 changed files with 1 additions and 1 deletions

View File

@ -695,7 +695,7 @@ void
FixedwingPositionControl::calculate_gndspeed_undershoot(const math::Vector<2> &current_position, const math::Vector<2> &ground_speed, const struct position_setpoint_triplet_s &pos_sp_triplet)
{
if (_global_pos_valid) {
if (_global_pos_valid && !pos_sp_triplet.current.type == SETPOINT_TYPE_LOITER) {
/* rotate ground speed vector with current attitude */
math::Vector<2> yaw_vector(_R_nb(0, 0), _R_nb(1, 0));