V1.16.0 VTOL Back Transition

I was looking at the source code of v.16.0 and I see that there is a computeBackTransitionPitchSetpoint() written in flight_mode_manage. Now this function gives pitch_setpoint, however, later this pitch_setpoint is written as:

_acceleration_setpoint.xy() = tanf(pitch_setpoint) * CONSTANTS_ONE_G * horizontal_acceleration_direction;

If I see it correctly, acceleration_setpoint is computed from pitch_setpoint. Can anyone please highlight why this was done?

I also see that this acceleration setpoint is later into trajectory_setpoint which is recieved by Multicopter. I just wanted to know why this route is taken.

Thanks!

It’s done that way because MC controllers don’t use pitch directly — they take accel setpoints. The pitch_setpoint is just converted to the horizontal acceleration you want (tilt = accel/g), then fed into the trajectory setpoint so the normal MC control loop can handle it.

What if I just set ramp time during back transition to zero meaning the FW actuators are shut down as soon as I trigger back transition and multicopter takeover to correct for pitch.

Wouldn’t that mean the same thing?

earlier in v1.15.4, it was just pitch_setpoint that was tracked. There was no acceleration control involved there. It was just updatebacktransitionpitchsetpoint() and it would just publish pitch_setpoints which was tracked by MR actuators.

So correct me if I am wrong, the attitude controller (of MR) would take these acceleration setpoints and generate pitch setpoints and thereafter rate controller to torque?
if this is the case in v.1.16.0, then how was it done in v1.15.4 or versions below?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.