Module 9/10 · Weeks 13–14 · 14 h

Autonomous take-off and landing, docks and item handoff

UAT 457 UAS for Transportation and Autonomous Delivery

About 95 minDraft, awaiting reviewLast updated 1 October 2026

Lesson

By the end of this module you will be able to

  1. Design a go/no-go check for autonomous take-off from a dock, and a precision-landing sequence with an exit when the target is not found
  2. Size a landing marker from the camera and height, and assess landing accuracy from test data
  3. Size the dock bank for charge-in-dock and battery-swap operation
  4. Design a locker hand-over that verifies the recipient with a one-time password and handles exceptions

Prerequisites: Module 8 Localization and obstacle avoidance · UAT 307 Computer Vision and Perception Technology (recommended)

Why this matters

The hardest part of drone delivery is not the middle of the trip but its two ends. At the start the drone must leave a dock with nobody checking it. At the end it must land in a small space, release the item to the right person and prove it did so. Between flights batteries must be charged or swapped in time for the next one, and if there are too few docks the drones you own cannot be used fully.

This module covers three topics of the course description: autonomous take-off and landing, docking or charging stations, and item handoff, seen from the system side: sequences, decision conditions and the numbers needed. Release mechanisms such as winches and tethers, and payload, are covered in modules 1–5 of this course.

Autonomous take-off from a dock

A dock is a box or pad where a drone rests, charges, and takes off and lands by itself. Before opening the lid and launching, the dock manager must pass every item of a go/no-go check; if any fails, the drone stays and the reason is reported.

  • Job and permission: the job is ASSIGNED and the flight plan has been accepted by the UTM service (where one is used)
  • Battery: enough charge for the route from module 7 plus the policy reserve, and temperature within the manufacturer’s range
  • Position: RTK fixed, or whatever level the first corridor segment needs per module 8
  • Weather: wind and rain from the dock’s weather station within limits
  • Payload: box latched, weight matching the order (checked by a scale in the dock)
  • Area: dock sensors detect no person or object on the pad

Once cleared, the drone climbs vertically to a safe height above the roof and nearby obstacles before entering the corridor. Climbing vertically first makes the dock’s approach a simple shaft that is easy to check, instead of surveying every direction around the dock.

Precision landing

Docks and lockers offer only a few tens of centimetres to land on, but even RTK positions drift with controller error and wind. The system therefore uses precision landing, which finds a target on the ground with a sensor and corrects position during descent.

PX4 splits precision landing into three phases: horizontal approach over the target, descent while staying centred, and a final approach close to the ground. It has two modes: required, which searches for the target if none is visible, and opportunistic, which uses the target only if it is already seen. The default horizontal acceptance radius for starting descent (PLD_HACC_RAD) is 0.2 m, and a target unseen for more than 5 s (PLD_BTOUT) is considered lost (PX4 Autopilot, n.d.). ArduPilot accepts targets from an IR-LOCK infrared sensor or from a companion computer through the MAVLink LANDING_TARGET message. Its PLND_STRICT parameter selects whether a lost target leads to a normal landing, a retry then landing, or a retry then hover, with PLND_RET_MAX setting the number of retries. The documentation warns that centimetre accuracy depends on a good EKF position and steady attitude (ArduPilot Dev Team, n.d.).

For a delivery system, do not fall back to a normal landing when the target is not found: landing in the wrong place on a factory roof is more dangerous than flying back. After the allowed retries the drone returns to a dock and the job moves to RETURNING.

Camera targets are usually ArUco markers, square black-and-white binary patterns with a thick black border. Garrido-Jurado and colleagues (2014) proposed a way to generate marker sets whose patterns differ enough to be detected reliably even when partly occluded. With the marker’s real size and the camera calibration (UAT 307), the camera’s position relative to the marker can be computed. The marker must be large enough to be seen from the search height but not so large that it overflows the image near the ground.

Example 1 How large must the dock marker be?

A downward camera has an image 1,280 pixels wide and an 80° horizontal field of view. The detector needs the marker to span at least 30 pixels when the search starts at 12 m (assumed).

import math
# how big must the landing marker on the dock be? (assumed downward camera)
W_px, hfov = 1280, 80.0                         # image width (px), horizontal field of view (deg)
f_px = (W_px / 2) / math.tan(math.radians(hfov / 2))
print(f"focal length {f_px:.1f} px")

need_px, h_detect = 30, 12.0                    # marker must span 30 px when first sought at 12 m
S = need_px * h_detect / f_px
print(f"outer marker at least {S:.2f} m wide")

for h in (12.0, 3.0, 0.8, 0.25):                 # does a 0.5 m marker still fit in the view?
    view = 2 * h * math.tan(math.radians(hfov / 2))
    print(f"h {h:5.2f} m: view {view:5.2f} m, 0.5 m marker {0.5 * f_px / h:6.0f} px {'fits' if 0.5 < view else 'too big'}")
focal length 762.7 px
outer marker at least 0.47 m wide
h 12.00 m: view 20.14 m, 0.5 m marker     32 px fits
h  3.00 m: view  5.03 m, 0.5 m marker    127 px fits
h  0.80 m: view  1.34 m, 0.5 m marker    477 px fits
h  0.25 m: view  0.42 m, 0.5 m marker   1525 px too big

The marker must be at least 0.47 m wide; the team uses 0.5 m, which appears as 32 pixels at 12 m. At 0.25 m, however, the view is only 0.42 m wide and the marker overflows. The system therefore uses nested markers, a small marker in the middle of the large one for the final phase, or relies on the rangefinder to control height at the very end.

Landing accuracy must be proven by repeated tests, not by datasheet figures. The team measures the radial offset of the aircraft centre from the pad centre on every landing and looks at the mean, the maximum and the 95th percentile, compared with the dock’s capture radius, the distance within which its rails or funnel guide the aircraft into place.

Example 2 Twenty test landings

The dock’s centring rails accept up to 12 cm from the centre (assumed).

import numpy as np
# 20 test landings on the dock: offset of the aircraft centre from the pad centre (cm, assumed)
dx = np.array([3, -5, 8, 2, -9, 4, 6, -2, 11, -4, 1, 7, -6, 3, -12, 5, 2, -3, 9, -1])
dy = np.array([-4, 6, 2, -7, 3, 9, -5, 4, -2, 8, -3, 1, -10, 6, 4, -6, 13, 2, -4, 5])
r = np.hypot(dx, dy)
capture = 12.0                                  # the dock's centring rails accept up to 12 cm

print(f"mean {r.mean():.1f} cm, max {r.max():.1f} cm, 95th percentile {np.percentile(r, 95):.1f} cm")
print(f"within capture radius: {(r <= capture).sum()} of {r.size}")
print("misses:", [(int(x), int(y)) for x, y, d in zip(dx, dy, r) if d > capture])
mean 8.0 cm, max 13.2 cm, 95th percentile 12.7 cm
within capture radius: 18 of 20
misses: [(-12, 4), (2, 13)]

A mean of 8.0 cm looks good, but two of twenty landings fell outside the capture radius, 10% of landings. Left as it is, a day of 150 flights would see about 15 landings not seated. The team must reduce the offset, for example by slowing the final descent or hovering to correct position before the last phase, then test again, rather than widening the criterion until it passes.

Scatter of 20 landing points on a 30 by 30 centimetre dock pad. A green circle marks the 12 centimetre capture radius; 18 white points lie inside and 2 pink points outside. At right: mean 8.0, 95th percentile 12.7 and maximum 13.2 centimetres
Figure 1 Twenty test landings against the dock capture radius

Docks and charging stations

A dock does more than park a drone: it shelters it from sun and rain, charges or swaps batteries, loads and unloads items, measures wind and rain, relays data, and in some models serves as an RTK reference station. Commercial docks give realistic numbers. DJI states that Dock 3 charges its aircraft from 15% to 95% in 27 minutes at 25 °C, takes 100 to 240 V AC with up to 800 W, and is rated IP56 (DJI, n.d.). In Thailand it can run on 230 V 50 Hz mains, but note that the charging time is measured at 25 °C; a factory roof in the sun is much hotter. Battery safety is covered further in the battery knowledge unit.

There are two main options.

  • Charge in the dock: the drone stays in the dock until charged; simple, but each dock slot is occupied for a long time
  • Battery swap: a robot arm replaces the battery within minutes; the dock frees up quickly, but many spare batteries and separate chargers are needed

The dock count is worked out like the fleet size in module 7. One slot is occupied minutes per sortie; with sorties per hour the average number of busy slots is , divided by the highest accepted utilisation and rounded up. The number of batteries on chargers at once follows from Little’s law (Little, 2011), where is the time one battery spends on a charger.

Example 3 How many dock slots does the service centre need?

The peak has 18 sorties per hour (module 7). A sortie uses 35% of the battery; charging adds 80% in 27 minutes (the manufacturer’s figure above, taken as linear). Handling at the slot takes 3 minutes, a robot swap 2.5 minutes, and a removed battery recharges fully on a bench charger in 45 minutes. Slot utilisation may not exceed 80% (assumed except for the manufacturer’s charge time).

import math
# how many docks for 18 sorties per hour? charge in the dock vs swap the battery (assumed values)
lam = 18                         # sorties per hour at peak
rate = 80 / 27                   # charge rate %/min (manufacturer: 15 to 95 % in 27 min, taken as linear)
used = 35                        # battery used per sortie (%)
handling = 3.0                   # land, unload, load, checks (min)
swap = 2.5                       # robot battery swap (min)
bench = 45.0                     # full recharge of a removed battery on the bench charger (min)
rho_max = 0.8                    # highest dock utilisation accepted

def docks(minutes_per_sortie):
    busy = lam * minutes_per_sortie / 60          # docks busy on average
    return busy, math.ceil(busy / rho_max)

t_charge = used / rate + handling
b, n = docks(t_charge)
print(f"charge in dock: {t_charge:.1f} min per sortie, busy {b:.2f}, docks {n}")
t_swap = swap + handling
b, n = docks(t_swap)
print(f"battery swap:   {t_swap:.1f} min per sortie, busy {b:.2f}, docks {n}")
print(f"batteries on bench chargers at any time: {lam * bench / 60:.1f}")
charge in dock: 14.8 min per sortie, busy 4.44, docks 6
battery swap:   5.5 min per sortie, busy 1.65, docks 3
batteries on bench chargers at any time: 13.5

Charging in the dock needs 6 slots; swapping needs 3, but on average 13.5 batteries sit on chargers throughout the peak, on top of those in the 6 drones. The choice trades the cost of docks against the cost of batteries and charging space. Treating charging as linear is an approximation; the last part of a charge is slower, so measure real charge times over the charge range you actually use.

Horizontal bars: charge in dock, average busy 4.44 slots and 6 slots needed; battery swap, average busy 1.65 slots and 3 slots needed
Figure 2 Docks needed at 18 sorties per hour

The dock manager on the server reserves a slot for each returning drone, tracks charge and temperature of every battery, and picks one that is charged and cool enough for the next sortie. If every slot is full, it must send the drone to a designated waiting point, not let it hover above the dock until the battery runs out.

Hand-over at the parcel locker

Item handoff is the step where responsibility for the item passes from the system to the recipient. In this case the drone lands on a pad on the locker roof, drops the box into the receiving slot, and the locker keeps it locked until the recipient opens it. Other systems lower items on a tether into a space about the size of a picnic blanket, as Wing does (Wing, n.d.). The system principle is the same: there must be a proof of delivery made of a sequence of events, not one message from the drone saying “released”.

Events recorded are: drone landed on the locker, release mechanism operated, locker sensors confirm a box of the right weight, locker locked, recipient notified, recipient authenticated at the locker, door opened, and sensors confirm the box was removed. Only then does the job become DELIVERED.

The recipient is verified with a time-based one-time password (TOTP) per RFC 6238. The recipient’s app and the locker share a secret issued for that job, and each computes a code from the current time: Unix time divided by a time step (30 seconds by default), passed through HMAC. The RFC recommends accepting at most one neighbouring time step to allow for network delay (M’Raihi and colleagues, 2011). A benefit is that the locker can check codes on its own even when the network is down.

Example 4 Checking a code at the locker

The code is first tested against the RFC 6238 test vector (a test key, never for service use), then a 6-digit code is used at the locker with one neighbouring step accepted.

import hmac, hashlib, struct
# time-based one-time password (TOTP, RFC 6238) for the parcel locker
def totp(secret, t, step=30, digits=8):
    counter = int(t // step)
    mac = hmac.new(secret, struct.pack(">Q", counter), hashlib.sha1).digest()
    off = mac[-1] & 0x0F
    code = (int.from_bytes(mac[off:off + 4], "big") & 0x7FFFFFFF) % 10 ** digits
    return str(code).zfill(digits)

key = b"12345678901234567890"                   # test key from RFC 6238 (never use in service)
print("RFC test vector t=59:", totp(key, 59), "(expected 94287082)")

def locker_accepts(code, t_entered, window=1):  # accept the current step and one step either side
    return any(totp(key, t_entered + k * 30, digits=6) == code for k in range(-window, window + 1))

code = totp(key, 59, digits=6)                  # code sent to the recipient at t = 59 s
for t in (70, 89, 95):
    print(f"code {code} entered at t={t:3d} s: {'open' if locker_accepts(code, t) else 'refused'}")
RFC test vector t=59: 94287082 (expected 94287082)
code 287082 entered at t= 70 s: open
code 287082 entered at t= 89 s: open
code 287082 entered at t= 95 s: refused

The code matches the RFC test vector. A code made at second 59 (step 1) works until just before second 90 (step 2) and is refused at second 95. Such a short life suits an app that generates the code while the recipient stands at the locker, not a code sent by SMS hours in advance.

Exceptions must be designed from the start: target not found after the allowed retries, receiving slot full, sensors not confirming the box, or the recipient not collecting within the agreed time. Each has an exit and a state change as in module 6, and each alerts the operations centre so a person can decide what comes next.

Flow of six boxes from left to right: arrive over drop point, precision landing, release into locker, locker locks and notifies, recipient enters OTP, and confirm hand-over in green. From precision landing an arrow leads to a pink box, target not found after retries, return to dock; from recipient enters OTP an arrow leads to an orange box, not collected in time, alert and recover
Figure 3 Locker hand-over sequence and exception exits

Module lab

Lab: precision landing, dock sizing and a mock locker

  1. Compute the marker size for the department’s camera with the code in Example 1 and print an ArUco marker of that size with a small nested marker at its centre
  2. Set up precision landing in SITL, then, in a safe field within visual line of sight under CAAT conditions, land on the marker at least 20 times; measure the offsets and analyse them with the code in Example 2
  3. Test with the marker half covered and with no marker, and record whether the drone follows the PLND_STRICT setting or required mode you configured
  4. Size the dock bank for your group’s site with the code in Example 3 for both options, then build a mock locker with a microcontroller board and the TOTP code from Example 4

Common mistakes

Watch out

  • Falling back to a normal landing when the target is not found, so the drone may land in the wrong place on a factory roof
  • One marker of one size, visible from height but overflowing the image near the ground
  • Looking only at the mean landing offset, although a few landings outside the capture radius jam the dock
  • Using the manufacturer’s charge time as is, forgetting it is measured at 25 °C and that the end of a charge is slower
  • Treating the drone’s “released” message as a completed hand-over without evidence from the locker and the recipient

Summary

  • Take off only when every go/no-go item passes, climbing vertically to a safe height before entering the corridor
  • Precision landing uses a ground marker of size , nested markers for the final phase, and retry-then-return rather than a normal landing
  • Dock slots ; battery swapping needs fewer slots but spare batteries sized by Little’s law
  • Hand-over needs proof as a sequence of events, recipient verification with TOTP, and an exit for every exception

Check your understanding

  1. A camera has = 762.7 pixels and the marker must span 40 pixels at 10 m. How wide must it be at least?
  2. In 50 test landings, 3 fall outside the capture radius. What is the seated-landing rate?
  3. The peak has 12 sorties per hour, each occupying a slot for 14.8 minutes, with utilisation capped at 80%. How many slots are needed?
  4. A TOTP code is generated at second 100 (30 s steps, one neighbouring step accepted). The recipient enters it at second 155. Does the locker open?
  5. Why should the system not mark a job DELIVERED as soon as the drone reports that it released the box?
Answers
  1. m
  2. Average busy slots, divided by 0.8 gives 3.7, rounded up to 4 slots
  3. No. The code belongs to step , while second 155 is in step 5, and the locker accepts only steps 4 to 6
  4. The drone’s message only shows that the mechanism operated; it does not prove the box is in the locker and reached the recipient. Locker sensors and recipient verification are the evidence

Key formulas

Focal length in pixels
Required marker size
Number of docks

Key references

  1. PX4 Autopilot. Precision landing. PX4 user guide (main). link
  2. ArduPilot Dev Team. Precision landing and loiter. ArduPilot Copter documentation. link
  3. Garrido-Jurado, S., Muñoz-Salinas, R., Madrid-Cuevas, F. J., & Marín-Jiménez, M. J. (2014). Automatic generation and detection of highly reliable fiducial markers under occlusion. Pattern Recognition, 47(6), 2280–2292. link
  4. DJI. DJI Dock 3 specs. link
  5. M'Raihi, D., Machani, S., Pei, M., & Rydell, J. (2011). TOTP: Time-based one-time password algorithm (RFC 6238). RFC Editor. link
  6. Little, J. D. C. (2011). Little's law as viewed on its 50th anniversary. Operations Research, 59(3), 536–549. link
  7. Wing. Technology: How Wing delivers. 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: Delivery, indoor operations and warehousing · Automation, robotics and swarms · Aircraft, structures and design · Electrical, electronics and power systems · Installation, maintenance and testing