← All tools

Message & Error Explainer

What an ArduPilot message means and what to do about it

Українська

RTL could not work out its path

Act nowFailsafes and emergencies in flightCopter only

What ArduPilot says:

Two errors that the code itself calls unexpected. “RTL: unexpected error setting climb target”: the first leg of the return could not be set, which happens when the terrain height it was planned on disappears between planning and starting; the copter switches to Land where it is, and the log has “ERR NAVIGATION-2”. “RTL: unexpected error calculating target alt”: the height of home or of the rally point could not be converted, so RTL uses a target height of zero above home and then raises it to the normal return height.

What to do, most likely first

  1. Terrain data or the rangefinder reading came and went at the moment RTL started.

    CheckLook for terrain or rangefinder messages in the seconds before it.

    FixMake the terrain source dependable (see “Failsafe: Terrain data missing”), or return at a height above home: RTL_ALT_TYPE 0.

  2. A rally point was saved with a height the copter cannot convert (a terrain height without terrain data).

    CheckRead the rally points back in the ground station and look at their altitude frame.

    FixSave the rally points again with heights relative to home.

Parameters to look at

ParameterWhat it is
RTL_ALT_TYPERTL mode altitude type
RTL_ALTRTL Altitude
TERRAIN_ENABLETerrain data enable
The code that sends it

RTL: unexpected error setting climb target

ArduCopter/mode_rtl.cpp ModeRTL::climb_start() · Open in ArduPilot Copter-4.7.1

RTL: unexpected error calculating target alt

ArduCopter/mode_rtl.cpp ModeRTL::compute_return_target() · Open in ArduPilot Copter-4.7.1

Written here for Copter 4.6. In the tool you choose your vehicle and version, see your own parameter values beside the ones named here, and drop a flight log to have every message in it explained.

Open it in the Message & Error Explainer