forked from Archive/PX4-Autopilot
fw autoland: move constrain of roll to horizontal landing navigation
This commit is contained in:
parent
6b53c7e841
commit
94745fa0af
|
@ -821,6 +821,9 @@ FixedwingPositionControl::control_position(const math::Vector2f ¤t_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 ¤t_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;
|
||||||
|
|
Loading…
Reference in New Issue