Skip to content

Commit 04ef2a8

Browse files
Added dual tilt rate functionality for down transitions
1 parent a518136 commit 04ef2a8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

ArduPlane/tiltrotor.cpp

+10
Original file line numberDiff line numberDiff line change
@@ -168,6 +168,9 @@ float Tiltrotor::tilt_max_change(bool up, bool in_flap_range) const
168168
float rate;
169169
if (up || max_rate_down_dps <= 0) {
170170
rate = max_rate_up_dps;
171+
} else if (transition->transition_state == Tiltrotor_Transition::TRANSITION_TIMER) {
172+
// Use the final tilt rate for the second part of transition
173+
rate = max_rate_down_final_dps > 0 ? max_rate_down_final_dps : max_rate_down_dps;
171174
} else {
172175
rate = max_rate_down_dps;
173176
}
@@ -287,6 +290,13 @@ void Tiltrotor::continuous_update(void)
287290
288291
5) if we are in TRANSITION_TIMER mode then we are transitioning
289292
to forward flight and should put the rotors all the way forward
293+
294+
6) The transition tilt rate is managed using two possible rates:
295+
Q_TILT_RATE_DN for the initial phase of the transition, and
296+
Q_TILT_RAT_DN_FN for the final phase. This allows for a slower
297+
initial rotation followed by a faster final tilt once sufficient
298+
airspeed has been gained. When Q_TILT_RAT_DN_FN is zero, the
299+
Q_TILT_RATE_DN value is used for the entire transition.
290300
*/
291301

292302
#if QAUTOTUNE_ENABLED

0 commit comments

Comments
 (0)