Module 3/5 · Weeks 7–9 · 27 h

Positioning, timing and fleet communication

UAT 464 Drone Light Show and Aerial Formation Display Technology

About 90 minDraft, awaiting reviewLast updated 23 October 2026

Lesson

By the end of this module you will be able to

  1. Read a datasheet accuracy for RTK (CEP plus ppm), convert it to a 95% radius and to the relative error between two drones, then combine it with trajectory-tracking error into a position-error budget
  2. Design a pre-flight GNSS gate that does not rely on the satellite count alone, and compute the number of spare drones with the binomial distribution
  3. Estimate a clock offset from four timestamps, calculate the error from asymmetric delay and from clock drift, and convert it into position error
  4. Calculate the load of the fleet's shared communication channel, compare live command streaming with uploading the plan and triggering the start, and find the number of repeats needed for the start command
  5. Explain how MIDI time code ties the light program to the music, calculate the timecode resolution and the delay of sound across the audience, and choose a light offset that keeps the audience inside the ITU-R BT.1359 window

Prerequisites: UAT 205 Sensors and Instrumentation Systems (GNSS and measurement error) · UAT 207 Communication and Data Network Systems (radio, channel load and protocols) · UAT 106 Statistics and Data Analytics for Technology (normal and binomial distributions)

Why this matters

Module 2 gave the trajectory table for every drone, but the table means something only if a drone knows where it is and what time it is, and the operator knows that every drone is ready. These three are one issue seen from different sides. A position wrong by 10 cm is a crooked picture. A clock off by 10 ms at 6 m/s is a position wrong by 6 cm. A status the operator does not know is a risk nobody sees. The module therefore has three parts. The first measures position with RTK GNSS, then checks before flight and carries spare drones. The second manages time so that every drone follows one clock. The third designs the fleet’s communication so that one shared radio channel can carry it.

All numbers belong to the “Lotus in the Lake” case, continuing from Modules 1 and 2, and are assumed for learning unless a source is given, for example the figures from the datasheet of one GNSS receiver, used as an example of how to read a datasheet and not as a recommendation to buy that model. General GNSS navigation theory is in UAT 205 and UAT 461, and networks are in UAT 207. This course applies their results to the specific problem of a show. The Python code can be downloaded from /downloads/uat-464/.

Centimetre-level position with RTK

Ordinary GNSS (called PVT or standalone) measures position from the arrival time of signals, with an error of about a metre because the atmosphere, the satellite clocks and the orbits all carry errors. RTK (real-time kinematic) fixes this with a base station standing still at a known position. The base measures the carrier phase of the same satellites the drone sees and sends correction data (as RTCM messages) to the drone. Errors that both receivers see alike, such as atmospheric effects, cancel when subtracted. When the drone resolves the integer number of carrier cycles (called fixed), the accuracy is at the centimetre level. If it cannot yet resolve them (float), the solution is less accurate and wanders more. Huang et al. (2021) use this structure in their show system: the base station sends raw data to a stream server that converts it to RTCM and passes it to the ground station, which broadcasts the corrections to all drones over the wireless network.

Reading a datasheet needs care about the measurement conditions. The datasheet of the ZED-F9P-05B module (u-blox, 2024) gives horizontal accuracy as CEP (circular error probable, the radius that contains 50% of measurements) as follows: PVT mode 1.5 m, RTK mode 0.01 m plus 1 ppm of the baseline length (vertical is a median of 0.01 m plus 1 ppm). RTK convergence time is under 10 s with several constellations and under 30 s with GPS alone. The ppm term is limited to baselines up to 20 km. The figures were measured on a 1 km baseline with patch antennas that have good ground planes, and they do not include antenna phase-centre errors. The datasheet also states the accuracy of the time pulse as about 30 ns (RMS) and 60 ns (99%), which we use in the timing section.

A CEP must be converted to a 95% radius before it is compared with the designed spacing. For a circular normal error with standard deviation per axis, CEP is and . What really matters is the relative error between two drones, because a collision depends on the position of one drone relative to another, not on absolute position. If the errors of the two drones are independent, the relative standard deviation is . But drones close together use corrections from the same base, so most of the error moves them together (common mode) and cancels when subtracted. If the common part is a fraction of , the relative error is . The fraction must be measured from real data; here we use assumed values to see the trend.

Example 1 Turning datasheet values into an error budget for the show

Use the datasheet figures: PVT has a CEP of 1.5 m and RTK has 0.01 m plus 1 ppm on a 2 km baseline (the base station is at the launch field). Convert them to , check with a simulation of 200,000 trials, find the probability that the relative position of a pair with independent errors is wrong by more than 5 cm, see the ppm term for baselines of 0.5 to 20 km, combine with the trajectory-tracking error of 0.10 m per axis from Module 4 (assumed), and finally look at the effect of common-mode error.

import numpy as np
# Convert datasheet CEP into a 95% radius and compare it with the spacing in use
k95 = np.sqrt(np.log(0.05) / np.log(0.5))               # R95 / CEP for a circular normal error
print(f"R95 = {k95:.4f} x CEP")

cases = {"standalone GNSS (CEP 1.5 m)": 1.5,
         "RTK, 2 km baseline (0.01 m + 1 ppm)": 0.01 + 1e-6 * 2000}   # values from one receiver datasheet, measured under stated conditions
rng = np.random.default_rng(1)
for name, cep in cases.items():
    sigma = cep / 1.17741                               # CEP = 1.17741 sigma per axis
    e = np.linalg.norm(rng.normal(0, sigma, (200000, 2)), axis=1)
    rel_sigma = np.sqrt(2) * sigma                      # a pair with independent errors (worst case)
    p_close = np.exp(-0.05 ** 2 / (2 * rel_sigma ** 2))  # chance the relative position is wrong by more than 5 cm
    print(f"{name:36s} R95 formula {k95 * cep:7.3f} m, simulated {np.percentile(e, 95):7.3f} m, P(pair error > 5 cm) = {p_close:.4f}")

# baseline length and the ppm term (the datasheet limits ppm to baselines up to 20 km)
for km in (0.5, 2, 5, 20):
    print(f"baseline {km:4.1f} km: ppm term {km * 1000 * 1e-6 * 1000:5.1f} mm")

# combined budget: GNSS plus controller tracking (assumed 0.10 m per axis)
sig_track = 0.10
for name, cep in cases.items():
    sig_gnss = cep / 1.17741
    total = np.hypot(sig_gnss, sig_track)
    print(f"{name:36s} per-axis sigma: GNSS {sig_gnss:.3f} m, tracking {sig_track:.3f} m, combined {total:.3f} m")

# Common mode: drones close together use corrections from the same base, so most of the error moves them together (the split is assumed)
sigma = 0.012 / 1.17741                                  # the RTK value above, per axis
for common in (0.0, 0.5, 0.8, 0.9):
    s_rel = np.sqrt(2 * (1 - common ** 2)) * sigma        # the common part (a fraction of sigma) cancels when positions are subtracted
    print(f"common-mode share {common:.1f}: relative sigma {s_rel * 1000:5.2f} mm, P(pair error > 5 cm) = {np.exp(-0.05 ** 2 / (2 * s_rel ** 2)):.2e}")
R95 = 2.0789 x CEP
standalone GNSS (CEP 1.5 m)          R95 formula   3.118 m, simulated   3.121 m, P(pair error > 5 cm) = 0.9996
RTK, 2 km baseline (0.01 m + 1 ppm)  R95 formula   0.025 m, simulated   0.025 m, P(pair error > 5 cm) = 0.0024
baseline  0.5 km: ppm term   0.5 mm
baseline  2.0 km: ppm term   2.0 mm
baseline  5.0 km: ppm term   5.0 mm
baseline 20.0 km: ppm term  20.0 mm
standalone GNSS (CEP 1.5 m)          per-axis sigma: GNSS 1.274 m, tracking 0.100 m, combined 1.278 m
RTK, 2 km baseline (0.01 m + 1 ppm)  per-axis sigma: GNSS 0.010 m, tracking 0.100 m, combined 0.101 m
common-mode share 0.0: relative sigma 14.41 mm, P(pair error > 5 cm) = 2.44e-03
common-mode share 0.5: relative sigma 12.48 mm, P(pair error > 5 cm) = 3.28e-04
common-mode share 0.8: relative sigma  8.65 mm, P(pair error > 5 cm) = 5.51e-08
common-mode share 0.9: relative sigma  6.28 mm, P(pair error > 5 cm) = 1.77e-14

For PVT, m and the simulation gives 3.121 m, matching the formula, and the probability that a pair is wrong by more than 5 cm is 0.9996, practically certain, so ordinary GNSS cannot be used at all. For RTK on a 2 km baseline the CEP is m, so m. The ppm term is small (2.0 mm at 2 km and 20 mm at 20 km). The combined position error with the 0.10 m tracking error is therefore dominated by tracking, not by GNSS (0.101 m against 0.100 m). If the errors of two drones were independent, the probability of a relative error above 5 cm would still be 0.24% per pair, which across tens of thousands of drone pairs is worrying, but when most of the error is common (a share of 0.8) it falls to . The conclusion is that the RTK error that really hurts is the part that is not shared, which comes from the antenna, reflections around the drone (multipath) and each drone’s loss of lock. Therefore the status of every drone must be checked, not the average.

The environment affects RTK more than the datasheet numbers suggest. Reflections from water and buildings cause multipath, and ionospheric scintillation is a serious hazard for an evening show. The white paper of the SBAS Ionospheric Working Group (2010) explains that scintillation is strong and frequent in regions near the equator, especially in the hours just after sunset, where signals can fade deeply and abruptly for hours, so that receivers lose lock or the carrier phase jumps (cycle slips). It depends on local time, season, longitude, magnetic activity and the 11-year solar cycle. The dual-frequency technique that reduces ionospheric delay error does not solve this problem. Thailand is at low latitudes, so an evening show must assume that RTK can degrade without warning: check the forecast for the day, monitor the fix status of every drone throughout the show, and have spare drones and decision rules set in advance (Module 5). The document dates from 2010 and its regional figures come from data of 1991 to 2000, so use it for the principle, not as a forecast.

The pre-flight GNSS gate and spare drones

Before take-off the operator must know which drones are ready. A GNSS receiver reports its solution type (fix type) and its estimated accuracy. MAVLink defines the codes, for example 3 for 3D, 5 for RTK float and 6 for RTK fixed (MAVLink Development Team, n.d.-a). A good gate uses several conditions together and does not just count satellites, because a receiver that sees many satellites but is still float, or that is using old correction data, is not accurate enough. The gate in this example checks three things: the fix must be RTK fixed, the horizontal accuracy the receiver reports must be at most 2 cm, and the age of the latest data must be at most 1 s (the team’s assumed criteria). PX4’s documentation also has an RTK section that explains these states (PX4 Autopilot, n.d.).

When the gate is strict some drones will fail it, so there must be enough spares. If each drone passes the gate independently with probability , the number passing out of is binomial, and we need the that makes the probability of at least drones passing (here ) not less than 99%. This number is very sensitive to the pass rate, which varies with the conditions of the night, as the previous section showed.

Example 2 The GNSS gate for 315 drones and the spares needed

The team simulates the data of 315 drones on a rehearsal night. Fix types are RTK fixed 98.5%, RTK float 1.0% and 3D 0.5%. The horizontal accuracy of fixed drones has a median of 1.1 cm, the satellite count is random between 22 and 32, and the data age is gamma-distributed with a mean of 240 ms (all simulated). Count the drones that pass and the reasons for failure, compare with looking at the satellite count alone, then find the total number of drones needed to be 99% sure that 300 pass the gate when the pass rate is 0.99, 0.97, 0.95 and 0.90.

import numpy as np
from scipy.stats import binom
# Pre-flight GNSS gate: count the drones that pass, then find the spares needed (all data simulated)
rng = np.random.default_rng(11)
n_fleet, n_need = 315, 300
fix = rng.choice(["RTK_FIXED", "RTK_FLOAT", "3D"], size=n_fleet, p=[0.985, 0.010, 0.005])
h_acc = np.where(fix == "RTK_FIXED", rng.lognormal(np.log(0.011), 0.30, n_fleet), rng.lognormal(np.log(0.15), 0.6, n_fleet))   # m, horizontal accuracy reported by the receiver
sats = rng.integers(22, 33, n_fleet)
age_ms = rng.gamma(2.0, 120.0, n_fleet)                  # age of the latest position data

ok = (fix == "RTK_FIXED") & (h_acc <= 0.02) & (age_ms <= 1000)
print("fix types:", {str(k): int(v) for k, v in zip(*np.unique(fix, return_counts=True))})
print(f"gate passed {ok.sum()} of {n_fleet}; satellites alone would have passed {(sats >= 18).sum()}")
print(f"failed: not RTK fixed {(fix != 'RTK_FIXED').sum()}, accuracy over 2 cm {((fix == 'RTK_FIXED') & (h_acc > 0.02)).sum()}, data older than 1 s {((fix == 'RTK_FIXED') & (h_acc <= 0.02) & (age_ms > 1000)).sum()}")   # why drones failed the gate
print(f"ready for show: {'YES' if ok.sum() >= n_need else 'NO'} (need {n_need}, spare in hand {ok.sum() - n_need})")

# how many spares make it 99% likely that 300 drones pass the gate
for p in (0.99, 0.97, 0.95, 0.90):
    n = n_need
    while binom.sf(n_need - 1, n, p) < 0.99:           # P(at least 300 pass out of n)
        n += 1
    print(f"pass rate {p:.2f}: fleet {n} (spares {n - n_need}, {100 * (n - n_need) / n_need:4.1f}%)")
print(f"fleet 315 at pass rate 0.97 gives P(at least 300 ready) = {binom.sf(n_need - 1, 315, 0.97):.4f}")
fix types: {'3D': 2, 'RTK_FIXED': 312, 'RTK_FLOAT': 1}
gate passed 307 of 315; satellites alone would have passed 315
failed: not RTK fixed 3, accuracy over 2 cm 5, data older than 1 s 0
ready for show: YES (need 300, spare in hand 7)
pass rate 0.99: fleet 308 (spares 8,  2.7%)
pass rate 0.97: fleet 317 (spares 17,  5.7%)
pass rate 0.95: fleet 326 (spares 26,  8.7%)
pass rate 0.90: fleet 348 (spares 48, 16.0%)
fleet 315 at pass rate 0.97 gives P(at least 300 ready) = 0.9700

In this simulated data 307 of 315 drones pass, 7 more than the 300 needed. Three drones fail because they are not RTK fixed and five because their accuracy is over 2 cm, whereas judging by the satellite count alone (at least 18) all 315 would pass, a seriously wrong assessment. The number of spares needed changes a great deal with the pass rate. At 0.99 the team needs 308 drones (8 spares, 2.7%), at 0.97 it needs 317, at 0.95 it needs 326 and at 0.90 it needs 348 (16% spares). Note that the 315 drones prepared since Module 1 (5% spares) give only 97.0% confidence when the pass rate is 0.97, below the 99% target. The team must decide beforehand whether to add spares or accept the risk of showing fewer drones, and must do it before the show day, not when the gate results appear on site.

Horizontal bar diagram of the pre-flight gate. The top blue bar is all 315 drones. The next bars show drones failing: not RTK fixed 3, accuracy over 2 centimetres 5, and data older than 1 second 0. The green bar is the 307 drones that pass. A dashed pink line at 300 drones marks the number needed, leaving 7 spare.
Figure 1 Result of the pre-flight GNSS gate for 315 drones in the simulated data

Time and synchronisation

A show needs two kinds of time. The first is common time, which every drone shares so that they start and change pictures together. The second is time that is accurate enough compared with speed, because a timing error at speed is a position error . The best approach is to use the clock of the GNSS system that the drones already carry. The Skybrush Live documentation states that outdoor drones synchronise their clocks precisely through their own GPS devices, and that if the clock of the computer showing the show start time is not right, the drones will not start according to the displayed clock, so the ground station computer’s clock must always be checked against an accurate source (CollMot Robotics, n.d.-a). The ZED-F9P-05B datasheet gives the time-pulse accuracy as 30 ns (RMS) and 60 ns (99%) (u-blox, 2024), and the GPS SPS performance standard gives a time-transfer error of at most 30 ns for 95% of the time (signal in space only) (U.S. Department of Defense, 2020).

When clocks must be compared over a network, use the principle of NTP (Mills et al., 2010), which estimates the offset from four timestamps. The drone sends a request at (drone clock), the server receives it at and replies at (server clock), and the drone receives the reply at (drone clock). The estimated offset is and the round-trip delay is . The formula assumes that the outbound and return delays are equal. If they are not, the offset error is , which cannot be removed using these four measurements alone. The MAVLink time-synchronisation service works on the same principle (MAVLink Development Team, n.d.-d).

A sequence diagram with two vertical lines, the left one the drone clock and the right one the server clock. An arrow from the drone to the server from t1 to t2 has an uplink delay of 3 milliseconds. An arrow from the server back to the drone from t3 to t4 has a downlink delay of 9 milliseconds. The server takes 1 millisecond to process. The server clock is really 12 milliseconds ahead of the drone. The formula estimates 9.0 milliseconds, an error of minus 3.0 milliseconds.
Figure 2 Estimating the clock offset from four timestamps when the outbound and return delays differ

After comparing clocks, the drone’s clock still drifts from true time because the circuit’s crystal does not run exactly. The error is expressed in ppm (parts per million). After seconds since the last comparison the clock is off by seconds, which matters when a drone must follow time with no new comparison, for example through a whole 480 s show.

Example 3 Clock offset, asymmetric delay and clock drift

The server clock runs 12 ms ahead of the drone clock, the uplink delay is 3 ms, the downlink delay is 9 ms and the processing time is 1 ms (assumed). Estimate the offset with the four timestamps. Compare the error of averaging 40 rounds with random delays (the downlink is busier) with choosing the round with the shortest round trip. Calculate the position error at 6 m/s from 50 and 20 ppm crystal clocks and a 2 ppm TCXO after 480 s without comparison, and find the clock accuracy needed to keep the error under 5 cm.

import numpy as np
# Time: (1) estimate clock offset from four timestamps, (2) clock drift and the position error it causes (assumed values)
theta_true = 0.012                                       # s, the server clock leads the drone by 12 ms
d_up, d_down, proc = 0.003, 0.009, 0.001                 # s: uplink delay, downlink delay and processing time
t1 = 0.0                                                 # drone sends the request (drone clock)
t2 = t1 + theta_true + d_up                              # server receives (server clock)
t3 = t2 + proc                                           # server replies
t4 = t3 - theta_true + d_down                            # drone receives (drone clock)
theta = ((t2 - t1) + (t3 - t4)) / 2                      # NTP offset formula (RFC 5905)
delay = (t4 - t1) - (t3 - t2)
print(f"estimated offset {theta * 1000:.1f} ms (true {theta_true * 1000:.1f}), error {(theta - theta_true) * 1000:+.1f} ms = -(down - up)/2 = {-(d_down - d_up) / 2 * 1000:+.1f} ms")
print(f"round-trip delay {delay * 1000:.1f} ms = up + down {(d_up + d_down) * 1000:.1f} ms")

# repeat 40 times with random delays: average all vs keep the shortest round trip
rng = np.random.default_rng(5)
up = 0.002 + rng.exponential(0.002, 40)
down = 0.002 + rng.exponential(0.006, 40)               # the downlink is busier
t2s = t1 + theta_true + up
t3s = t2s + proc
t4s = t3s - theta_true + down
off = ((t2s - t1) + (t3s - t4s)) / 2
rtt = (t4s - t1) - (t3s - t2s)
best = np.argmin(rtt)
print(f"mean of 40 offsets error {(off.mean() - theta_true) * 1000:+.2f} ms; shortest round trip ({rtt[best] * 1000:.1f} ms) error {(off[best] - theta_true) * 1000:+.2f} ms")

# clock drift: error 480 s after the last sync at 6 m/s
t_since, v = 480.0, 6.0
for name, ppm in (("crystal 50 ppm", 50), ("crystal 20 ppm", 20), ("TCXO 2 ppm", 2)):
    err = ppm * 1e-6 * t_since
    print(f"{name:15s} drift {err * 1000:5.2f} ms -> position error {err * v * 100:5.2f} cm at {v:.0f} m/s")
allowed_pos = 0.05
print(f"allowed time error for {allowed_pos * 100:.0f} cm at {v:.0f} m/s: {allowed_pos / v * 1000:.2f} ms -> clock must hold {allowed_pos / v / t_since * 1e6:.1f} ppm over {t_since:.0f} s")
print(f"GPS pulse-per-second at 60 ns (99%): {60e-9 * v * 1e6:.2f} micrometres of position error at {v:.0f} m/s; LED frame at 30 fps lasts {1000 / 30:.1f} ms")
estimated offset 9.0 ms (true 12.0), error -3.0 ms = -(down - up)/2 = -3.0 ms
round-trip delay 12.0 ms = up + down 12.0 ms
mean of 40 offsets error -2.65 ms; shortest round trip (4.1 ms) error -0.01 ms
crystal 50 ppm  drift 24.00 ms -> position error 14.40 cm at 6 m/s
crystal 20 ppm  drift  9.60 ms -> position error  5.76 cm at 6 m/s
TCXO 2 ppm      drift  0.96 ms -> position error  0.58 cm at 6 m/s
allowed time error for 5 cm at 6 m/s: 8.33 ms -> clock must hold 17.4 ppm over 480 s
GPS pulse-per-second at 60 ns (99%): 0.36 micrometres of position error at 6 m/s; LED frame at 30 fps lasts 33.3 ms

The four timestamps give an offset of 9.0 ms against the true 12.0 ms, an error of −3.0 ms, which equals as the formula says. The round-trip delay is 12.0 ms, exactly the sum of uplink and downlink (3 + 9). Averaging 40 rounds does not help (the error stays at −2.65 ms) because the asymmetry is a systematic error that does not average away, but choosing the round with the shortest round trip (4.1 ms) cuts the error to −0.01 ms, because on that round the channel was not congested and the two delays were close. For clock drift at 480 s and 6 m/s, a 50 ppm crystal drifts 24.0 ms, a position error of 14.4 cm, far over the 5 cm target. A 20 ppm crystal gives 5.76 cm, still slightly over, and a 2 ppm TCXO gives only 0.58 cm. The criterion is that the timing error must not exceed ms, which needs a clock that holds 17.4 ppm over 480 s. The GPS pulse at 60 ns gives a position error of only 0.36 micrometres at 6 m/s, negligible, compared with one light frame at 30 frames per second, which lasts 33.3 ms. The conclusion is to tie the start time and the plan clock to each drone’s GPS clock instead of comparing clocks over the network or relying on an ordinary crystal.

Bar chart of position error at 6 metres per second after 480 seconds without comparison. The 50 ppm crystal gives 14.40 centimetres in pink, the 20 ppm crystal gives 5.76 centimetres in orange and the 2 ppm TCXO gives 0.58 centimetres in green. A dashed vertical line at 5 centimetres is the target.
Figure 3 Position error from clock drift over 480 seconds at 6 metres per second

Fleet communication

The fleet has hundreds of drones on one radio channel, so the main questions are what data must be sent, how often, and whether the channel can carry it. A MAVLink 2 frame has a 10-byte header and a 2-byte CRC, plus an optional 13-byte signature for authentication when enabled (MAVLink Development Team, n.d.-b, n.d.-c). The payload sizes of the commonly used messages, as defined in the standard message set (MAVLink Development Team, n.d.-a), are 53 bytes for SET_POSITION_TARGET_GLOBAL_INT, 28 for GLOBAL_POSITION_INT, 9 for HEARTBEAT, 33 for COMMAND_LONG and 182 for GPS_RTCM_DATA (180 bytes of correction data). The capacity of a channel and its usable share depend on the radio chosen and the radio environment; the example uses assumed values.

Two design options give very different loads. The first streams target points live to every drone at a regular rate. The second uploads the whole plan to the drones beforehand on the ground, then starts it with a single command, and during the show sends only slow status and the RTK corrections, broadcast to every drone at once. The Skybrush Live documentation implicitly recommends the second structure, with a Wi-Fi router that is not connected to the internet for security, a 192.168.0.0/24 subnet for at most 250 drones (addresses .1 to .250) and the router at .251, while an optional independent secondary link uses a 433, 868 or 900 MHz radio according to local regulation (CollMot Robotics, n.d.-a). In Thailand the usable frequency bands must follow the NBTC notification in force, which for general drone use is currently the 2020 notification allowing 433.05 to 434.79 MHz, 2400 to 2500 MHz and 5725 to 5850 MHz (NBTC, n.d., 2021). The 868 and 900 MHz figures in foreign documents therefore cannot be applied to a Thai event automatically, and the 2026 draft that has been proposed is not confirmed to be in force (check the notification in force each time; Module 5 returns to this).

Example 4 Live streaming versus upload-and-trigger on one channel for 300 drones

A shared radio channel of 250 kbps is 50% usable (assumed), which is 125 kbps, for a fleet of 300 drones. Compare the load of (a) streaming SET_POSITION_TARGET_GLOBAL_INT to every drone 4 times a second, unsigned and signed, (b) status reports of HEARTBEAT once a second plus position once a second or every 5 seconds, (c) RTK corrections of 1,200 bytes per second broadcast to all, and (d) uploading the plan beforehand and triggering the start. Find the fastest position report rate that keeps the channel at 70% or less, the number of repeats of the broadcast start command needed for all 300 drones to receive at least one copy with 99.9% probability when each copy is lost with probability 5%, and the upload time of the plan files (480 points per drone, 6 float32 values per point).

import math
# Radio load: live streaming against store-and-trigger (frame sizes follow MAVLink 2, other values assumed)
OVERHEAD, SIGN = 12, 13                                  # bytes: 10 header + 2 CRC, and the optional 13-byte signature
payload = {"SET_POSITION_TARGET_GLOBAL_INT": 53, "GLOBAL_POSITION_INT": 28, "HEARTBEAT": 9, "COMMAND_LONG": 33, "GPS_RTCM_DATA": 182}
capacity_kbps, efficiency = 250.0, 0.5                   # one radio channel shared by the fleet, and the usable fraction (assumed)
usable = capacity_kbps * efficiency

def kbps(msg, rate_hz, n_senders=1, signed=False, repeat=1):
    frame = payload[msg] + OVERHEAD + (SIGN if signed else 0)
    return frame * 8 * rate_hz * n_senders * repeat / 1000

n = 300
live = kbps("SET_POSITION_TARGET_GLOBAL_INT", 4, n)     # a setpoint to every drone 4 times a second
live_signed = kbps("SET_POSITION_TARGET_GLOBAL_INT", 4, n, signed=True)
hb = kbps("HEARTBEAT", 1, n)                             # one heartbeat per drone per second, used to detect lost links
telem_fast = hb + kbps("GLOBAL_POSITION_INT", 1, n)      # position every second
telem_slow = hb + kbps("GLOBAL_POSITION_INT", 0.2, n)    # position every 5 seconds
rtcm_bytes_per_s = 1200                                  # RTK correction bytes per second (assumed)
rtcm = kbps("GPS_RTCM_DATA", math.ceil(rtcm_bytes_per_s / 180))    # one base, broadcast to all
print(f"usable capacity {usable:.0f} kbps")
print(f"live setpoints 4 Hz : {live:6.1f} kbps unsigned, {live_signed:6.1f} kbps signed -> {100 * live / usable:4.0f}% / {100 * live_signed / usable:4.0f}% of usable")
print(f"telemetry, 1 Hz pos : {telem_fast:6.1f} kbps -> {100 * telem_fast / usable:4.0f}%")
print(f"telemetry, 0.2 Hz   : {telem_slow:6.1f} kbps -> {100 * telem_slow / usable:4.0f}%")
print(f"RTK corrections     : {rtcm:6.1f} kbps (one broadcast for all drones) -> {100 * rtcm / usable:4.0f}%")
print(f"store-and-trigger   : slow telemetry + RTK = {telem_slow + rtcm:6.1f} kbps -> {100 * (telem_slow + rtcm) / usable:4.0f}%; the start command is one frame of {payload['COMMAND_LONG'] + OVERHEAD} bytes")
rate = 0.05
while hb + kbps("GLOBAL_POSITION_INT", rate + 0.05, n) + rtcm <= 0.70 * usable:
    rate += 0.05
print(f"fastest position report that keeps the channel at 70% or less: {rate:.2f} Hz")

# broadcast the start command k times: chance all 300 receive at least one copy (losses assumed independent)
loss = 0.05
for k in range(1, 7):
    p_all = (1 - loss ** k) ** n
    print(f"repeat {k}: P(all {n} receive) = {p_all:.5f}")
k_need = next(k for k in range(1, 20) if (1 - loss ** k) ** n >= 0.999)
print(f"repeats for 99.9%: {k_need}")

# Upload the show plan on the ground in advance: one file per drone = a sample every 1 s, 3 position and 3 colour values as float32 (protocol headers ignored)
file_bytes = 480 * 6 * 4
total_mb = n * file_bytes / 1e6
print(f"per-drone file {file_bytes / 1000:.1f} kB, all {n} drones {total_mb:.2f} MB, upload on the {usable:.0f} kbps channel takes {total_mb * 8e3 / usable:.0f} s ({total_mb * 8e3 / usable / 60:.1f} min)")
usable capacity 125 kbps
live setpoints 4 Hz :  624.0 kbps unsigned,  748.8 kbps signed ->  499% /  599% of usable
telemetry, 1 Hz pos :  146.4 kbps ->  117%
telemetry, 0.2 Hz   :   69.6 kbps ->   56%
RTK corrections     :   10.9 kbps (one broadcast for all drones) ->    9%
store-and-trigger   : slow telemetry + RTK =   80.5 kbps ->   64%; the start command is one frame of 45 bytes
fastest position report that keeps the channel at 70% or less: 0.25 Hz
repeat 1: P(all 300 receive) = 0.00000
repeat 2: P(all 300 receive) = 0.47192
repeat 3: P(all 300 receive) = 0.96319
repeat 4: P(all 300 receive) = 0.99813
repeat 5: P(all 300 receive) = 0.99991
repeat 6: P(all 300 receive) = 1.00000
repeats for 99.9%: 5
per-drone file 11.5 kB, all 300 drones 3.46 MB, upload on the 125 kbps channel takes 221 s (3.7 min)

Streaming target points live 4 times a second to 300 drones needs 624.0 kbps, or 499% of the usable channel (749 kbps or 599% if signed), which is impossible on one channel. Even status reports with position once a second use 117%. Reducing to every 5 seconds uses 56%, and the broadcast RTK corrections use only 9% (10.9 kbps) because they are sent once to every drone. Uploading the plan and triggering the start uses 64% in total, and the start command is a single 45-byte frame. The fastest position report that keeps the channel at 70% or less is 0.25 Hz, once every 4 seconds. The broadcast start command can be repeated because it is a single frame. Sent once, the probability that all 300 drones receive it is practically zero (), two sends give 47.2%, three give 96.3% and five are needed to reach 99.9%. Uploading the plan on the ground uses an 11.5 kB file per drone, 3.46 MB in all, taking 221 s or 3.7 minutes on this channel, acceptable because it is done in advance. Three conclusions follow. First, a fleet this size must fly a stored plan and be started by time, not commanded live. Second, data that must reach every drone should be broadcast and repeated. Third, the capacity of the channel is a design constraint, which can be solved with several channels or time slotting, but must be calculated before choosing radios.

Horizontal bar chart of channel load as a percentage of the 125 kilobit per second usable channel. Live signed command streaming 599 percent, live unsigned streaming 499, position report every second 117, upload plan then trigger 64, position report every 5 seconds 56, and broadcast RTK corrections 9. A dashed vertical line at 100 percent is the channel limit.
Figure 4 Load of the shared radio channel for 300 drones with different communication methods

Data security matters too. A start or cancel command sent as a broadcast must not be forgeable. The MAVLink 2 signature adds 13 bytes per frame and so adds load, as the example shows, which makes it suitable for infrequent frames such as the start and cancel commands rather than for streaming to the whole fleet (MAVLink Development Team, n.d.-b). Finally, it must be decided beforehand what each drone does when the link is lost. A flight controller has failsafe options to choose from (ArduPilot Dev Team, n.d.), but ordering the whole fleet to return to its launch point along straight lines at the same time is dangerous, because most show drones do not avoid each other. The Skybrush Live documentation therefore has a tool for planning a collective return-to-home that prepares collision-free routes in advance (CollMot Robotics, n.d.-a), which is the subject of Module 5.

Synchronising lights with music: timecode and latency

Most shows run to music, so a colour change must land on the beat. Two clocks meet here. The drones follow a show clock tied to GPS time, as in the previous sections, while the sound system plays the music. The bridge between them is timecode, a label on every frame of an audio or video programme in hours, minutes, seconds and frames. MIDI Time Code (MTC) carries this label over MIDI at 24, 25 or 30 frames per second (30 with or without drop-frame). While the music runs it sends quarter-frame messages, four per frame, each carrying one piece of the time. Eight of them are needed for the complete time, so the full time is updated only every two frames, and when the last piece arrives the time is already two frames old, which the receiver must compensate. The specification notes that at 30 frames per second the 120 quarter-frame messages per second correspond to a maximum latency of 8.3 ms (MIDI Manufacturers Association, n.d.).

In Skybrush Live the start time of the show can refer either to local time or to “SMPTE timecode”, the second only when a MIDI timecode device is connected to Skybrush Server (CollMot Robotics, n.d.-a). The server reads timecode from standard timing equipment that appears to the computer as a MIDI device; it does not decode raw MTC signals itself, and the configuration example sets max_allowed_drift_in_frames to 3 (CollMot Robotics, n.d.-b). At 25 frames per second three frames are 120 ms, so the frame rate and this tolerance are part of the timing budget, not a detail.

The second source of delay is in the air. Light from a drone 250 m away arrives in under a microsecond, but sound travels at , with and J/(kg·K) for dry air and in kelvin. HyperPhysics lists 331.5 m/s at 0 °C and 344 m/s at 20 °C (Nave, n.d.), so every 35 m or so between a loudspeaker and a listener adds about 0.1 s. How much does that matter? ITU-R Recommendation BT.1359 gives the average thresholds from subjective tests: a timing difference between sound and picture is detectable beyond about +45 ms (sound early) or −125 ms (sound late), and it becomes unacceptable beyond about +90 ms or −185 ms (International Telecommunication Union [ITU], 1998). A light show is not television, but the eye and ear judging “is the flash on the beat” are the same, so the recommendation is a reasonable starting target. A show can delay its light program against the music by a fixed offset , so that what is seen and heard meets in the middle of the audience.

Example 5 Timecode, the speed of sound and the light offset for one audience area

The music timecode runs at 25 frames per second, and the evening air is 29 °C (assumed). The audience sits 20 m to 100 m from the loudspeakers (assumed). Find the timecode resolution, the speed of sound, the distance at which an uncorrected sound lag becomes detectable and unacceptable, and an offset that keeps every seat inside the ITU acceptability window.

import math
# Lights and music: timecode resolution, travel time of sound and the light offset (assumed values)
FPS = 25                                   # timecode frame rate of the show audio (assumed)
frame_ms = 1000 / FPS
print(f"1 frame = {frame_ms:.0f} ms; quarter frame = {frame_ms / 4:.0f} ms; full time assembled after 8 quarter frames = {2 * frame_ms:.0f} ms old")
print(f"drift of 3 frames = {3 * frame_ms:.0f} ms")

T_C = 29.0                                 # air temperature on a Thai evening (assumed)
c = math.sqrt(1.4 * 287.05 * (T_C + 273.15))   # a = sqrt(gamma R T)
print(f"speed of sound at {T_C:.0f} C = {c:.1f} m/s; light crosses 250 m in {250 / 3e8 * 1e6:.2f} us")

DETECT, ACCEPT_LATE, ACCEPT_EARLY = -125, -185, 90     # ms, ITU-R BT.1359 (negative = sound late)
print(f"no offset: sound lag detectable beyond {-DETECT / 1000 * c:.1f} m, unacceptable beyond {-ACCEPT_LATE / 1000 * c:.1f} m from the speakers")

s_near, s_far = 20, 100                    # m, nearest and farthest seats from the speakers (assumed)
lag_near, lag_far = s_near / c * 1000, s_far / c * 1000
print(f"sound lag {lag_near:.0f} ms (front) to {lag_far:.0f} ms (back), spread {lag_far - lag_near:.0f} ms")
lo, hi = lag_far + ACCEPT_LATE, lag_near + ACCEPT_EARLY   # offset that keeps both ends acceptable
tau = round((lo + hi) / 2)
print(f"light offset must lie in {lo:.0f} to {hi:.0f} ms; choose {tau} ms")
print(f"with {tau} ms: front {tau - lag_near:+.0f} ms (sound early), back {tau - lag_far:+.0f} ms (sound late)")
print(f"seats inside the detectability window: {max(0, (tau - 45) / 1000 * c):.0f} to {(tau - DETECT) / 1000 * c:.0f} m")
1 frame = 40 ms; quarter frame = 10 ms; full time assembled after 8 quarter frames = 80 ms old
drift of 3 frames = 120 ms
speed of sound at 29 C = 348.5 m/s; light crosses 250 m in 0.83 us
no offset: sound lag detectable beyond 43.6 m, unacceptable beyond 64.5 m from the speakers
sound lag 57 ms (front) to 287 ms (back), spread 230 ms
light offset must lie in 102 to 147 ms; choose 125 ms
with 125 ms: front +68 ms (sound early), back -162 ms (sound late)
seats inside the detectability window: 28 to 87 m

One frame lasts 40 ms and a quarter frame 10 ms, but the complete time arrives 80 ms old, so a receiver that forgets the two-frame correction makes every light change 80 ms late. A drift tolerance of three frames is 120 ms, almost the whole −125 ms detectability limit, so the team should know how the equipment reacts when the drift approaches it and should test it at rehearsal. Sound travels at 348.5 m/s on this evening, while light crosses 250 m in 0.83 µs, so without an offset the lag is detectable for anyone more than 43.6 m from the speakers and unacceptable beyond 64.5 m. Across the audience area the lag runs from 57 ms at the front to 287 ms at the back, a spread of 230 ms. That is wider than the detectability window of 170 ms but narrower than the acceptability window of 275 ms, so one offset can satisfy everyone at the acceptable level. The offset must lie between 102 and 147 ms; choosing 125 ms gives +68 ms (sound slightly early) at the front and −162 ms at the back, both acceptable, and seats from 28 m to 87 m are inside the detectability window. Compared with these numbers the GPS clock error of the drones (Example 3) is negligible, so the real budget lies in the timecode chain and in where the audience sits. A deeper audience needs a second row of loudspeakers further back, fed with sound delayed to match.

Module lab

Lab: measure position, time and communication load of a small system (stationary field work, no drone flight)

  1. Set up an RTK GNSS receiver (or use a correction service the university has) in an open place and near a building or water. Record fix type, reported accuracy, satellite count and data age every second for 30 minutes. Make at least one session in the evening after sunset.
  2. Calculate the CEP and from the recorded data relative to the mean position, compare them with the datasheet values of the receiver, and report the difference with an explanation.
  3. Write the gate of Example 2 and run it on the recorded data, then calculate the pass rate in each period and the number of spare units needed to be 99% sure that 50 pass.
  4. Measure the round-trip delay between two computers over the network used in the lab (for example the room’s Wi-Fi), at least 200 rounds. Estimate the offset as in Example 3 and compare averaging all rounds with choosing the shortest round trip.
  5. Using the message sizes and rates of an assumed system with 50 to 100 drones, calculate the channel load as in Example 4 and choose a communication method with reasons.
  6. Submit a one-page report saying which numbers were measured and which were assumed.

Safety: this lab involves no flight. Use only receivers and computers. If you transmit radio, use only authorised equipment on frequency bands the law allows, and do not interfere with others.

Common mistakes

Watch out

  • Checking readiness by satellite count alone, without checking the fix type, the reported accuracy and the data age
  • Using the CEP as a safe error, when a CEP covers only 50% of measurements and must be converted to 95% or higher
  • Believing the RTK errors of two drones are independent, or that they cancel completely, when the common-mode share must be measured from real data
  • Estimating the number of spares by feel, instead of calculating it from the gate’s pass rate and the confidence needed
  • Comparing clocks over a network and believing the error is zero, when asymmetric delay causes a systematic error
  • Letting crystal clocks run free through the show, without tying them to GPS time
  • Designing live command streaming to every drone on one channel, without calculating the channel load first or deciding beforehand what happens when the link is lost

Summary

  • RTK gives centimetre-level accuracy ( in one datasheet). Reading a datasheet means checking the measurement conditions and converting CEP to .
  • What matters for collisions is the relative error. The common-mode error of drones using the same corrections cancels to a large extent, the rest comes from the antenna and multipath, and in the evening at low latitudes ionospheric scintillation can degrade RTK without warning.
  • The pre-flight gate must look at fix type, reported accuracy and data age, not satellite count, and the number of spares is calculated from the pass rate with the binomial distribution.
  • Timing error equals position error times speed. Asymmetric delay makes network clock comparison systematically wrong, crystal clocks can drift several centimetres in 480 s, so use GPS time.
  • A shared radio channel cannot carry live streaming to 300 drones. Uploading the plan and triggering the start cuts the load greatly, commands to every drone should be broadcast and repeated, and what happens when the link is lost must be decided beforehand.

Self-check questions

  1. A datasheet gives RTK as 0.01 m plus 1 ppm. For a baseline of 10 km, what is the CEP and what is the 95% radius?
  2. At least 300 drones must pass the gate with 99% confidence when the pass rate is 0.95. How many drones are needed in total?
  3. The drone sends a request at , the server receives it at ms and replies at ms, and the drone receives it at ms (the server clock is really 15 ms ahead of the drone). What are the estimated offset and its error?
  4. A 30 ppm crystal clock, 600 s after the last comparison, with a drone flying at 5 m/s. How many centimetres is the position off?
  5. 200 drones each send GLOBAL_POSITION_INT every 2 seconds and HEARTBEAT once a second (use the frame sizes given in the lesson, unsigned). The usable channel is 125 kbps. What is the load in kbps and in percent?
Answers
  1. CEP m, and the 95% radius m
  2. From the binomial calculation, first holds at drones (26 spares)
  3. ms against the true 15 ms, an error of ms, equal to with ms and ms
  4. Timing error ms, position error m cm
  5. A GLOBAL_POSITION_INT frame is bytes bits, at 0.5 Hz that is 160 bits per second per drone. A HEARTBEAT frame is bytes bits per second. Together 328 bits per second per drone, times 200 drones is 65.6 kbps, which is

Key formulas

95% radius from CEP for a circular normal error
Relative error of two drones with a common-mode share c of sigma
Drones needed so that at least m pass the gate with 99% confidence
Clock offset and round-trip delay from four timestamps
Position error from timing error
Load of a shared communication channel
Probability that every drone receives the start command at least once when it is sent k times
Speed of sound and the sound lag that a light offset must cover

Key references

  1. u-blox. (2024). ZED-F9P-05B high precision GNSS module: Data sheet (UBXDOC-963802114-12824, R02). link
  2. U.S. Department of Defense. (2020). Global Positioning System standard positioning service performance standard (5th ed.). link
  3. SBAS Ionospheric Working Group. (2010). Effect of ionospheric scintillations on GNSS: A white paper. link
  4. Huang, J., Tian, G., Zhang, J., & Chen, Y. (2021). On unmanned aerial vehicles light show systems: Algorithms, software and hardware. Applied Sciences, 11(16), Article 7687. link
  5. CollMot Robotics. Skybrush Live documentation. link
  6. Mills, D., Martin, J. (Ed.), Burbank, J., & Kasch, W. (2010). Network Time Protocol version 4: Protocol and algorithms specification (RFC 5905). RFC Editor. link
  7. MAVLink Development Team. MAVLink common message set (common.xml). link
  8. MAVLink Development Team. Message signing (authentication). MAVLink developer guide. link
  9. MAVLink Development Team. Packet serialization. MAVLink developer guide. link
  10. MAVLink Development Team. Time synchronization protocol v2. MAVLink developer guide. link
  11. PX4 Autopilot. RTK GNSS (GPS). PX4 user guide (main). link
  12. สำนักงาน กสทช. ประกาศและแนวปฏิบัติการขึ้นทะเบียนเครื่องวิทยุคมนาคมสำหรับอากาศยานไร้คนขับ (ตรวจสอบฉบับปัจจุบันก่อนใช้สอน). link
  13. สำนักงาน กสทช. (2564). ประกาศสำนักงาน กสทช. เรื่อง การยื่นคำขอขึ้นทะเบียนเครื่องวิทยุคมนาคมสำหรับอากาศยานซึ่งไม่มีนักบิน สำหรับใช้งานเป็นการทั่วไป. link
  14. ArduPilot Dev Team. GCS failsafe. ArduPilot Copter documentation. link
  15. MIDI Manufacturers Association. (n.d.). MIDI time code (RP-004/RP-008, Doc. 4.2.1) [Specification]. The MIDI Association. link
  16. CollMot Robotics. (n.d.). Setup guide for MIDI time code support. Skybrush Server documentation. link
  17. Nave, C. R. (n.d.). Speed of sound. HyperPhysics, Georgia State University. link
  18. International Telecommunication Union. (1998). Relative timing of sound and vision for broadcasting (Recommendation ITU-R BT.1359-1). 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: Control, autopilot and navigation · Mission planning, flight and simulation · Automation, robotics and swarms · Communications, networks and IoT · Law, safety and risk