aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJulian Oes <julian@oes.ch>2014-02-24 14:19:57 +0100
committerJulian Oes <julian@oes.ch>2014-02-24 14:19:57 +0100
commit75c6706278119e50ce56ecbb1620025a9b9b936d (patch)
treebe83993fddce20caeaf67314a5afc14470a3800a /src
parentab8ece3961f50348cf4bf464cb7d953b182a0a44 (diff)
downloadpx4-firmware-75c6706278119e50ce56ecbb1620025a9b9b936d.tar.gz
px4-firmware-75c6706278119e50ce56ecbb1620025a9b9b936d.tar.bz2
px4-firmware-75c6706278119e50ce56ecbb1620025a9b9b936d.zip
l1_pos_control: set gndspeed_undershoot to 0 in loiter
Diffstat (limited to 'src')
-rw-r--r--src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp b/src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp
index ed57e0d34..2e8d038d0 100644
--- a/src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp
+++ b/src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp
@@ -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));