aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/modules/fw_pos_control_l1/fw_pos_control_l1_main.cpp5
1 files changed, 2 insertions, 3 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 9060eac90..1a263b741 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
@@ -766,7 +766,7 @@ FixedwingPositionControl::control_position(const math::Vector2f &current_positio
// target_bearing = get_bearing_to_next_waypoint(prev_wp.getX(), prev_wp.getY(), next_wp.getX(), next_wp.getY());
// } else {
- if (!land_noreturn)
+ if (!land_noreturn) //set target_bearing in first occurrence
target_bearing = _att.yaw;
//}
@@ -774,8 +774,7 @@ FixedwingPositionControl::control_position(const math::Vector2f &current_positio
_l1_control.navigate_heading(target_bearing, _att.yaw, ground_speed);
- if (altitude_error > -5.0f)
- land_noreturn = true;
+ land_noreturn = true;
} else {