tiltrotor: fill out thrust_setpoint[0] also in hover, based on tilt and hover thrust

In the tiltrotor case, beside an F_z thrust setpoint also a F_x setpoint must be passed
to the allocator as the matrix has non-zero thrust-x effectiveness when tilts are applied.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Silvan Fuhrer
2021-12-20 14:47:01 +01:00
committed by Daniel Agar
parent 2333bef670
commit 460a0df850
@@ -513,6 +513,7 @@ void Tiltrotor::fill_actuator_outputs()
mc_out[actuator_controls_s::INDEX_THROTTLE] = mc_in[actuator_controls_s::INDEX_THROTTLE] * _mc_throttle_weight;
_thrust_setpoint_0->xyz[2] = -mc_in[actuator_controls_s::INDEX_THROTTLE] * _mc_throttle_weight;
_thrust_setpoint_0->xyz[0] = -_thrust_setpoint_0->xyz[2] * sinf(_tilt_control * M_PI_2_F);
}
// Fixed wing output