fw autoland: move constrain of roll to horizontal landing navigation

This commit is contained in:
Thomas Gubler 2013-11-24 08:32:53 +01:00
parent 6b53c7e841
commit 94745fa0af
1 changed files with 3 additions and 2 deletions

View File

@ -821,6 +821,9 @@ FixedwingPositionControl::control_position(const math::Vector2f &current_positio
_l1_control.navigate_heading(target_bearing, _att.yaw, ground_speed); _l1_control.navigate_heading(target_bearing, _att.yaw, ground_speed);
/* limit roll motion to prevent wings from touching the ground first */
_att_sp.roll_body = math::constrain(_att_sp.roll_body, math::radians(-10.0f), math::radians(10.0f));
land_noreturn_horizontal = true; land_noreturn_horizontal = true;
} else { } else {
@ -896,8 +899,6 @@ FixedwingPositionControl::control_position(const math::Vector2f &current_positio
0.0f, throttle_max, throttle_land, 0.0f, throttle_max, throttle_land,
flare_angle_rad, math::radians(15.0f)); flare_angle_rad, math::radians(15.0f));
/* limit roll motion to prevent wings from touching the ground first */
_att_sp.roll_body = math::constrain(_att_sp.roll_body, math::radians(-10.0f), math::radians(10.0f));
if (!land_noreturn_vertical) { if (!land_noreturn_vertical) {
mavlink_log_info(mavlink_fd, "[POSCTRL] Landing, flare"); mavlink_log_info(mavlink_fd, "[POSCTRL] Landing, flare");
land_noreturn_vertical = true; land_noreturn_vertical = true;