Skip to content

Commit

Permalink
HelicopterCoaxial: only publish unallocated thrust in the saturation …
Browse files Browse the repository at this point in the history
…case
  • Loading branch information
MaEtUgR committed Sep 14, 2023
1 parent 64280b4 commit 25beab9
Showing 1 changed file with 12 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -185,26 +185,38 @@ void ActuatorEffectivenessHelicopterCoaxial::getUnallocatedControl(int matrix_in

} else if (_saturation_flags.roll_neg) {
status.unallocated_torque[0] = -1.f;

} else {
status.unallocated_torque[0] = 0.f;
}

if (_saturation_flags.pitch_pos) {
status.unallocated_torque[1] = 1.f;

} else if (_saturation_flags.pitch_neg) {
status.unallocated_torque[1] = -1.f;

} else {
status.unallocated_torque[1] = 0.f;
}

if (_saturation_flags.yaw_pos) {
status.unallocated_torque[2] = 1.f;

} else if (_saturation_flags.yaw_neg) {
status.unallocated_torque[2] = -1.f;

} else {
status.unallocated_torque[2] = 0.f;
}

if (_saturation_flags.thrust_pos) {
status.unallocated_thrust[2] = 1.f;

} else if (_saturation_flags.thrust_neg) {
status.unallocated_thrust[2] = -1.f;

} else {
status.unallocated_torque[2] = 0.f;
}
}

0 comments on commit 25beab9

Please sign in to comment.