RTL is set to fly above the terrain, and has no way to measure it
What ArduPilot says:
- PreArm: no rangefinder
- PreArm: no terrain data
- PreArm: rangefinder not in firmware
- PreArm: RTL_ALT>RNGFND_MAX_CM
- PreArm: RTL_ALT_M above RNGFND_MAX
The full line reads “RTL_ALT_TYPE is above-terrain but …”. With RTL_ALT_TYPE 1 the copter returns at RTL_ALT above the ground under it, not above home, so it needs the ground's height: from a downward rangefinder (when WPNAV_RFND_USE is 1) or from the terrain database (TERRAIN_ENABLE 1). “no terrain data”: neither is available. “no rangefinder”: none is set up facing down. “RTL_ALT>RNGFND_MAX_CM”: RTL_ALT is beyond the rangefinder's reach (RNGFND1_MAX_CM).
What to do, most likely first
RTL_ALT_TYPEwas set to 1 by a parameter file, and you do not fly over hills.FixSet
RTL_ALT_TYPEto 0: RTL then climbs toRTL_ALTabove home, which needs no terrain data.You want terrain following, and the terrain database is off or has no data.
FixSet
TERRAIN_ENABLEto 1, keep an SD card in the board, and connect the ground station once at the flying site so it can send the terrain tiles.A rangefinder is meant to do it, but none faces down, or
RTL_ALTis higher than it can measure.Check
RTL_ALTandRNGFND1_MAX_CMare both in centimetres: compare them.FixSet the rangefinder's
RNGFNDn_ORIENTto 25 (Down) and reboot. If the return height must stay above its range, setWPNAV_RFND_USEto 0 and use the terrain database instead.
Parameters to look at
| Parameter | What it is |
|---|---|
RTL_ALT_TYPE | RTL mode altitude type |
RTL_ALT | RTL Altitude |
WPNAV_RFND_USE | Waypoint missions use rangefinder for terrain following |
TERRAIN_ENABLE | Terrain data enable |
RNGFND1_TYPE | Rangefinder type |
RNGFND1_ORIENT | Rangefinder orientation |
RNGFND1_MAX_CM | Rangefinder maximum distance |
Where to do it:Setup & Tuning GuideFailsafe Explainer
The code that sends it
PreArm: no rangefinder
ArduCopter/AP_Arming.cpp AP_Arming_Copter::parameter_checks() · Open in ArduPilot Copter-4.6.3
ArduCopter/AP_Arming_Copter.cpp AP_Arming_Copter::parameter_checks() · Open in ArduPilot Copter-4.7.1
PreArm: no terrain data
ArduCopter/AP_Arming.cpp AP_Arming_Copter::parameter_checks() · Open in ArduPilot Copter-4.6.3
ArduCopter/AP_Arming_Copter.cpp AP_Arming_Copter::parameter_checks() · Open in ArduPilot Copter-4.7.1
PreArm: rangefinder not in firmware
ArduCopter/AP_Arming.cpp AP_Arming_Copter::parameter_checks() · Open in ArduPilot Copter-4.6.3
ArduCopter/AP_Arming_Copter.cpp AP_Arming_Copter::parameter_checks() · Open in ArduPilot Copter-4.7.1
PreArm: RTL_ALT>RNGFND_MAX_CM
ArduCopter/AP_Arming.cpp AP_Arming_Copter::parameter_checks() · Open in ArduPilot Copter-4.6.3
And 1 more messages, sent from the same places.