Teaching pack · UAT 322
A 15-week teaching plan, 5 worksheets, a scoring rubric and a map from the course description to the lessons, for instructors to evaluate and adapt before teaching.
Coverage of the course description
The lessons fully teach 8 of 8 description topics. Each topic lists the modules and lesson sections that teach it, and incomplete topics say what is missing.
| Description topic | Modules | Where it is taught | Status |
|---|---|---|---|
| Configuration of autopilots, navigation and autonomous missions | M1M2M5 | Module 1: A clear division of work, Directions must agree, and When the companion computer falls silent (COM_OF_LOSS_T) · Module 2: The EKF in the flight controller · Module 5: The test ladder and the autonomous survey mission | Covered |
| Integration of sensors and perception systems | M2M3 | Module 2: The Kalman filter and Calibrating camera and IMU · Module 3: range sensors and Avoidance in the flight controller | Covered |
| Real-time data processing | M1M4 | Module 1: The latency budget · Module 4: Measuring latency properly and Example 2 FP32 versus INT8 at a 30 fps budget | Covered |
| Deployment of AI models | M4 | Module 4: From model to board, Quantization and The model card | Covered |
| Path planning and obstacle avoidance | M3 | Module 3: Occupancy grids and A*, Can it stop in time? and Avoidance in the flight controller | Covered |
| Simulation | M1M2M3M5 | Module 1: PX4 SITL with Gazebo and ROS 2 · Module 2: simulated GNSS loss · Module 3: Collision Prevention in SITL · Module 5: 30 SITL runs with random wind and obstacles | Covered |
| Ground and field testing | M4M5 | Module 4: benchmarking the model on the real board · Module 5: The test ladder, Before flying for real, and testing in a cage or controlled area | Covered |
| Performance evaluation of intelligent systems | M2M3M4M5 | Module 2: RMSE and test ratios · Module 3: SLAM and trajectory evaluation (ATE RMSE) · Module 4: accuracy before and after quantization and p95 · Module 5: How many runs are enough? and Run-time assurance | Covered |
Weekly teaching plan
| Week | Topic | Pre-class | Lecture | Lab | Evidence |
|---|---|---|---|---|---|
| 1 M1 | Dividing work between flight controller and companion computer | Read module 1 'Why this matters' and 'A clear division of work' | What stays on the flight controller, what runs on the companion, and the uXRCE-DDS bridge | Worksheet 1 part A: install PX4 SITL, Gazebo and ROS 2 at the documented versions, run MicroXRCEAgent and check PX4 topics | Lab notebook with software versions and visible topics |
| 2 M1 | ENU versus NED frames and Offboard mode | Read 'Directions must agree'; run Example 1 | Converting targets between frames and why setpoints must stream before entering Offboard | Worksheet 1 part B: write a node that streams setpoints and commands a hover at an ENU target converted to NED | Node code and a log showing the hover at the target |
| 3 M1 | Companion silence and the latency budget | Read 'When the companion computer falls silent' and 'The latency budget'; run Example 2; take the module 1 quiz | COM_OF_LOSS_T and splitting the command-path latency budget | Worksheet 1 part C: stop the node mid-flight, measure when PX4 leaves Offboard, and time the command path with timestamps on both sides | Offboard-exit and latency table in the notebook, and quiz result |
| 4 M2 | The Kalman filter | Read module 2 'The Kalman filter'; run Example 1 | Predict, correct, noise R and the measurement gate | Worksheet 2 part A: change R and gate in Example 1 one at a time; record effects on RMSE and rejections | Parameter-sweep table in the notebook |
| 5 M2 | The EKF in the flight controller | Read 'The EKF in the flight controller' | EKF2 test ratios and what a value near 1 means | Worksheet 2 part B: hover in SITL, plot test ratios, simulate GNSS loss and observe status and mode changes | Test-ratio plots and GNSS-loss event notes |
| 6 M2 | Calibrating camera and IMU | Read 'Calibrating camera and IMU'; take the module 2 quiz | Camera intrinsics, reprojection RMSE and checking on a fresh image set | Worksheet 2 part C: photograph the target with the onboard camera, calibrate with OpenCV or Kalibr and check on new images | Calibration with reprojection RMSE, and quiz result |
| 7 M3 | Occupancy grids and A* | Read module 3 'Occupancy grids and A*'; run Example 1 | Heuristics, obstacle inflation and narrow gaps | Worksheet 3 part A: add a narrow gap, try 0, 1 and 2 cells of inflation, record when the path changes or fails | Path plots for each case in the notebook |
| 8 M3 | Stopping distance and avoidance in the flight controller | Read 'Can it stop in time?' and 'Avoidance in the flight controller' | Stopping distance from speed, latency and deceleration; PX4 Collision Prevention | Worksheet 3 part B: enable Collision Prevention in SITL, set CP_DIST, fly at a wall and compare the real stopping point with the formula | Real against calculated stopping distance at several speeds |
| 9 M3 | SLAM and trajectory evaluation | Read 'SLAM and trajectory evaluation'; take the module 3 quiz | ATE RMSE and aligning trajectories before comparison | Worksheet 3 part C: compute ATE RMSE from the lecturer's trajectory set and conclude the safe top speed for the training drone's sensor | ATE RMSE with alignment method, speed conclusion with assumptions, and quiz result |
| 10 M4 | From model to board | Read module 4 'From model to board' | ONNX and checking outputs match the original model | Worksheet 4 part A: export the UAT 315 detector to ONNX and compare outputs with the original on the same images | Output comparison table |
| 11 M4 | Quantization | Read 'Quantization'; run Example 1 | FP32 to INT8, calibration data and the effect on accuracy | Worksheet 4 part B: static quantization with ONNX Runtime using real-work images for calibration; evaluate accuracy before and after | FP32 versus INT8 accuracy table |
| 12 M4 | Measuring latency properly and the model card | Read 'Measuring latency properly' and 'The model card'; run Example 2; take the module 4 quiz | Model-only versus end-to-end, warm-up, p95 and stop criteria | Worksheet 4 part C: time 400 runs after warm-up on the real board, compute p95, log temperature and power, and write the model card | CSV, p95 result, one-page model card, and quiz result |
| 13 M5 | The test ladder and test plan | Read module 5 'The test ladder' and 'How many runs are enough?'; run Example 1 | Five stages from simulation to field, pass criteria set before testing, and confidence intervals on success rates | Worksheet 5 part A: combine modules 1–4 into one mission and write the five-stage test plan with abnormal cases | Test plan signed off by the lecturer before testing |
| 14 M5 | Run-time assurance and repeated SITL testing | Read 'Run-time assurance' and 'Before flying for real'; run Example 2; take the module 5 quiz | A monitor ahead of the geofence and the pre-field checklist | Worksheet 5 part B: at least 30 SITL runs with random wind and obstacles, add the monitor and test a hung companion | 30-run results with confidence interval, and quiz result |
| 15 M5 | Practical examination: autonomous mission in a controlled area | Complete the pre-field checklist and the lab notebook | Practical exam criteria and safety briefing | Practical exam: fly the mission in a cage or controlled area under supervision with a safety pilot, then report whether it is ready for the next stage | Practical result, report and lab notebook, scored with the rubric |
Worksheets and instructor guide
One worksheet per module. Students open it on the web, print it or download the .docx. The instructor guide under each worksheet gives the class timing, expected results, discussion questions and notes for students with different backgrounds.
1Worksheet 1 Connecting a companion computer to PX4 SITL
Lab · About 12 h of class time · CLO1, CLO3
Objective: Link ROS 2 to PX4 over uXRCE-DDS, command an Offboard hover in the right frame, and measure behaviour on command loss and real latency
Equipment
- Linux computer with PX4 SITL, Gazebo and ROS 2 at the documented versions
- MicroXRCEAgent
- Example code at /downloads/uat-322/
- Lab notebook
Safety
- Simulation only; no real flights
- Never run Offboard code on a real drone before it passes simulation
Steps
- Install the software at the versions PX4 specifies; record every version
- Run MicroXRCEAgent udp4 -p 8888 and check position and status topics appear in ROS 2
- Write a node that streams setpoints before switching into Offboard
- Command a hover at an ENU target converted to NED with Example 1
- Stop the node mid-flight; measure from the log when PX4 left Offboard and compare with COM_OF_LOSS_T
- Measure the command-path latency with timestamps on both sides and record it
Deliverables
- Lab notebook with software versions
- ROS 2 node code
- Offboard-exit timing against the parameter
- Latency against the budget
Checklist
- Table 1 has all 3 targets, down is negative for targets above the ground, and yaw is converted as 90° minus ENU yaw
- Table 2 has at least 3 runs and states the COM_OF_LOSS_T actually set and the mode after leaving Offboard
- Table 3 reports both median and p95 in ms and says which clock the timestamps came from
- The lab notebook records the versions of PX4, ROS 2, px4_msgs, Gazebo and MicroXRCEAgent
- The node-stop test was done in SITL only, and the code streams setpoints before every switch into Offboard
Instructor guide
Class timing
- Objectives, review of the division of work, ENU and NED frames, and safety rules60 min
- Install PX4 SITL, Gazebo, ROS 2 and MicroXRCEAgent; record versions180 min
- Write the setpoint node, switch into Offboard and hover at the targets (Table 1)180 min
- Stop the node mid-flight and read the Offboard exit time from the log (Table 2)120 min
- Measure command-path latency (Table 3)120 min
- Wrap-up, questions and hand-in checklist60 min
Expected results
- Table 1 (using Example 1's target): ENU (10, 5, 3) m must be sent as NED (5, 10, -3) m; ENU yaw 0° becomes NED 90°, 90° becomes 0°, 180° becomes -90°, 45° stays 45°. The real hover position in the log should settle within about 0.5 m of the setpoint in windless SITL. A z of +3 means the sign was not flipped; axes swapped back mean a double conversion.
- Table 2: PX4 should leave Offboard a little after commands have been missing for longer than COM_OF_LOSS_T (default 1.0 s). The lesson's Example 2 gives 1.05 s (stopped at 3.0 s, detected at 4.05 s). Accept measured values of about 1.0-1.3 s depending on the check period and log rate. Much longer means checking that the node really stopped or that no other node is still publishing. The mode after exit follows COM_OBL_RC_ACT (Position by default).
- Table 3: in SITL on one computer the DDS segment is usually only a few milliseconds, close to the 4 ms assumed in the lesson budget. The lesson's total is 33 + 45 + 12 + 4 + 3 = 97 ms, so at 5 m/s the drone moves 0.485 m (about 0.48 m) before reacting. Both median and p95 must be given; a single value or a manufacturer figure needs correcting.
- Unconverted, PX4 reads (10, 5, 3) as north 10 m, east 5 m and down 3 m: the wrong direction, and 3 m below the take-off point, so it can hit the ground. A strong answer notes that this mistake raises no error, so the real position in the log must always be checked.
- Slightly longer (Example 2 gives 1.05 s), because the gap must first exceed the threshold and is then caught at the next check. Meanwhile the drone keeps following the last setpoint; at 5 m/s it travels about 5 × 1.05 = 5.25 m before the failsafe acts (about 2.1 m at 2 m/s). A strong answer links this to the clearance from obstacles that must be allowed.
- In the lesson budget the detector takes longest (45 of 97 ms), so it should be shortened first, for example with a smaller image or quantization in module 4. SITL on one computer has no real link and no camera or model load on a small board, so its figures are lower than the real board's; latency must be measured again on the real hardware.
- The companion computer can hang or crash, just like the node we stopped on purpose. Once the node stops, nothing on the companion computer can act any more; only the flight controller is still running and leaves Offboard on its own after COM_OF_LOSS_T. A strong answer says the flight controller must keep failsafe authority whatever the companion computer commands.
Discussion questions
- If COM_OF_LOSS_T is raised to 5 s so Offboard drops less often, what do we gain and what do we lose?
- Some libraries already convert ENU to NED. How do we check that we have not converted twice?
- Between uXRCE-DDS and MAVLink, which should the team choose for our training drone, and why?
Adapting to student background
- Upper secondary (M.6)
- Have them convert the targets and yaw by hand on paper before running code, then explain with an axis sketch why ENU yaw is anticlockwise from east and NED yaw clockwise from north.
- Vocational certificate
- Provide a ready install script and example node; focus on watching the drone in Gazebo against the target, and use a ready-made axis table instead of the formula.
- Diploma
- Extension: build the same node over MAVLink (MAVSDK or MAVROS) and compare latency and command-loss behaviour with uXRCE-DDS.
2Worksheet 2 Reading the EKF from logs and calibrating a camera
Lab · About 12 h of class time · CLO1
Objective: Understand filter parameters, read EKF2 status from logs including GNSS loss, and calibrate the onboard camera verifiably
Equipment
- Computer with Python, PX4 SITL and a log viewer
- The training drone's onboard camera
- Calibration target (checkerboard or AprilGrid)
- OpenCV or Kalibr
- Lab notebook
Safety
- Simulation and bench work; no real flights
- Remove the training drone's battery or propellers while capturing calibration images
Steps
- Vary R and gate in Example 1 one at a time; record RMSE and rejections
- Hover in SITL, open the log and plot GNSS, baro and mag test ratios
- Mark periods where the ratios approach 1
- Simulate GNSS loss; observe EKF2 status and mode changes
- Photograph the target with the onboard camera, calibrate and report reprojection RMSE with its definition
- Check on a new image set; record versions and all settings
Deliverables
- R and gate sweep table
- Annotated test-ratio plots
- GNSS-loss event notes
- Calibration file with reprojection RMSE on both image sets
Checklist
- Table 1 has at least 3 values of R and 4 of gate, changed one at a time, with a row for the lesson's baseline (1.5 m, gate 5)
- The test-ratio plots cover all three sources, with labelled axes and units, and mark the periods near 1
- Table 2 includes the GNSS-loss event with its time, EKF2 status and the mode change
- Table 3 has RMSE for both the calibration set and the new image set, with the definition used
- The notebook records versions, settings and target size; battery or propellers were removed while capturing images
Instructor guide
Class timing
- Objectives; review of the predict-update loop and the test ratio60 min
- Sweep R and gate in Example 1 one at a time (Table 1)150 min
- Hover in SITL, read the log and plot test ratios150 min
- Simulate GNSS loss and record the response (Table 2)120 min
- Capture target images, calibrate and check on a new set (Table 3)180 min
- Wrap-up, questions and hand-in checklist60 min
Expected results
- Table 1 (Example 1 code, seed 348, one change at a time): the baseline, 1.5 m std and gate 5, gives RMSE 0.69 m with 1 rejection (at 6 s, test ratio 8.06); R from 0.5 m gives 1.47 m with 19 rejections; R from 5.0 m gives 1.29 m with 0 rejections; gate 2 gives 1.03 m with 10 rejections; gate 3 gives 0.69 m with 1 rejection (ratio 22.39); gate 10 gives 0.69 m with 1 rejection (ratio 2.02); gate 30 gives 1.26 m with 0 rejections. Values must match to two decimals if the seed is unchanged.
- Table 2: in a normal SITL hover every source's test ratio should stay clearly below 1; any period near 1 is usually at take-off or during attitude changes. When GNSS is lost, EKF2 must stop using GNSS, show a warning or a status that position is unreliable, and the drone leaves position-dependent modes according to the failsafe settings. Exact messages and times depend on the PX4 version, so students must quote their own log.
- Table 3: there is no fixed value, since it depends on the camera and lens. If the lesson's example is used, residuals (3, 4), (-1, 2), (0, -2), (2, 1) px give 3.12 px per point or 2.21 px per component. The new set should be close to or slightly above the calibration set; much higher means the result does not generalise (too few images, too little variety in angles). The definition, image resolution, lens, distortion model and target size must be stated.
- With R too small (0.5 m) the filter expects GNSS to be very accurate, so S is small: as many as 19 good fixes are rejected, and the accepted ones pull the estimate after the noise, so RMSE worsens from 0.69 to 1.47 m. A strong answer links this to the mistake of setting R smaller than reality so the filter chases noise.
- Gate 30 rejects nothing, so the +25 m fix gets in and drags the estimate: RMSE rises from 0.69 to 1.26 m. Gate 2 is too narrow and rejects 10 good fixes (1.03 m), so the gate must be balanced. EKF2_GPS_P_GATE defaults to 5 standard deviations and should not be widened just to make warnings disappear.
- A test ratio near 1 means the measurement differs from the filter's expectation almost enough to be rejected, a warning that the sensor or its settings have a problem. When GNSS is lost, EKF2 stops fusing GNSS, position uncertainty grows, and the drone changes mode according to the failsafe. A strong answer quotes times and messages from the student's own log.
- Both are right if they state the definition: 3.12 px divides by the number of points (as OpenCV calibrateCamera does), 2.21 px by the number of components (2n), so numbers without a definition cannot be compared. For the new image set, a strong answer says that close values mean the calibration generalises, and a much higher value means capturing more images from more varied angles.
Discussion questions
- If GNSS reflects under a bridge and jumps 20 m, how do a filter without a gate and one with a gate differ in practice?
- Before enabling EKF2_EV_CTRL to fuse VIO position, what must we check?
- Why can Q and R that work well on synthetic data not be used on a real drone straight away?
Adapting to student background
- Upper secondary (M.6)
- Have them compute one test ratio and Kalman gain by hand from y, P and R first, then explain why K falls as R rises.
- Vocational certificate
- Give a Table 1 with prepared cells, change one number in the code at a time, and focus on capturing the target from every angle themselves.
- Diploma
- Extension: calibrate camera and IMU with Kalibr to get both extrinsics and time offset, and report quality with the test conditions.
3Worksheet 3 Obstacle avoidance in SITL
Lab · About 12 h of class time · CLO1, CLO3
Objective: Plan paths with A*, test PX4 avoidance, compare stopping distance with theory, evaluate a trajectory and conclude a safe speed
Equipment
- Computer with Python and PX4 SITL with a simulated range sensor
- Module 3 example code
- Trajectory data set from the lecturer
- Lab notebook
Safety
- Simulation only; no real flights
- The concluded speed is a proposal only and must pass the test ladder before real use
Steps
- Add a narrow gap to the Example 1 map; try 0, 1 and 2 cells of inflation
- Record when the path changes or cannot be found
- Enable Collision Prevention in SITL, set CP_DIST and fly at a wall in Position mode
- Record the real stopping point at several speeds
- Vary speed and latency in the stopping formula and compare with SITL
- Compute ATE RMSE from the trajectory set, explain the alignment, and conclude the highest safe speed with assumptions
Deliverables
- A* path plots for each case
- Real against formula stopping distances
- ATE RMSE and alignment method
- Safe-speed conclusion with assumptions
Checklist
- Table 1 has both the original and the gap map at 0, 1 and 2 cells of inflation, with a path plot for each case
- Table 2 has at least 3 speeds, states the CP_DIST set (not the default -1) and units in every column
- ATE RMSE is reported with the alignment method and number of poses used
- The speed conclusion lists all assumptions and says it is a proposal that must pass the test ladder before real use
Instructor guide
Class timing
- Objectives; review of A*, inflation and the stopping formula60 min
- Build the gap map and try 0, 1 and 2 cells of inflation (Table 1)150 min
- Set up Collision Prevention in SITL and fly at a wall at several speeds (Table 2)210 min
- Compare SITL results with the stopping formula90 min
- Compute ATE RMSE and write the safe-speed conclusion150 min
- Wrap-up, questions and hand-in checklist60 min
Expected results
- Table 1: the lesson's Example 1 map (start (6, 1), goal (2, 10)) gives 13 m with 39 cells expanded at 0 inflation; 17 m with 56 expanded at 1 cell (matching the lesson); and no path at 2 cells, because the goal falls inside the inflation of the column-9 obstacle. If the lab uses a gap map with a wall in column 7 open from row 3: a gap of 1-2 cells passes only at 0 inflation; 3-4 cells pass up to 1 cell of inflation; 5 cells pass up to 2. When passable the length is 13 m. Students' own maps must follow the same rule.
- Table 2 (formula with the lesson's 0.25 s latency and 3 m/s² braking): 2 m/s gives 1.17 m; 3 m/s 2.25 m; 4 m/s 3.67 m; 5 m/s 1.25 + 4.17 = 5.42 m; 6 m/s 7.50 m. With 0.5 s latency: 1.67, 3.00, 4.67, 6.67 and 9.00 m. In SITL, Collision Prevention limits speed on approach, so the drone should stop about CP_DIST from the wall, not much closer. If the drone does not slow at all, check that CP_DIST is set (the default -1 means disabled), that it is in Position mode, and that the simulated sensor is publishing.
- Text: with the lesson's example data, per-pose errors of 0, 0.14, 0.22, 0.28, 0.36 and 0.50 m give ATE RMSE 0.297 m and a final error of 0.50 m, with no alignment needed because both already share a frame. With the lecturer's data set the alignment method must be stated. Speed conclusion: 8 m sensor range, 0.25 s latency and 3 m/s² braking give at most 6.22 m/s; with a 2 m margin (using 6 m) 5.30 m/s. A strong answer proposes less than this and lists every assumption.
- After inflation a gap of w cells keeps w - 2r free cells, and at least 1 must remain, so w ≥ 2r + 1: with 1 cell of inflation the gap must be at least 3 cells, with 2 cells at least 5, matching Table 1. A strong answer says a gap the map cannot pass is a gap the real drone should not attempt.
- The formula assumes full braking right after the latency, but Collision Prevention slows the drone before CP_DIST, so it usually stops further away than the formula predicts from the starting speed. The remaining difference comes from the real sensor and system latency and the simulated drone's real deceleration. A strong answer explains with the numbers in its own table.
- At 0.25 s it is 6.22 m/s; at 0.5 s it drops to 5.59 m/s, a fall of 0.63 m/s. Extra margin is still needed for wind, position error and objects the sensor may not see, such as power lines, glass and thin branches.
- ATE RMSE is the root-mean-square distance between estimated and true positions along the path. Error that grows with distance (for example 0.50 m at the end) is the signature of drift. The alignment must be stated because different alignments give different numbers from the same data, so results cannot be compared without it.
Discussion questions
- If the flight controller's avoidance works well in SITL, can we conclude the drone will not collide in real work?
- More inflation is safer, but what do we lose, and how should we choose the value?
- For a survey under a bridge with no GNSS, how can ATE help decide whether the map is usable?
Adapting to student background
- Upper secondary (M.6)
- Have them derive the maximum-speed formula from the quadratic stopping equation and explain why Manhattan distance never overestimates with four-way moves.
- Vocational certificate
- Have them draw the map on grid paper and shade the inflated cells by hand before running code, and compute stopping distance with a calculator part by part (latency distance plus braking distance).
- Diploma
- Extension: smooth the A* path before sending it as setpoints, fly it in SITL and compare the clearance from obstacles with the original right-angle path.
4Worksheet 4 Measuring a detector on the real board
Lab · About 12 h of class time · CLO2
Objective: Deploy a detector on the companion computer, measure quantization's effect on accuracy and time, and produce a model card
Equipment
- The lab's companion computer board
- Detector from UAT 315
- ONNX Runtime
- Real-work images for calibration and evaluation
- Board temperature and power monitoring
- Lab notebook
Safety
- Bench work; no flying
- The board can get hot under sustained load; fit a heatsink or fan and do not touch it running
- Use images without identifiable outsiders, or with permission
Steps
- Export to ONNX and check outputs match the original on the same images
- Apply static quantization with ONNX Runtime using real-work calibration images
- Evaluate accuracy before and after quantization
- On the real board, warm up at least 10 runs then time model-only and end-to-end over 400 runs to CSV
- Compute p95 with Example 2 against the per-frame budget; record temperature and power
- Write a one-page model card with stop criteria
Deliverables
- ONNX versus original output table
- FP32 versus INT8 accuracy table
- CSV and p95 against the budget
- One-page model card
Checklist
- Table 1 has rows for the original, ONNX FP32 and INT8, using the same metric and evaluation images in every row
- Table 2 was measured after at least 10 warm-up runs over 400 runs, with the CSV attached and nearest-rank p95
- Table 3 has temperature and power at least 3 times, and a heatsink or fan was fitted during the test
- The one-page model card has version and provenance, test conditions, results, limitations, and stop and rollback criteria
Instructor guide
Class timing
- Objectives; review of model-to-board steps, quantization and p9560 min
- Export to ONNX and check outputs match the original120 min
- Static quantization and accuracy before and after (Table 1)150 min
- Time on the real board with temperature and power (Tables 2 and 3)210 min
- Compute p95 against the budget and write the model card120 min
- Wrap-up, questions and hand-in checklist60 min
Expected results
- Table 1: ONNX FP32 should match the original almost exactly, with differences at rounding level and the same detection boxes; a clear difference means a faulty export (for example mismatched preprocessing). INT8 accuracy usually drops slightly; the real value depends on the UAT 315 model. The lesson gives no accuracy figures, so check the consistency of the method and compare with the group's stop criterion. Example 1 confirms the principle: scale 0.01795, zero-point 130, largest weight error 0.00896, no more than the half step 0.00897, and memory from 4000 to 1000 bytes.
- Table 2: if the board behaves like the lesson's Example 2 (400 simulated frames): FP32 inference median 40.8 ms, end-to-end mean 49.8 ms, p95 73.5 ms, 90% over the 33.3 ms budget, 0.59 m at 8 m/s; INT8 median 17.7 ms, mean 25.3 ms, p95 36.1 ms, 10% over budget, 0.29 m. Real board values will differ, but INT8 should be clearly faster than FP32, and p95 must always be above the mean.
- Table 3: there is no fixed value; it depends on the board and cooling. What must be seen is a complete record at every time point, and if the board gets hot enough to slow down, later times will be longer and that must be reported honestly.
- If results are close to Example 2, INT8 has p95 36.1 ms, slightly over the 33.3 ms budget, with about 10% of frames late. The lesson's options are a smaller image, fewer frames (for example 25 fps with a 40 ms budget or 20 fps with 50 ms), or accepting it and adding safety distance. A strong answer weighs accuracy after quantization as well.
- The mean hides unusually slow frames, and inference excludes preprocessing and postprocessing. In Example 2, INT8 inference has a median of 17.7 ms but end-to-end p95 is 36.1 ms, about double; looking only at the median suggests an easy pass. The time the drone is really blind is end to end.
- It depends on the group's model. A strong answer reports before and after with the same metric on the same real-work images, split by condition (daylight, dusk, haze) where possible, and sets a clear numeric stop criterion, for example rolling back to the previous version if field accuracy falls below the agreed threshold.
- TOPS is a theoretical peak (the 67 TOPS of the Jetson Orin Nano Super is an INT8 sparse figure) and says nothing about our model's speed. A PC differs from the onboard board in processor, memory and cooling. The figures used for decisions must come from measuring the real model on the real board.
Discussion questions
- If INT8 is fast enough but loses much accuracy at dusk, how should the team decide?
- Who should approve the stop criteria in the model card, and why?
- If the board gets hot and slows down after 20 minutes, how should we report the results honestly?
Adapting to student background
- Upper secondary (M.6)
- Have them compute scale, zero-point and the real value from q by hand using the practice questions, then explain why the error per value is at most half a step.
- Vocational certificate
- Provide ready timing and p95 scripts; focus on connecting the board, fitting the heatsink, reading temperature and power, and finding p95 by sorting values in a spreadsheet.
- Diploma
- Extension: try one smaller image size, or TensorRT if the board supports it, and add rows to Tables 1 and 2 to choose the version that best balances speed and accuracy.
5Worksheet 5 A complete autonomous survey mission
Lab · About 12 h of class time · CLO2, CLO3
Objective: Integrate the course's systems into an autonomous mission, test up the ladder from simulation to a controlled area, and judge readiness with statistical evidence
Equipment
- PX4 SITL with random wind and obstacles
- Training drone with companion computer, camera and range sensor
- Flight cage or controlled area
- Safety pilot's transmitter ready to take over
- Module 5 example code
- Lab notebook
Safety
- Real flights only in a cage or controlled area under the lecturer's control, within CAAT conditions and visual line of sight
- A safety pilot ready to take over on every flight; geofence and failsafes set before flight
- Do not move up the ladder until the previous stage meets its pre-written criteria
- Charge batteries in a fire-resistant bag or box, attended
Steps
- Combine modules 1–4 into a mission: take off, survey, avoid obstacles and return to land
- Write the five-stage test plan with measurable pass criteria before testing, and an abnormal-case list
- Run at least 30 SITL tests with random wind and obstacle positions
- Add a monitor like Example 2 and test a hung companion computer
- Test in a cage or controlled area under supervision with a safety pilot
- Report success rates with confidence intervals per stage, failures, fixes and a readiness conclusion
Deliverables
- Approved five-stage test plan
- 30-run SITL results with confidence intervals
- Logs and notes from the controlled-area tests
- Readiness report and completed lab notebook
Checklist
- Table 1 has a numeric pass criterion for all five stages, with every approval date before its test date
- Table 2 has at least 30 SITL runs, and every stage has a 95% confidence interval with its method
- Table 3 includes a hung companion computer and at least one case with changed latency or braking
- Every cage or controlled-area flight had a safety pilot, geofence and failsafes set before flight, and attached logs
- The readiness report records every failure honestly and concludes which stage the system is ready for
Instructor guide
Class timing
- Objectives; review of the test ladder, confidence intervals, RTA and real-flight safety rules60 min
- Integrate modules 1-4 into a mission and write the five-stage plan for approval (Table 1)150 min
- Run at least 30 SITL tests with random wind and obstacles180 min
- Add the monitor and test a hung companion computer (Table 3)120 min
- Test in a cage or controlled area with a safety pilot150 min
- Compute confidence intervals (Table 2), write the readiness report and run the hand-in checklist60 min
Expected results
- Table 1: criteria must be measurable and written before results are seen, for example all 30 of 30 SITL runs succeed (no failure, which meets the 29-in-a-row rule) with no geofence breach, the monitor switches in every test, and abnormal cases include at least a hung companion computer, GNSS loss, control-link loss and low battery. Criteria like 'flies well' are not accepted. Stages not yet tested (such as the full mission under a permit) must be marked as not yet tested.
- Table 2 (Clopper-Pearson binomtest as in Example 1): the lesson's SITL 48/50 = 96% with interval [86%, 100%] (upper bound 99.5%); HITL 19/20 = 95% [75%, 100%]; field 11/12 = 92% [62%, 100%]. If the group gets SITL 30/30 the interval is [88.4%, 100%]; 29/30 gives 96.7% [82.8%, 99.9%]; 27/30 gives 90.0% [73.5%, 97.9%]. All intervals are two-sided, the binomtest default. Check that the same method is used and rounding is correct.
- Table 3: Example 2's baseline (geofence 100 m, 5 m margin, 0.3 s latency, 2.5 m/s² braking, start 80 m at 4 m/s) switches at 2.0 s at 89.0 m and 5.0 m/s, stops at 93.8 m with 6.2 m left; with 0.6 s latency it switches earlier at 1.7 s (87.6 m, 4.8 m/s), stops at 92.0 m with 8.0 m left; with 1.5 m/s² braking it switches at 1.5 s (86.6 m, 4.7 m/s), stops at 93.9 m with 6.1 m left. The hung-companion case must show the flight controller leaving Offboard by its failsafe, with its own geofence still active.
- If SITL is 30/30 with no failure, it meets the 29-in-a-row rule, so the group can claim at least 90% success with 95% confidence, because that rule uses a one-sided lower bound (0.05^(1/30) ≈ 90.5%); the lower end of the two-sided interval that binomtest prints is 88.4%, below 90%. The two values are on different sides and must not be compared with each other; to compare with 90% use alternative='greater'. With even one failure (29/30, two-sided lower bound 82.8%, one-sided 85.1%) the claim cannot yet be made and more tests are needed. A strong answer says this holds for SITL conditions only.
- The controlled-area stage has far fewer runs, so its lower bound is lower: 11/12 gives about 62% against about 86% for SITL 48/50, even though the success rates look similar. High field reliability cannot yet be claimed; the pre-written criteria must be met before the next stage, and more flights should be planned.
- More latency or weaker braking makes the computed stopping distance longer, so the monitor switches earlier (1.7 s and 1.5 s against 2.0 s) and still stops before the 95 m margin line (92.0 and 93.9 m), as long as the values used in the monitor match reality or are more conservative. If the monitor assumes better values than reality it switches too late. The lesson's practice question 3 shows that at 90 m and 5 m/s the drone stops at 96 m, only 1 m before the 97 m line.
- When the companion computer hangs, a monitor running on the same computer may hang too. The layers still working are the flight controller, which leaves Offboard when commands are missing longer than COM_OF_LOSS_T, the geofence and failsafes inside the flight controller, and finally the safety pilot. A strong answer explains the protection as layers and cites results from Table 3.
Discussion questions
- If one of 12 field runs fails because of strong wind, should that run count, and how should the test plan change?
- How complex should the monitor be, and why is simplicity a safety advantage?
- Before moving from the cage to a larger real area, what evidence and documents are needed?
Adapting to student background
- Upper secondary (M.6)
- Have them compute the zero-failure run counts with logarithms for 90% and 95% targets, and explain a confidence interval in their own words.
- Vocational certificate
- Provide a ready confidence-interval script and focus on roles in real testing, such as pre-flight checks, setting the geofence and practising the take-over switch in the cage.
- Diploma
- Extension: add a HITL stage with the real board before the cage test, and add low-battery and control-link-loss cases to Table 3.
Scoring rubric
For worksheets and the mini-project. Each criterion scores level (1–4) ÷ 4 × weight.
| Criterion | Weight | Excellent (4) | Good (3) | Fair (2) | Needs work (1) |
|---|---|---|---|---|---|
| System integration and technical correctness | 30% | Works end to end; frames, parameters and links correct; every setting explained | Works end to end with minor flaws | Partly working | Does not work |
| Measurement and performance evaluation | 25% | Latency, accuracy, ATE and success rate measured properly, with confidence intervals and criteria | All measured; some statistics missing | Incomplete or flawed measurement | No measurement evidence |
| Safety and test discipline | 25% | Criteria written first, ladder climbed one stage at a time, failsafes and geofence set, safety pilot every time | Complete with occasional reminders | Skipped stages or set criteria after seeing results | Unsafe testing |
| Lab notebook and reports | 20% | Versions, settings and results recorded weekly and reproducible; clear reports honest about failures | Nearly complete records | Several weeks missing or not reproducible | No notebook |
Assessment map: CLOs and how they are assessed Draft
The CLOs are a web-team draft; the course owner sets the final ones (curriculum book, part 4). This table is built from the worksheet and module-quiz data, so it follows any change to the CLOs.