forked from Archive/PX4-Autopilot
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) {
|
} else if (_saturation_flags.roll_neg) {
|
||||||
status.unallocated_torque[0] = -1.f;
|
status.unallocated_torque[0] = -1.f;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
status.unallocated_torque[0] = 0.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_saturation_flags.pitch_pos) {
|
if (_saturation_flags.pitch_pos) {
|
||||||
|
@ -236,6 +239,9 @@ void ActuatorEffectivenessHelicopter::getUnallocatedControl(int matrix_index, co
|
||||||
|
|
||||||
} else if (_saturation_flags.pitch_neg) {
|
} else if (_saturation_flags.pitch_neg) {
|
||||||
status.unallocated_torque[1] = -1.f;
|
status.unallocated_torque[1] = -1.f;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
status.unallocated_torque[1] = 0.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_saturation_flags.yaw_pos) {
|
if (_saturation_flags.yaw_pos) {
|
||||||
|
@ -243,6 +249,9 @@ void ActuatorEffectivenessHelicopter::getUnallocatedControl(int matrix_index, co
|
||||||
|
|
||||||
} else if (_saturation_flags.yaw_neg) {
|
} else if (_saturation_flags.yaw_neg) {
|
||||||
status.unallocated_torque[2] = -1.f;
|
status.unallocated_torque[2] = -1.f;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
status.unallocated_torque[2] = 0.f;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_saturation_flags.thrust_pos) {
|
if (_saturation_flags.thrust_pos) {
|
||||||
|
@ -250,5 +259,8 @@ void ActuatorEffectivenessHelicopter::getUnallocatedControl(int matrix_index, co
|
||||||
|
|
||||||
} else if (_saturation_flags.thrust_neg) {
|
} else if (_saturation_flags.thrust_neg) {
|
||||||
status.unallocated_thrust[2] = -1.f;
|
status.unallocated_thrust[2] = -1.f;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
status.unallocated_thrust[2] = 0.f;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue