Allocation: add SteeringWheel type control surface

Directly use yaw controls for it, and don't add it to the allocation matrix,
as that would have an effect on rudder scaling if the wheel also would have
a yaw effectiveness.

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Silvan Fuhrer
2022-08-08 13:28:17 +02:00
committed by Beat Küng
parent 9e18b351bc
commit ffb8fb4383
6 changed files with 32 additions and 11 deletions
@@ -71,9 +71,11 @@ void ActuatorEffectivenessStandardVTOL::updateSetpoint(const matrix::Vector<floa
actuator_controls_s actuator_controls_1;
if (_actuator_controls_1_sub.copy(&actuator_controls_1)) {
float control_flaps = actuator_controls_1.control[actuator_controls_s::INDEX_FLAPS];
float airbrakes_control = actuator_controls_1.control[actuator_controls_s::INDEX_AIRBRAKES];
_control_surfaces.applyFlapsAndAirbrakes(control_flaps, airbrakes_control, _first_control_surface_idx, actuator_sp);
const float flaps_control = actuator_controls_1.control[actuator_controls_s::INDEX_FLAPS];
const float airbrakes_control = actuator_controls_1.control[actuator_controls_s::INDEX_AIRBRAKES];
const float steering_wheel_control = actuator_controls_1.control[actuator_controls_s::INDEX_YAW];
_control_surfaces.applyFlapsAirbrakesWheel(flaps_control, airbrakes_control, steering_wheel_control,
_first_control_surface_idx, actuator_sp);
}
}
}