RTL altitude with Soar enabled and Terrain following

A quick post to cross-check my understanding of the RTL behaviour w.r.t altitude and throttle.

I had an interesting situation where in RTL the plane/glider descended from 100 meters to 20m (baro altimeter, in relation to home) and did not add throttle automatically (RTL return altitude = 100m).

I suspect that Terrain following enabled and the fact that terrain dropped by over 100 meters has something to do with this?

The sequence after RTL:

  1. Climbed to RTL_CLIMB_MIN to 20 meters above the cruise altitude (+ turn around after climb due to bank limit of 5 degrees)

  2. Accelerated/dived to ARSPD_FBW_MAX of 22m/s

    • Terrain was significantly lower at this point - at least 100m
    • Desired Pitch -18 degrees (Controller throttle at 0, elevator neutral)
  3. Descended to 20m (above Home position, or ~70m AGL)

    • Controller throttle still at 0, wouldn’t RTL override that?
  4. Based on the log, I moved the controller throttle up & batt. current increased + plane started climbing.

Soon after I took over in FBWA, climbed a little (~5 sec), and switched back to RTL. This time my throttle stick was at 2/3 position, the terrain was back to normal and everything worked as expected.

Question:

  • I thought that in RTL the plane would climb to 100m above home without any throttle input from the controller, is that correct?
  • What is the best explanation of the nose dive to FBW_MAX speed? Is this related to Terrain Following, TECS_SPDWEIGHT or anything else?

Soaring_Enable = 1; Tecs_Spdweight = 1, Terrain following enabled for RTL/Auto/Loiter/Circling/FBWB with relevant data on the SD card. I’ll have to read up on the resolution of the terrain data from ArduPilot Terrain Generator

Terrain data & GPS altitude during RTL:

The big picture from UAVlogviewer :wink:

The UAVlogviewer shows a slightly misaligned input for Throttle and altitude (?), below is the Mission Planner data that shows altitude increasing as soon as I manually added throttle at 20 meters.

A link to the logfile would be helpful