Servers by jDrones

Copter does not follow terrain in RTL despite TERRAIN_FOLLOW set to 1


I noticed that my quad does not follow terrain in RTL despite TERRAIN_FOLLOW is set to 1. I noticed this behavior since I set TERRAIN_ENABLE to 0, because I have a rangefinder vertically mounted and don’t need any stored terrain data from the sd card. terrain following in AUTO MISSION works perfect. Before that, TERRAIN_ENABLE was set to 1, my quad follows terrain in RTL. I noticed that in 4.0.7, but it’s probably still present in 4.1. Maybe one of your experts can do a quick check in the code?

Full Parameter File:
Quad.param (18.4 KB)

Thanks a lot


Hi @buckker,

In Copter-4.1 we’ve renamed TERRAIN_FOLLOW to RTL_ALT_TYPE. So if you set this parameter to 1 it should perform the terrain following during RTL. Maybe give it a try and report back? I think it should work.

1 Like

@rmackay9 I’ve tested it today and it looks perfect. Also the strange climbing or descending at the last waypoint before RTL is gone. The new s-curve navigation makes the hole auto fly behavior more smooth and more “predictable”. Big thanks to everyone who invest time in this improvement.




Great! We’ve been testing terrain following in Guided mode a lot over the past week and we have actually found an issue in Auto (and RTL) modes which is that if the terrain is very steep the vehicle may not climb fast enough to avoid hitting the ground. We have a fix coming (probably in -beta6) that will ensure the vehicle slows down its forward speed in order to climb quickly enough.

TBH, this is a fairly serious issue but it will be safe as long as the terrain is no steeper than the slope implied by WPNAV_SPEED_UP vs WPNAV_SPEED.

Servers by jDrones