diff --git a/src/modules/fw_att_control/FixedwingAttitudeControl.cpp b/src/modules/fw_att_control/FixedwingAttitudeControl.cpp index 50ac73deca..e19e3f2adb 100644 --- a/src/modules/fw_att_control/FixedwingAttitudeControl.cpp +++ b/src/modules/fw_att_control/FixedwingAttitudeControl.cpp @@ -155,7 +155,7 @@ FixedwingAttitudeControl::vehicle_manual_poll() _att_sp.pitch_body = constrain(_att_sp.pitch_body, -radians(_param_fw_man_p_max.get()), radians(_param_fw_man_p_max.get())); - _att_sp.yaw_body = 0.0f; + _att_sp.yaw_body = NAN; _att_sp.thrust_body[0] = math::constrain(_manual_control_setpoint.z, 0.0f, 1.0f); Quatf q(Eulerf(_att_sp.roll_body, _att_sp.pitch_body, _att_sp.yaw_body)); diff --git a/src/modules/fw_pos_control_l1/FixedwingPositionControl.cpp b/src/modules/fw_pos_control_l1/FixedwingPositionControl.cpp index d2e6835e47..d540e89215 100644 --- a/src/modules/fw_pos_control_l1/FixedwingPositionControl.cpp +++ b/src/modules/fw_pos_control_l1/FixedwingPositionControl.cpp @@ -693,7 +693,7 @@ FixedwingPositionControl::set_control_mode_current(bool pos_sp_curr_valid) /* reset setpoints from other modes (auto) otherwise we won't * level out without new manual input */ _att_sp.roll_body = _manual_control_setpoint.y * radians(_param_fw_man_r_max.get()); - _att_sp.yaw_body = 0; + _att_sp.yaw_body = NAN; } _control_mode_current = FW_POSCTRL_MODE_POSITION; @@ -1678,7 +1678,7 @@ FixedwingPositionControl::control_altitude(const hrt_abstime &now, const Vector2 _manual_height_rate_setpoint_m_s); _att_sp.roll_body = _manual_control_setpoint.y * radians(_param_fw_man_r_max.get()); - _att_sp.yaw_body = 0; + _att_sp.yaw_body = NAN; /* Copy thrust and pitch values from tecs */ if (_landed) { @@ -1797,7 +1797,7 @@ FixedwingPositionControl::control_position(const hrt_abstime &now, const Vector2 } _att_sp.roll_body = roll_sp_new; - _att_sp.yaw_body = 0; + _att_sp.yaw_body = NAN; } /* Copy thrust and pitch values from tecs */