A mission command needed the ground height, and it was not available
What ArduPilot says:
- bad do_loiter_to_alt
- PayloadPlace: no terrain data, using alt-above-home
- Land: no terrain data, using alt-above-home
- ERR TERRAIN (Subsys 21)
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
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.
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.
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
| Parameter | What it is |
|---|---|
TERRAIN_ENABLE | Terrain data enable |
WPNAV_RFND_USE | Waypoint missions use rangefinder for terrain following |
RNGFND1_TYPE | Rangefinder type |
Where to do it:Failsafe ExplainerMission Energy Check
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