Simulated missions and Return to Launch
UAT 201 Fundamentals of Unmanned Aircraft Systems
Lesson
By the end of this module you will be able to
- Distinguish mission, waypoint and flight mode, and read the mode sequence from a log
- Explain ArduPilot Return to Launch and PX4 Return with their key defaults
- Calculate a mission's distance, time and energy from waypoints, and check enough energy remains to return
- Plan and run a mission in SITL, keeping evidence others can reproduce
- Identify a UAS's radio links and the bands permitted by the NBTC, and calculate how frequency and distance affect signal loss
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
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.
| Step | ArduPilot Copter (RTL) | PX4 (Return) |
|---|---|---|
| Climb | To at least the RTL altitude, default 15 m | To a safe altitude, default RTL_RETURN_ALT 60 m |
| Return | To Home or the nearest rally point | To Home or a rally point |
| Above the destination | Hover RTL_LOIT_TIME, default 5 s | Descend to RTL_DESCEND_ALT 30 m, then land after RTL_LAND_DELAY (0 s in the PX4 source code; the PX4 guide says 0.5 s) |
| Finally | Land (the default final altitude of 0 means land) | Land |
Parameter names change between versions
In ArduPilot Copter 4.6, the RTL altitude is set with RTL_ALT in centimetres (default 1500). Copter 4.7 and later (4.7.1 is the current stable release) use 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.
Communication: frequency bands and link range
RTL is often triggered by a lost link, so you need to understand what radio links a UAS has and what sets their range. One drone usually runs several links at once:
- RC link: carries commands from the transmitter sticks up to the aircraft
- Telemetry link: exchanges MAVLink data between aircraft and GCS, for example the SiK radios used with ArduPilot
- Video link: brings the camera picture down to the screen
Together, the links used to command and monitor the flight are the C2 link of module 1.
A frequency band is a range of radio frequencies the law allows you to use. The NBTC announcement of 10 June 2020 (B.E. 2563) allows drones, for general use, to use 433.05–434.79 MHz, 2400–2500 MHz (known as 2.4 GHz) and 5725–5850 MHz (5.8 GHz) for control and data, and users must register the drone’s radio equipment with the NBTC through the Any Registration system. Some imported equipment uses frequencies Thailand does not allow: SiK radios, for example, come in 433 MHz and 900 MHz versions, and in Thailand you must use a version set to a frequency range inside the permitted bands. In April 2026 the NBTC approved a new set of draft announcements adding bands such as 920–925 MHz and requiring Remote ID, and public comments closed on 3 July 2026. News checked on 2 October 2026 still describes them as drafts, so instructors must check which version is in force in the Royal Gazette before every use in class.
What sets link range: radio signals weaken with distance even in open space, called free-space path loss. Following Recommendation ITU-R P.525, the loss in decibels (dB) is
The formula says two things: (1) doubling the distance adds 6 dB of loss, and (2) at the same distance, higher frequencies lose more than lower ones, so a 5.8 GHz link usually reaches less far than 433 MHz with similar power and antennas. In addition, a lower data rate lets a link reach further but carries less data, and obstacles such as buildings, trees or even the pilot standing in front of the antenna weaken the signal much more. In practice you therefore measure the fade margin: how many dB the received signal is above the weakest level the receiver can still use. The SiK radio manual states that every 6 dB of fade margin roughly doubles the range.
Example 3 Loss with frequency and distance
Compare three bands, and estimate open-space range from an 18 dB fade margin measured at 500 m (assumed values).
def fspl_db(f_mhz, d_km):
return 32.4 + 20 * math.log10(f_mhz) + 20 * math.log10(d_km)
for f in (433, 2442, 5800):
print(f"{f:>5} MHz: {fspl_db(f, 0.5):.1f} dB at 0.5 km, {fspl_db(f, 1.0):.1f} dB at 1 km")
margin_db, measured_m = 18, 500
print(f"{margin_db} dB fade margin at {measured_m} m -> about {measured_m * 10 ** (margin_db / 20):.0f} m in free space")
433 MHz: 79.1 dB at 0.5 km, 85.1 dB at 1 km
2442 MHz: 94.1 dB at 0.5 km, 100.2 dB at 1 km
5800 MHz: 101.6 dB at 0.5 km, 107.7 dB at 1 km
18 dB fade margin at 500 m -> about 3972 m in free space
Every band loses about 6 dB more when the distance grows from 0.5 to 1 km, and at the same distance 5.8 GHz loses about 22.5 dB more than 433 MHz. The range of almost 4 km is a theoretical open-space value, not a legal flying range, because the pilot must still keep the aircraft in sight (module 5). Link budgets, antennas and communication protocols are covered in detail in UAT 207 Communication and Data Network Systems.
Module lab
Lab: simulated mission and RTL in SITL
- Start ArduPilot SITL (Copter) through Mission Planner or QGroundControl, record the firmware version, and set an RTL altitude suited to the hypothetical building.
- Place waypoints as in Figure 1 at 30 m altitude, saving the mission file and parameters before starting.
- Run the mission in Auto, then command RTL part-way, and read the mode and altitude sequence from the log.
- Simulate link loss following lab l10, recording when and how the system changes mode.
- 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
- Buying telemetry or video radios on frequencies Thailand does not permit, or not registering the radio equipment with the NBTC
- Trusting open-space link range when buildings and trees around the mission block the signal
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
- RC, telemetry and video links must use 433.05–434.79 MHz, 2400–2500 MHz or 5725–5850 MHz under the NBTC announcement in force; loss grows 6 dB each time distance doubles, and more at higher frequencies
Check your understanding
- In ArduPilot Copter 4.6, what
RTL_ALTvalue gives a 30 m RTL altitude? - What is the path length of waypoints (0, 0) → (30, 40) → (30, 0)?
- A 2.4 GHz link has 94 dB of free-space loss at 500 m. About how much loss will it have at 2 km?
- How much energy is used at 200 W for 9 minutes?
- A drone flies at 5 m/s into a 6 m/s headwind on the way back. What happens?
Answers
- 3000 (centimetres)
- m
- The distance doubles twice, adding dB, so about 106 dB
- Wh
- 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 | |
| Free-space loss (ITU-R P.525) |
Key references
- ArduPilot Dev Team. RTL mode. ArduPilot Copter documentation. link
- PX4 Autopilot. Return mode (generic vehicle). PX4 user guide (main). link
- PX4 Autopilot. (2026). rtl_params.c, release v1.17.0 [Computer software]. GitHub. link
- ArduPilot Dev Team. SITL simulator (software in the loop). link
- ArduPilot Dev Team. Mission Planner simulation. Mission Planner documentation. link
- QGroundControl. QGroundControl user guide. link
- สำนักงาน กสทช. ประกาศและแนวปฏิบัติการขึ้นทะเบียนเครื่องวิทยุคมนาคมสำหรับอากาศยานไร้คนขับ (ตรวจสอบฉบับปัจจุบันก่อนใช้สอน). link
- สำนักงาน กสทช. (2564). ประกาศสำนักงาน กสทช. เรื่อง การยื่นคำขอขึ้นทะเบียนเครื่องวิทยุคมนาคมสำหรับอากาศยานซึ่งไม่มีนักบิน สำหรับใช้งานเป็นการทั่วไป. link
- อินโฟเควสท์. (2569, 9 เมษายน). คุมเข้มโดรน BVLOS กสทช.สั่งขึ้นทะเบียน-ติด Remote ID ระบุตัวตน มั่นใจระบบตรวจสอบได้ลำ [ข่าว; สรุปร่างประกาศ กสทช. ด้านคลื่นความถี่สำหรับอากาศยานซึ่งไม่มีนักบิน และย่านความถี่ตามประกาศปี 2563]. link
- อินโฟเควสท์. (2569, 8 มิถุนายน). กสทช.เฮียริ่งปรับปรุง 4 ร่างประกาศ "โดรน" ปลดล็อกบินนอกระยะสายตา-เข้มความปลอดภัย [ข่าว; ร่างประกาศยังไม่ประกาศใช้ ปิดรับความเห็น 3 กรกฎาคม 2569]. link
- International Telecommunication Union. (2024). Calculation of free-space attenuation (Recommendation ITU-R P.525-5). link
- ArduPilot Dev Team. SiK radio – advanced configuration. ArduPilot Copter documentation. link
- Fahlstrom, P. G., Gleason, T. J., & Sadraey, M. H. (2022). Introduction to UAV systems (5th ed.). Wiley. link
Further reading
Study the assigned knowledge units in advance, review media and take the module quiz
Simulated missions and Return to Launch
ArduPilot SITL
QGroundControl
Dropping and restoring a simulated link
In class / field
Lab or field practice from worksheets with a safety checklist
Learning evidence: Checked worksheets and quiz results