SmartRTL rises to 2m after reaching Home before landing

Hello,
I am facing a problem where the drone returns at its current altitude back to home but rises to 2m altitude before landing straight down. I’m sure this a configuration issue and was also the same in 4.6.3 when I first tried RTL. I have attached my parameter file:
drone.param (16.6 KB)

Hi @StrikeEagle,

Yes, SmartRTL first waypoint is always 2m above home. The reason we did this is that it was designed for outdoor use and we were worried about altitude drift leading to the vehicle crashing into the ground.

It’s one of these two lines (or perhaps both) that causes this behaviour:

I agree it is a bit arbitrary so we could consider removing it. Alternatively it could be changed so that we are sure it is at least always 2m above home. I think that was the original intention. always climbing 2m doesn’t seem correct to me

2 Likes

It’s actually good that you’re seeing that behaviour, which makes it safe to use SmartRTL.
In my previous tests I’d found that if you take off and immediately start moving away laterally (and vertically), then SmartRTL also returns in the same manner causing a very dangerous landing style potentially leading to a tip-over.
The code Randy points to has not changed (the 2.0m altitude addition for landing) but a few other seemingly unrelated things have changed in SmartRTL (and many other modules) due to Leonards pull requests for conversion to SI units. Maybe this has had an effect that means that landing behaviour now works as planned.

I’ll have to test.

1 Like

Ah, I set some parameters to make return at current altitude of below some threshold altitude. So for me it reaches home, then find to 2m, then leave straight down.

OK, I am not sure about the cause of what I was seeing in previous tests, except to say it was the same copter with these slightly related parameters set:

SRTL_ACCURACY,3
PILOT_TKOFF_ALT,200
WP_NAVALT_MIN,2.0

but the copter was coming in on a shallow slope (the same as takeoff) and attempting to touch down from almost zero altitude, and sometimes while continuing to move slightly. I might look for the old logs and see what I can find there (later).

Testing just now with AC4.6.3 seems to show the desired behaviour where SRTL lands vertically from approximately 2m altitude. I did not see SRTL add 2m to the landing height, but it did definitely do a vertical landing and seemed like it would prefer to be at least 2m altitude.
In logs it looks like the position was still changing during descent (from about 4.5m) down to about 2m, where the lateral movement stopped and there was only vertical descent.

I’ve been using these adjusted params for a while now to give a much better takeoff:

PILOT_TKOFF_ALT,250
WP_NAVALT_MIN,1.5

and maybe this helps SRTL somewhat. The original values I had could actually be confusing the issue and I advise the values should have some separation.

To summarise, it looks unrelated to the conversion to SI units and ver 4.7, and SRTL operates as planned (except I did not see 2m added to altitude). I’m yet to test in 4.7 but I dont expect any change - confirmation to follow.

For those checking the code, in NED coordinates Z axis is more positive for down, so next_dest_NED.z -= 2.0f; taking 2m off the Z axis is raising altitude.

Does SRTL really depend on TKOFF_ALT?

Not that I’m aware of, but the SRTL_ACCURACY might be contributing. I was just putting in all the related items I could think of. I’m almost ready to test 4.7

1 Like

Testing SRTL with 4.7 beta2
I still could not see a decisive rise in altitude of +2m when doing the SRTL for the last point or landing.
It’s possible there is and I just cant see it. For example in the log the take off was from 1m and the point above landing where lateral movement ceased was 3m - so the landing point did have 2m altitude. However I wasnt able to tell there was an increase, probably due to takeoff being from 1m to about 3.5m or so.
Also we dont come in for landing lower than 2m because we’ve got some grass and a fence to clear. The test could probably have been better :slight_smile:

Summary: behaviour seems to be the same as pre 4.7 and it looks like there is a 2m safety margin for landing from SRTL.
Anyone who is worried about the landing altitude or behaviour should take control (switch to Loiter) before SRTL completes.

1 Like

Retested, taking care to have a low path from the launch point for SRTL to return on - YES we did see a rise to approximately 2m right over the landing point ! :+1:

We had to try to make this happen, so if you’ve got a reasonable pilot takeoff altitude set, or you just naturally take off to get out of baro/ground effect, then you’ll likely not see this and SRTL will just do a conventional looking landing.

Yeah the thing is I am flying indoors and that last rise in altitude looks weird. Will probably do a switch to land immediately after reaching the home point

Yeah small quads and indoor flight is most likely to encounter this.

I set final_alt_m to 1m and now it doesn’t rise to 2m. My flight profile is such that it is under 2m at all times. Seems like this is only an issue when I set final_alt to 0. Haven’t tested this with a value greater than 1.5m, the altitude my copter will by generally flying at.

1 Like