← All tools

Message & Error Explainer

What an ArduPilot message means and what to do about it

Українська

A mission command needed the ground height, and it was not available

WarningMissions, fence, rally points, terrainCopter only

What ArduPilot says:

A mission command gave its height above terrain, and the ground height was unavailable as the command started. “Land: …” and “PayloadPlace: …”: the copter flies to the landing or placing point at its present height above home instead. “bad do_loiter_to_alt”: the height of a loiter-to-altitude command could not be converted, and the command is treated as finished at once. The log has “ERR TERRAIN-2” for these, and also for an Auto take-off to a terrain height (the copter then climbs by that height from where it is) and for RTL.

What to do, most likely first

  1. The terrain database had no data for this place: the ground station did not send it, or there is no SD card.

    CheckThe ground station's terrain status shows tiles still pending.

    FixBefore the flight connect a ground station with internet access and wait until the terrain for the whole route is loaded.

  2. The rangefinder is the terrain source and had no good reading at that moment (too high, or over water).

    CheckRFND.Dist in the log is at its maximum right before the message.

    FixFly terrain commands inside the rangefinder's working range.

  3. The mission uses terrain heights without any need: the planner's altitude frame was left on “Terrain”.

    FixPlan with heights relative to home unless the ground under the route really rises and falls.

Parameters to look at

ParameterWhat it is
TERRAIN_ENABLETerrain data enable
WPNAV_RFND_USEWaypoint missions use rangefinder for terrain following
RNGFND1_TYPERangefinder type
The code that sends it

bad do_loiter_to_alt

ArduCopter/mode_auto.cpp ModeAuto::do_loiter_to_alt() · Open in ArduPilot Copter-4.7.1

PayloadPlace: no terrain data, using alt-above-home

ArduCopter/mode_auto.cpp ModeAuto::do_payload_place() · Open in ArduPilot Copter-4.6.3

Land: no terrain data, using alt-above-home

ArduCopter/mode_auto.cpp ModeAuto::do_land() · Open in ArduPilot Copter-4.6.3

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