Module 4/5 · Weeks 10–12 · 27 h

Simulated missions and Return to Launch

UAT 201 Fundamentals of Unmanned Aircraft Systems

About 80 minDraft, awaiting reviewLast updated 27 September 2026

Lesson

By the end of this module you will be able to

  1. Distinguish mission, waypoint and flight mode, and read the mode sequence from a log
  2. Explain ArduPilot Return to Launch and PX4 Return with their key defaults
  3. Calculate a mission's distance, time and energy from waypoints, and check enough energy remains to return
  4. Plan and run a mission in SITL, keeping evidence others can reproduce

Prerequisites: UAT 201 modules 1–3

Why this matters

The team’s building photo mission has many photo points. Flown by hand point by point, each round’s photos will not match the same positions, and the pilot tires and makes mistakes. An automatic mission repeats the flight exactly, but you must know what the drone will do when something goes wrong, especially Return to Launch (RTL), the most commonly used way out.

Mission, waypoint and flight mode

  • A waypoint is a point with coordinates and altitude for the drone to fly to
  • A mission is an ordered list of commands, such as take off, fly to point 1, take a photo, fly to point 2, then return
  • A flight mode is how the flight controller interprets commands, such as Stabilize (the pilot flies), Loiter (hold position), Auto (follow the mission) and RTL
A top view. H, the take-off point, is at bottom left. A blue route zigzags through waypoints 1 to 8 around a rectangular building in the centre. A dashed orange line runs from waypoint 8 back to H. A box on the right gives mission 320 m and return 63.2 m
Figure 1 Top view of the building survey mission

Return to Launch

RTL starts when the pilot commands it, or when a failsafe does, such as on loss of the RC signal or low battery. The defaults of the two firmwares differ considerably.

StepArduPilot Copter (RTL)PX4 (Return)
ClimbTo at least the RTL altitude, default 15 mTo a safe altitude, default RTL_RETURN_ALT 60 m
ReturnTo Home or the nearest rally pointTo Home or a rally point
Above the destinationHover RTL_LOIT_TIME, default 5 sDescend to RTL_DESCEND_ALT 30 m, wait 0.5 s
FinallyLand (the default final altitude of 0 means land)Land
A side view with distance from Home 0 to 80 m horizontally and height vertically. RTL starts 63 m away at 10 m height. ArduPilot's blue line climbs to 15 m, flies back and lands at Home. PX4's dashed orange line climbs to 60 m, flies back, descends to 30 m and lands
Figure 2 Side view of RTL with ArduPilot and PX4 defaults

Parameter names change between versions

In ArduPilot Copter 4.6, the RTL altitude is set with RTL_ALT in centimetres (default 1500). Newer documentation uses RTL_ALT_M in metres (default 15). Always check the firmware version before setting it, and set the RTL altitude above the trees and buildings in the area; the team’s mission around a 20 m building should not use 15 m.

Calculating the mission before flight

Example 1 Mission distance, time and energy

Coordinates are metres from Home (east x, north y), flown at 30 m altitude and 5 m/s, hovering 3 s per photo point, climbing and descending at 1.5 m/s, with an assumed average power of 180 W.

import math

waypoints = [(0, 0), (20, 0), (80, 0), (80, 20), (20, 20), (20, 40), (80, 40), (80, 60), (20, 60)]
speed, vz, alt, photo_s, power_w = 5.0, 1.5, 30.0, 3, 180

legs = [math.dist(a, b) for a, b in zip(waypoints, waypoints[1:])]
mission_m = sum(legs)
back_m = math.dist(waypoints[-1], waypoints[0])
t_mission = alt / vz + mission_m / speed + photo_s * (len(waypoints) - 1)
t_return = back_m / speed + 5 + alt / vz                  # fly back, hover 5 s, then descend
energy_wh = power_w * (t_mission + t_return) / 3600
print(f"mission path {mission_m:.0f} m, return {back_m:.1f} m")
print(f"time: mission {t_mission:.0f} s + return {t_return:.1f} s = {(t_mission + t_return) / 60:.1f} min")
print(f"energy {energy_wh:.1f} Wh of 61.6 Wh usable ({energy_wh / 61.6:.0%})")
mission path 320 m, return 63.2 m
time: mission 108 s + return 37.6 s = 2.4 min
energy 7.3 Wh of 61.6 Wh usable (12%)

The mission is very short compared with the energy available, but worst cases must be considered too: if the link is lost at the farthest point, or the return is into wind, it takes longer. The 180 W and 61.6 Wh (80% of a 4S 5200 mAh battery) are assumptions; measure real power from the logs of the aircraft used.

Example 2 Can it get home from every point?

Assume a 4 m/s headwind on the way back, leaving a ground speed of 1 m/s. Continuing from Example 1:

headwind = 4.0
ground_speed = speed - headwind
worst_m = max(math.dist(p, waypoints[0]) for p in waypoints)
t_back = worst_m / ground_speed + 5 + alt / vz
print(f"farthest point {worst_m:.1f} m from home; return into a {headwind:.0f} m/s headwind takes {t_back:.0f} s "
      f"and {power_w * t_back / 3600:.1f} Wh")
farthest point 100.0 m from home; return into a 4 m/s headwind takes 125 s and 6.2 Wh

The headwind makes the return from the farthest point take several times longer. If the wind speed equals or exceeds the drone’s speed, it cannot get back at all, so check the wind and set mission abort criteria before flying.

Module lab

Lab: simulated mission and RTL in SITL

  1. Start ArduPilot SITL (Copter) through Mission Planner or QGroundControl, record the firmware version, and set an RTL altitude suited to the hypothetical building.
  2. Place waypoints as in Figure 1 at 30 m altitude, saving the mission file and parameters before starting.
  3. Run the mission in Auto, then command RTL part-way, and read the mode and altitude sequence from the log.
  4. Simulate link loss following lab l10, recording when and how the system changes mode.
  5. Repeat with the same mission, compare the two rounds’ times and landing points, and give the files to another group to reproduce.

Common mistakes

Watch out

  • Using the default RTL altitude without looking at obstacles, such as buildings or trees taller than 15 m
  • Entering a parameter in the wrong unit, such as 15 in a centimetre field
  • Not checking the Home point before take-off, so the return point is not where you think
  • Calculating energy for the mission only, forgetting the return from the farthest point and the wind
  • Not recording firmware version and parameters, so others cannot reproduce the run

Summary

  • A mission is a command list, a waypoint a destination, and a flight mode sets how commands are interpreted
  • ArduPilot RTL defaults to 15 m; PX4 Return defaults to 60 m and descends at 30 m
  • Parameter names and units differ between firmware versions
  • Calculate distance, time and energy for both the mission and the return from the farthest point, including wind

Check your understanding

  1. In ArduPilot Copter 4.6, what RTL_ALT value gives a 30 m RTL altitude?
  2. What is the path length of waypoints (0, 0) → (30, 40) → (30, 0)?
  3. How long does a 100 m return take at a ground speed of 4 m/s?
  4. How much energy is used at 200 W for 9 minutes?
  5. A drone flies at 5 m/s into a 6 m/s headwind on the way back. What happens?
Answers
  1. 3000 (centimetres)
  2. m
  3. s
  4. Wh
  5. Its ground speed is negative: the wind carries it further away and it cannot return, so do not fly in winds like this

Key formulas

Path length
Energy used

Key references

  1. ArduPilot Dev Team. RTL mode. ArduPilot Copter documentation. link
  2. PX4 Autopilot. Return mode (generic vehicle). PX4 user guide (main). link
  3. ArduPilot Dev Team. SITL simulator (software in the loop). link
  4. ArduPilot Dev Team. Mission Planner simulation. Mission Planner documentation. link
  5. QGroundControl. QGroundControl user guide. link

Further reading

Study the assigned knowledge units in advance, review media and take the module quiz

In class / field

Lab or field practice from worksheets with a safety checklist

Learning evidence: Checked worksheets and quiz results

Module quiz

This is a formative self-check, not a graded exam

Knowledge domain: Mission planning, flight and simulation · Communications, networks and IoT