Skip to content

Commit b8c541d

Browse files
sfuhrerdagar
authored andcommitted
TiltrotorEffectiveness: limit thrust axis tilt to z effectiveness scaling
During transition to FF, only allow update thrust axis up to 45° as with a high tilt angle the effectiveness of the thrust axis in z is apporaching 0, and by that is increasing the motor output to max. Transition to HF: disable thrust axis tilting, and assume motors are vertical. This is to avoid a thrust spike when the transition is initiated (as then the tilt is fully forward). Signed-off-by: Silvan Fuhrer <[email protected]>
1 parent 2d3238d commit b8c541d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/modules/control_allocator/ActuatorEffectiveness/ActuatorEffectivenessTiltrotorVTOL.cpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,17 @@ void ActuatorEffectivenessTiltrotorVTOL::updateSetpoint(const matrix::Vector<flo
137137
_last_collective_tilt_control = control_collective_tilt;
138138
}
139139

140+
// During transition to FF, only allow update thrust axis up to 45° as with a high tilt angle the effectiveness
141+
// of the thrust axis in z is apporaching 0, and by that is increasing the motor output to max.
142+
// Transition to HF: disable thrust axis tilting, and assume motors are vertical. This is to avoid
143+
// a thrust spike when the transition is initiated (as then the tilt is fully forward).
144+
if (_flight_phase == FlightPhase::TRANSITION_HF_TO_FF) {
145+
_last_collective_tilt_control = math::constrain(_last_collective_tilt_control, -1.f, 0.f);
146+
147+
} else if (_flight_phase == FlightPhase::TRANSITION_FF_TO_HF) {
148+
_last_collective_tilt_control = -1.f;
149+
}
150+
140151
for (int i = 0; i < _tilts.count(); ++i) {
141152
if (_tilts.config(i).tilt_direction == ActuatorEffectivenessTilts::TiltDirection::TowardsFront) {
142153
actuator_sp(i + _first_tilt_idx) += control_collective_tilt;

0 commit comments

Comments
 (0)