mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-02 05:04:08 +08:00
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:
parent
43ba199c37
commit
968089bae4
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user