MAVLINKHUD

Overview

The RTL parameter group configures the Return to Launch (RTL) flight mode. This is the primary safety mode for ArduPilot vehicles, providing an autonomous way for the vehicle to return to its starting point and land.

RTL is often triggered automatically by Failsafes (Radio, Battery, GCS) or manually by the pilot.

Key Concepts

1. Return Altitude (RTL_ALT)

Defines the altitude the vehicle will climb (or descend) to before starting its trip back to Home.

  • Safety: This must be high enough to clear any trees, buildings, or hills between the drone and Home.

2. Final Phase (RTL_ALT_FINAL)

Determines what the drone does once it arrives back over Home.

  • 0: Land immediately.
  • >0: Loiter at this altitude (meters) until the pilot takes over or the battery fails.

3. Climb Behavior (RTL_CLIMB_MIN)

Ensures that if the vehicle is already above RTL_ALT, it doesn't dive until it gets home. It also ensures a minimum climb if already low.

Parameter Breakdown

  • RTL_ALT: Return altitude (centimeters or meters, check units).
  • RTL_SPEED: Speed (m/s) during the return trip.
  • RTL_AUTOLAND: (Plane) Automatically starts a landing sequence upon arrival.

Integration Guide

  • Setup: Always set RTL_ALT to at least 20 meters higher than the tallest obstacle in your flying area.
  • Verify: Perform a manual RTL test early in your flight to ensure the vehicle behaves as expected.

Developer Notes

  • Library: ArduCopter/mode_rtl.cpp, ArduPlane/mode_rtl.cpp.
  • Navigation: Uses the standard position/velocity controllers to execute the path home.

RTL_ALT

cm
Default 1500
Range 0 8000

RTL Altitude (RTL_ALT)

Description

RTL_ALT sets the "Safe Height" for Return-to-Launch.

When RTL is triggered (e.g. by a failsafe or switch), the drone will climb to this altitude before flying home. This ensures it clears trees, buildings, and hills.

  • 0: Stay at current altitude (Dangerous if low).
  • 1500 (Default): 15 meters.
  • Recommendation: Set to at least 2000-3000 (20-30m) to clear most suburban obstacles.

The Mathematics

$$ \text{Target Alt} = \max(\text{Current Alt}, \text{RTL\_ALT}) $$

Tuning & Behavior

  • Default Value: 1500 cm.
  • Note: If the drone is already higher than this value, it will stay at its current altitude to fly home. It will never descend to RTL_ALT.

RTL_ALTITUDE

m
Default 15
Range -1 500

RTL Altitude (RTL_ALTITUDE)

Description

RTL_ALTITUDE defines your "Safe Return Height."

When the drone is commanded to Return-to-Launch (RTL), it will first check its current height. If it is below this value, it will climb to this altitude before starting the journey home. This ensures the drone flies over trees, buildings, and power lines instead of through them.

  • -1: Maintains the drone's current altitude (No climb or descent).
  • 0: Drone will fly home at its current altitude.
  • Value (m): Target altitude above the takeoff point.

Tuning & Behavior

  • Default: 15 meters.
  • Recommendation: Set this to at least 10 meters higher than the tallest obstacle in your flight area.
  • Note: If the drone is already above this altitude when RTL is triggered, it will stay at that higher altitude while returning home (unless RTL_CONE logic is used).

RTL_ALT_FINAL

cm
Default 0
Range 0 1000

RTL Final Altitude (RTL_ALT_FINAL)

Description

RTL_ALT_FINAL determines what the drone does after it arrives home.

  • 0 (Default): Land immediately.
  • > 0: Hover at this altitude.

Tuning & Behavior

  • Default Value: 0.
  • Recommendation: Use 0 for automated safety. Use 200 (2m) if you want the drone to come home and wait for you to catch it or manually land it.

RTL_ALT_TYPE

Default 0
Range 0 1

RTL Altitude Type (RTL_ALT_TYPE)

Description

RTL_ALT_TYPE enables Terrain Following during RTL.

  • 0 (Default): Relative to Home. The drone flies at RTL_ALT above the takeoff point.
  • 1: Terrain. The drone flies at RTL_ALT above the ground beneath it (requires a Rangefinder or Terrain Database).

Tuning & Behavior

  • Default Value: 0.
  • Recommendation: Use 1 if you are flying in hilly terrain to ensure the drone climbs over ridges on its way home.

RTL_AUTOLAND

Default 0
Range 0 3

RTL auto land (RTL_AUTOLAND)

Description

This parameter controls the behavior of the aircraft when it reaches the Return-To-Launch (RTL) destination. Instead of simply loitering at the home or rally point, the aircraft can be configured to automatically initiate a landing sequence. This feature allows for fully autonomous recovery missions but requires careful setup of DO_LAND_START mission items to define the approach path.

The Mathematics

The parameter acts as a state machine configuration for the RTL flight mode controller.

$$ \text{Behavior} = \begin{cases} \text{Loiter at Home} & \text{if } \text{RTL\_AUTOLAND} = 0 \ \text{Land (Rally)} & \text{if } \text{RTL\_AUTOLAND} = 1 \ \text{Land (Home)} & \text{if } \text{RTL\_AUTOLAND} = 2 \ \text{Loiter (No Check)} & \text{if } \text{RTL\_AUTOLAND} = 3 \end{cases} $$

The Engineer's View

Defined in ArduPlane/Parameters.cpp. The values correspond to the RtlAutoland enum:

  • RTL_DISABLE (0): Standard RTL behavior (loiter over Home/Rally).
  • RTL_RALLY (1): Land at the nearest Rally point if defined and in range.
  • RTL_HOME (2): Land at the Home position.
  • RTL_DISABLE_WO_CHECK (3): Do not land, and suppress the pre-arm check that normally requires a DO_LAND_START item if RTL_AUTOLAND is active.

Tuning & Behavior

  • 0 (Disabled): The aircraft will return to home (or rally point) and loiter indefinitely until the battery fails or manual control is taken.
  • 1 (Rally): Initiates landing at the nearest valid Rally Point.
  • 2 (Home): Initiates landing at Home.
  • 3 (Disable w/o Check): Useful for using DO_LAND_START as a pure "Go Around" or "Abort" waypoint without forcing an automatic landing at the end of an RTL.

RTL_CLIMB_MIN

cm
Default 0
Range 0 1000

RTL Minimum Climb (RTL_CLIMB_MIN)

Description

RTL_CLIMB_MIN ensures the drone does something vertical when RTL is triggered.

If RTL_ALT is 15m and you are at 20m, the drone would normally just fly home. If you set RTL_CLIMB_MIN to 500 (5m), the drone will climb to 25m first. This is a visual cue to the pilot that RTL has engaged.

Tuning & Behavior

  • Default Value: 0.
  • Recommendation: Set to 0 unless you specifically want this "Jump" behavior.

RTL_CONE_SLOPE

Default 3.0
Range 0.5 10.0

RTL Cone Slope (RTL_CONE_SLOPE)

Description

RTL_CONE_SLOPE creates a virtual funnel above the landing spot.

If the drone is very close to home but very high up, it doesn't need to climb to RTL_ALT. It can just descend. This parameter defines how steep that descent can be.

  • Low Value: Shallow cone. Drone flies further out before descending.
  • High Value: Steep cone. Drone can descend steeply.

Tuning & Behavior

  • Default Value: 3.0 (3:1 slope).
  • 0: Disabled (Always climb to RTL_ALT first).

RTL_LOIT_TIME

ms
Default 5000
Range 0 60000

RTL Loiter Time (RTL_LOIT_TIME)

Description

RTL_LOIT_TIME gives you a chance to take control.

When the drone arrives overhead, it will pause for this duration. This is your opportunity to switch modes if you want to land manually.

Tuning & Behavior

  • Default Value: 5000 ms (5 seconds).
  • Recommendation: Keep at least 5000.

RTL_OPTIONS

Default 0
Range 0 4

RTL Mode Options (RTL_OPTIONS)

Description

RTL_OPTIONS allows you to customize how the drone behaves while flying home.

  • Bit 2 (4): Ignore Pilot Yaw.
    • Unset (0): The pilot can yaw (spin) the drone while it is returning home. This is useful for looking around with a camera during the flight.
    • Set (1): The drone ignores yaw stick inputs. The nose will remain pointed towards the home point (or as defined by WP_YAW_BEHAVIOR).

Tuning & Behavior

  • Default Value: 0.
  • Recommendation: Leave at 0 to allow pilot intervention/camera pointing.

RTL_RADIUS

m
Default 0
Range 0 500

RTL Loiter Radius (RTL_RADIUS)

Description

RTL_RADIUS defines how tight the plane circles when it gets home.

  • 0 (Default): Use WP_LOITER_RAD.
  • > 0: Use this specific radius for RTL only.

Tuning & Behavior

  • Default Value: 0.
  • Recommendation: Keep at 0 to ensure consistent behavior with standard loiter modes.

RTL_SPEED

cm/s
Default 0
Range 0 2000

RTL Speed (RTL_SPEED)

Description

RTL_SPEED sets the "Get Home Fast" velocity.

  • 0 (Default): Use WPNAV_SPEED (Waypoint Speed).
  • > 0: Use this specific speed for RTL.

Tuning & Behavior

  • Default Value: 0.
  • Recommendation: Set slightly higher than your standard waypoint speed if you want the drone to return quickly in an emergency, but ensure it doesn't drain the battery so fast it crashes before arriving.