ActuatorEffectivenessHelicopter: explicitly handle unsaturated case

This became necessary otherwise
the allocation reports saturation all
the time and the rate integrator doesn't work.
This commit is contained in:
Matthias Grob 2023-09-27 17:18:09 +02:00 committed by Daniel Agar
parent 43ba199c37
commit 968089bae4
1 changed files with 12 additions and 0 deletions

View File

@ -229,6 +229,9 @@ void ActuatorEffectivenessHelicopter::getUnallocatedControl(int matrix_index, co
} else if (_saturation_flags.roll_neg) {
status.unallocated_torque[0] = -1.f;
} else {
status.unallocated_torque[0] = 0.f;
}
if (_saturation_flags.pitch_pos) {
@ -236,6 +239,9 @@ void ActuatorEffectivenessHelicopter::getUnallocatedControl(int matrix_index, co
} else if (_saturation_flags.pitch_neg) {
status.unallocated_torque[1] = -1.f;
} else {
status.unallocated_torque[1] = 0.f;
}
if (_saturation_flags.yaw_pos) {
@ -243,6 +249,9 @@ void ActuatorEffectivenessHelicopter::getUnallocatedControl(int matrix_index, co
} else if (_saturation_flags.yaw_neg) {
status.unallocated_torque[2] = -1.f;
} else {
status.unallocated_torque[2] = 0.f;
}
if (_saturation_flags.thrust_pos) {
@ -250,5 +259,8 @@ void ActuatorEffectivenessHelicopter::getUnallocatedControl(int matrix_index, co
} else if (_saturation_flags.thrust_neg) {
status.unallocated_thrust[2] = -1.f;
} else {
status.unallocated_thrust[2] = 0.f;
}
}