Clarify Auto Takeoff Logic

Reading the docs is confusing me to exactly what the logic is during an auto takeoff.

The docs suggest that the pitch is held at TKOFF_LVL_PITCH until TKOFF_ALT, but reading the parameter description for TKOFF_LVL_PITCH it states “This is the target pitch for the initial climb to TKOFF_LVL_ALT”

If TKOFF_LVL_ALT and TKOFF_ALT are different does it adhere to TKOFF_LVL_PITCH until TKOFF_LVL_ALT then from that height to TKOFF_ALT adhere to LIM_PITCH_MAX/TECS_PITCH_MAX?

Or are the docs correct and it holds TKOFF_LVL_PITCH all the way to TKOFF_ALT?


TKOFF_LVL_ALT is typically set pretty low, for example 5m. And TKOFF_LVL_PITCH is also lower than your normal climb pitch. The idea is that below TKOFF_LVL_ALT the plane will only make minor roll adjustments for direction (wings level), and to reduce the risk of stall it will climb at a lower angle to build up speed.

After the plane passes through TKOFF_LVL_ALT then it will roll as needed to get to the desired heading and will climb at what ever pitch is needed to max of LIM or TECS_PITCH_MAX to the TKOFF_ALT (I think the default is 50m).

To clarify the roll: The plane will make aggressive corrections to roll to get the wings level below the TKOFF_LVL_ALT if for example you are hand launching and you botch the throw. But it won’t make aggressive corrections on it’s own to the heading until it’s past that altitude.

Thanks for the reply. I know what the parameters do in an automatic takeoff as part of a mission, but in “takeoff mode” the docs suggest that TKOFF_LVL_PITCH is used to TKOFF_ALT. This is what it says:

In ArduPlane 4.0 and later, Automatic Takeoff is also a mode itself. When entered, the plane will use maximum throttle as set by the TKOFF_THR_MAX parameter, climbing with TKOFF_LVL_PITCH maximum to the TKOFF_ALT altitude and proceeding at the initial launch heading until TKOFF_DIST from the point where the mode is entered. It will then loiter, as in LOITER mode, at TKOFF_ALT altitude until the mode is changed.

It might be the wording, or a mistake but I was seeking clarification if this is actually the case (in “takeoff mode”)


I understand now. I think that there’s an error in the docs. Based on how the parameters are described, and what I’ve seen, I think it should say:

climbing with TKOFF_LVL_PITCH maximum to the TKOFF_LVL_ALT altitude ...
1 Like

Okay, and how can we set when the plane after launch and straight flight goes into loiter? I mean I noticed that TKOFF_LVL_ALT seems to be the altitude until which plane will fly straight forward and then it will initiate circling climb to reach TKOFF_ALT and will circle at this altitude.

After some detailed analysis of logs, this is the logic I have observed in auto takeoff mode (hand launch):

  • When all triggering criteria are achieved (TKOFF_THR_MINACC, TKOFF_ACCEL_CNT, TKOFF_THR_DELAY) the yaw bearing of the aircraft at that moment is taken as the target heading to take after TKOFF_LVL_ALT is reached (“climb-out bearing”)
  • The motors will spool up to TKOFF_THR_MAX
  • Launch
  • Aircraft will ascend to TKOFF_LVL_ALT in the direction launched. It will only make stabilisation roll changes
  • It will continue at this attitude until TKOFF_LVL_ALT is reached
    • Aircraft will turn to the “climb-out bearing” described above
    • Throttle will no longer be TKOFF_THR_MAX
    • It will then continue just like any other altitude controlled mode
  • The target then becomes to reach TKOFF_ALT at TKOFF_DIST from home
  • At TKOFF_PLIM_SEC it will start to level off - to try and minimise overshooting TKOFF_ALT
  • Once TKOFF_ALT is reached it will loiter until another mode is commanded

This is all in line with the docs, except the docs suggest that TKOFF_LVL_PITCH is used until TKOFF_ALT - which is not the case

I think my initial confusion was due to three things:

  • Altitude was being overestimated - so TKOFF_LVL_ALT was reached almost immediately
  • My takeoff trigger criteria only used TKOFF_THR_MINACC, so the “climb-out bearing” was being randomly set as I shook the aircraft
    • These two things together resulted in a very low altitude turn in a direction I wasn’t expecting
  • The docs not being 100% clear about TKOFF_LVL_PITCH

My take away and how I now use auto takeoff:

  • Unless you are very confident with the altitude estimate - do not set TKOFF_LVL_ALT too low
  • I added TKOFF_THR_DELAY of 4 seconds, so I can shake the aircraft and then have 4 seconds to point it in the direction I want the “climb-out bearing” to be.


Same here, I use TKOFF_LVL_ALT at around 25 - 30m so I’m sure it will climb this altitude in the throw direction and only then spiral climb up. No chance for the plane to start cirlcling low and thus hitting some trees around.

As for the bearing - what if you don’t use compass? AFAIK it then records the bearing from gps after the throw.