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.

Last updated: · 3(1-4-4) · Per week: lecture 1 h, lab 4 h, self-study 4 h; 75 contact hours per term

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 topicModulesWhere it is taughtStatus
Configuration of autopilots, navigation and autonomous missionsM1M2M5Module 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 missionCovered
Integration of sensors and perception systemsM2M3Module 2: The Kalman filter and Calibrating camera and IMU · Module 3: range sensors and Avoidance in the flight controllerCovered
Real-time data processingM1M4Module 1: The latency budget · Module 4: Measuring latency properly and Example 2 FP32 versus INT8 at a 30 fps budgetCovered
Deployment of AI modelsM4Module 4: From model to board, Quantization and The model cardCovered
Path planning and obstacle avoidanceM3Module 3: Occupancy grids and A*, Can it stop in time? and Avoidance in the flight controllerCovered
SimulationM1M2M3M5Module 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 obstaclesCovered
Ground and field testingM4M5Module 4: benchmarking the model on the real board · Module 5: The test ladder, Before flying for real, and testing in a cage or controlled areaCovered
Performance evaluation of intelligent systemsM2M3M4M5Module 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 assuranceCovered

Weekly teaching plan

WeekTopicPre-classLectureLabEvidence
1 M1Dividing work between flight controller and companion computerRead 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 bridgeWorksheet 1 part A: install PX4 SITL, Gazebo and ROS 2 at the documented versions, run MicroXRCEAgent and check PX4 topicsLab notebook with software versions and visible topics
2 M1ENU versus NED frames and Offboard modeRead 'Directions must agree'; run Example 1Converting targets between frames and why setpoints must stream before entering OffboardWorksheet 1 part B: write a node that streams setpoints and commands a hover at an ENU target converted to NEDNode code and a log showing the hover at the target
3 M1Companion silence and the latency budgetRead 'When the companion computer falls silent' and 'The latency budget'; run Example 2; take the module 1 quizCOM_OF_LOSS_T and splitting the command-path latency budgetWorksheet 1 part C: stop the node mid-flight, measure when PX4 leaves Offboard, and time the command path with timestamps on both sidesOffboard-exit and latency table in the notebook, and quiz result
4 M2The Kalman filterRead module 2 'The Kalman filter'; run Example 1Predict, correct, noise R and the measurement gateWorksheet 2 part A: change R and gate in Example 1 one at a time; record effects on RMSE and rejectionsParameter-sweep table in the notebook
5 M2The EKF in the flight controllerRead 'The EKF in the flight controller'EKF2 test ratios and what a value near 1 meansWorksheet 2 part B: hover in SITL, plot test ratios, simulate GNSS loss and observe status and mode changesTest-ratio plots and GNSS-loss event notes
6 M2Calibrating camera and IMURead 'Calibrating camera and IMU'; take the module 2 quizCamera intrinsics, reprojection RMSE and checking on a fresh image setWorksheet 2 part C: photograph the target with the onboard camera, calibrate with OpenCV or Kalibr and check on new imagesCalibration with reprojection RMSE, and quiz result
7 M3Occupancy grids and A*Read module 3 'Occupancy grids and A*'; run Example 1Heuristics, obstacle inflation and narrow gapsWorksheet 3 part A: add a narrow gap, try 0, 1 and 2 cells of inflation, record when the path changes or failsPath plots for each case in the notebook
8 M3Stopping distance and avoidance in the flight controllerRead 'Can it stop in time?' and 'Avoidance in the flight controller'Stopping distance from speed, latency and deceleration; PX4 Collision PreventionWorksheet 3 part B: enable Collision Prevention in SITL, set CP_DIST, fly at a wall and compare the real stopping point with the formulaReal against calculated stopping distance at several speeds
9 M3SLAM and trajectory evaluationRead 'SLAM and trajectory evaluation'; take the module 3 quizATE RMSE and aligning trajectories before comparisonWorksheet 3 part C: compute ATE RMSE from the lecturer's trajectory set and conclude the safe top speed for the training drone's sensorATE RMSE with alignment method, speed conclusion with assumptions, and quiz result
10 M4From model to boardRead module 4 'From model to board'ONNX and checking outputs match the original modelWorksheet 4 part A: export the UAT 315 detector to ONNX and compare outputs with the original on the same imagesOutput comparison table
11 M4QuantizationRead 'Quantization'; run Example 1FP32 to INT8, calibration data and the effect on accuracyWorksheet 4 part B: static quantization with ONNX Runtime using real-work images for calibration; evaluate accuracy before and afterFP32 versus INT8 accuracy table
12 M4Measuring latency properly and the model cardRead 'Measuring latency properly' and 'The model card'; run Example 2; take the module 4 quizModel-only versus end-to-end, warm-up, p95 and stop criteriaWorksheet 4 part C: time 400 runs after warm-up on the real board, compute p95, log temperature and power, and write the model cardCSV, p95 result, one-page model card, and quiz result
13 M5The test ladder and test planRead module 5 'The test ladder' and 'How many runs are enough?'; run Example 1Five stages from simulation to field, pass criteria set before testing, and confidence intervals on success ratesWorksheet 5 part A: combine modules 1–4 into one mission and write the five-stage test plan with abnormal casesTest plan signed off by the lecturer before testing
14 M5Run-time assurance and repeated SITL testingRead 'Run-time assurance' and 'Before flying for real'; run Example 2; take the module 5 quizA monitor ahead of the geofence and the pre-field checklistWorksheet 5 part B: at least 30 SITL runs with random wind and obstacles, add the monitor and test a hung companion30-run results with confidence interval, and quiz result
15 M5Practical examination: autonomous mission in a controlled areaComplete the pre-field checklist and the lab notebookPractical exam criteria and safety briefingPractical 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 stagePractical 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

  1. Install the software at the versions PX4 specifies; record every version
  2. Run MicroXRCEAgent udp4 -p 8888 and check position and status topics appear in ROS 2
  3. Write a node that streams setpoints before switching into Offboard
  4. Command a hover at an ENU target converted to NED with Example 1
  5. Stop the node mid-flight; measure from the log when PX4 left Offboard and compare with COM_OF_LOSS_T
  6. 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 (System integration and technical correctness)
  • Table 2 has at least 3 runs and states the COM_OF_LOSS_T actually set and the mode after leaving Offboard (Measurement and performance evaluation)
  • Table 3 reports both median and p95 in ms and says which clock the timestamps came from (Measurement and performance evaluation)
  • The lab notebook records the versions of PX4, ROS 2, px4_msgs, Gazebo and MicroXRCEAgent (Lab notebook and reports)
  • The node-stop test was done in SITL only, and the code streams setpoints before every switch into Offboard (Safety and test discipline)

Instructor guide

Class timing 720 min

  1. Objectives, review of the division of work, ENU and NED frames, and safety rules60 min
  2. Install PX4 SITL, Gazebo, ROS 2 and MicroXRCEAgent; record versions180 min
  3. Write the setpoint node, switch into Offboard and hover at the targets (Table 1)180 min
  4. Stop the node mid-flight and read the Offboard exit time from the log (Table 2)120 min
  5. Measure command-path latency (Table 3)120 min
  6. Wrap-up, questions and hand-in checklist60 min

Expected results

  1. Record: Table 1 ENU targets converted to NED and the real hover position in SITLTable 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.
  2. Record: Table 2 Stopping the node mid-flightTable 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).
  3. Record: Table 3 Command-path latency against the budgetTable 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.
  4. Question 1: If you forgot to convert the ENU target (10, 5, 3) and sent it straight to PX4, where would the drone try to go, and why is that dangerous? Use your Table 1 results.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.
  5. Question 2: From Table 2, was the time without commands before PX4 left Offboard longer or shorter than COM_OF_LOSS_T, and what did the drone do in that time? If it were flying at 5 m/s, how far would it travel?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.
  6. Question 3: Compare the latency you measured in Table 3 with the lesson's 97 ms budget. Which stage should be shortened first, and why can SITL figures on one computer not stand in for the real board?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.
  7. Question 4: Why must the failsafe for lost commands live in the flight controller and not in a node on the companion computer? Refer to what you saw when you stopped the node.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.

Common student mistakes: Common mistakes in the module 1 lesson

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

  1. Vary R and gate in Example 1 one at a time; record RMSE and rejections
  2. Hover in SITL, open the log and plot GNSS, baro and mag test ratios
  3. Mark periods where the ratios approach 1
  4. Simulate GNSS loss; observe EKF2 status and mode changes
  5. Photograph the target with the onboard camera, calibrate and report reprojection RMSE with its definition
  6. 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) (Measurement and performance evaluation)
  • The test-ratio plots cover all three sources, with labelled axes and units, and mark the periods near 1 (Measurement and performance evaluation)
  • Table 2 includes the GNSS-loss event with its time, EKF2 status and the mode change (System integration and technical correctness)
  • Table 3 has RMSE for both the calibration set and the new image set, with the definition used (Measurement and performance evaluation)
  • The notebook records versions, settings and target size; battery or propellers were removed while capturing images (Lab notebook and reports)

Instructor guide

Class timing 720 min

  1. Objectives; review of the predict-update loop and the test ratio60 min
  2. Sweep R and gate in Example 1 one at a time (Table 1)150 min
  3. Hover in SITL, read the log and plot test ratios150 min
  4. Simulate GNSS loss and record the response (Table 2)120 min
  5. Capture target images, calibrate and check on a new set (Table 3)180 min
  6. Wrap-up, questions and hand-in checklist60 min

Expected results

  1. Record: Table 1 Sweeping R and gate in Example 1 (one at a time)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.
  2. Record: Table 2 Events from the EKF2 log in SITL (normal hover and GNSS loss)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.
  3. Record: Table 3 Camera calibration resultsTable 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.
  4. Question 1: From Table 1, when R is set smaller than reality (trusting GNSS too much), how do the number of rejected fixes and the RMSE change? Explain why.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.
  5. Question 2: When the gate is widened until nothing is rejected, how does the RMSE change, and what does this say about setting EKF2_GPS_P_GATE on a real drone?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.
  6. Question 3: In Table 2, what does a test ratio approaching 1 mean, and how did EKF2 and the drone respond when GNSS was lost?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.
  7. Question 4: In Table 3, how different is the RMSE on the new image set from the calibration set? If another team reports 2.21 px from the same residuals where we got 3.12 px, who is right?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.

Common student mistakes: Common mistakes in the module 2 lesson

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

  1. Add a narrow gap to the Example 1 map; try 0, 1 and 2 cells of inflation
  2. Record when the path changes or cannot be found
  3. Enable Collision Prevention in SITL, set CP_DIST and fly at a wall in Position mode
  4. Record the real stopping point at several speeds
  5. Vary speed and latency in the stopping formula and compare with SITL
  6. 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 (System integration and technical correctness)
  • Table 2 has at least 3 speeds, states the CP_DIST set (not the default -1) and units in every column (Measurement and performance evaluation)
  • ATE RMSE is reported with the alignment method and number of poses used (Measurement and performance evaluation)
  • The speed conclusion lists all assumptions and says it is a proposal that must pass the test ladder before real use (Safety and test discipline)

Instructor guide

Class timing 720 min

  1. Objectives; review of A*, inflation and the stopping formula60 min
  2. Build the gap map and try 0, 1 and 2 cells of inflation (Table 1)150 min
  3. Set up Collision Prevention in SITL and fly at a wall at several speeds (Table 2)210 min
  4. Compare SITL results with the stopping formula90 min
  5. Compute ATE RMSE and write the safe-speed conclusion150 min
  6. Wrap-up, questions and hand-in checklist60 min

Expected results

  1. Record: Table 1 A* results with different inflationTable 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.
  2. Record: Table 2 Real stopping distance in SITL against the formulaTable 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.
  3. Record: ATE RMSE, alignment method, and the highest safe speed with assumptions (sensor range, latency, braking, margin)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.
  4. Question 1: From Table 1, at least how many cells wide must a gap be to stay passable with 1 cell of inflation, and with 2? Write it as a general rule.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.
  5. Question 2: In Table 2, how does the real SITL stopping distance differ from the formula? Explain the likely causes (Collision Prevention speed limiting, real latency, real deceleration).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.
  6. Question 3: If latency rises from 0.25 to 0.5 s, how much does the highest speed that still stops within an 8 m sensor range change, and why must the proposed speed still allow extra margin?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.
  7. Question 4: What does your ATE RMSE say about SLAM error along the path, and why must the alignment method always be stated?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.

Common student mistakes: Common mistakes in the module 3 lesson

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

  1. Export to ONNX and check outputs match the original on the same images
  2. Apply static quantization with ONNX Runtime using real-work calibration images
  3. Evaluate accuracy before and after quantization
  4. On the real board, warm up at least 10 runs then time model-only and end-to-end over 400 runs to CSV
  5. Compute p95 with Example 2 against the per-frame budget; record temperature and power
  6. 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 (System integration and technical correctness)
  • Table 2 was measured after at least 10 warm-up runs over 400 runs, with the CSV attached and nearest-rank p95 (Measurement and performance evaluation)
  • Table 3 has temperature and power at least 3 times, and a heatsink or fan was fitted during the test (Safety and test discipline)
  • The one-page model card has version and provenance, test conditions, results, limitations, and stop and rollback criteria (Lab notebook and reports)

Instructor guide

Class timing 720 min

  1. Objectives; review of model-to-board steps, quantization and p9560 min
  2. Export to ONNX and check outputs match the original120 min
  3. Static quantization and accuracy before and after (Table 1)150 min
  4. Time on the real board with temperature and power (Tables 2 and 3)210 min
  5. Compute p95 against the budget and write the model card120 min
  6. Wrap-up, questions and hand-in checklist60 min

Expected results

  1. Record: Table 1 ONNX export check and accuracy before and after quantizationTable 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.
  2. Record: Table 2 Times on the real board against the per-frame budget (400 runs after warm-up)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.
  3. Record: Table 3 Board temperature and power during the testTable 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.
  4. Question 1: From Table 2, does the INT8 version meet the per-frame budget at 30 fps? If it misses slightly, what options are there, and which did your group choose?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.
  5. Question 2: Why report end-to-end p95 rather than mean inference time? Show the difference with your group's numbers.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.
  6. Question 3: How much did accuracy in Table 1 drop after quantization, and how did your model card set its stop criterion?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.
  7. Question 4: Why can the manufacturer's TOPS figure or times measured on a PC not replace measurement on the real board?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.

Common student mistakes: Common mistakes in the module 4 lesson

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

  1. Combine modules 1–4 into a mission: take off, survey, avoid obstacles and return to land
  2. Write the five-stage test plan with measurable pass criteria before testing, and an abnormal-case list
  3. Run at least 30 SITL tests with random wind and obstacle positions
  4. Add a monitor like Example 2 and test a hung companion computer
  5. Test in a cage or controlled area under supervision with a safety pilot
  6. 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 (Safety and test discipline)
  • Table 2 has at least 30 SITL runs, and every stage has a 95% confidence interval with its method (Measurement and performance evaluation)
  • Table 3 includes a hung companion computer and at least one case with changed latency or braking (System integration and technical correctness)
  • Every cage or controlled-area flight had a safety pilot, geofence and failsafes set before flight, and attached logs (Safety and test discipline)
  • The readiness report records every failure honestly and concludes which stage the system is ready for (Lab notebook and reports)

Instructor guide

Class timing 720 min

  1. Objectives; review of the test ladder, confidence intervals, RTA and real-flight safety rules60 min
  2. Integrate modules 1-4 into a mission and write the five-stage plan for approval (Table 1)150 min
  3. Run at least 30 SITL tests with random wind and obstacles180 min
  4. Add the monitor and test a hung companion computer (Table 3)120 min
  5. Test in a cage or controlled area with a safety pilot150 min
  6. Compute confidence intervals (Table 2), write the readiness report and run the hand-in checklist60 min

Expected results

  1. Record: Table 1 Five-stage test plan (criteria written before testing)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.
  2. Record: Table 2 Success rate and confidence interval per stageTable 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.
  3. Record: Table 3 Monitor and hung-companion-computer testsTable 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.
  4. Question 1: From Table 2, can your group's SITL results support the claim that the system succeeds at least 90% of the time with 95% confidence? Explain with the lower bound of the confidence interval and the 29-run rule.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.
  5. Question 2: How does the lower bound of the confidence interval in the controlled-area stage compare with SITL, and what does it say about readiness for the next stage?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.
  6. Question 3: In Table 3, if latency or braking gets worse, does the monitor switch earlier or later, and does the drone still stop before the margin line?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.
  7. Question 4: When the companion computer hangs, which layer of protection acts, and why must the geofence also be in the flight controller when we already have a monitor?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.

Common student mistakes: Common mistakes in the module 5 lesson

Scoring rubric

For worksheets and the mini-project. Each criterion scores level (1–4) ÷ 4 × weight.

CriterionWeightExcellent (4)Good (3)Fair (2)Needs work (1)
System integration and technical correctness30%Works end to end; frames, parameters and links correct; every setting explainedWorks end to end with minor flawsPartly workingDoes not work
Measurement and performance evaluation25%Latency, accuracy, ATE and success rate measured properly, with confidence intervals and criteriaAll measured; some statistics missingIncomplete or flawed measurementNo measurement evidence
Safety and test discipline25%Criteria written first, ladder climbed one stage at a time, failsafes and geofence set, safety pilot every timeComplete with occasional remindersSkipped stages or set criteria after seeing resultsUnsafe testing
Lab notebook and reports20%Versions, settings and results recorded weekly and reproducible; clear reports honest about failuresNearly complete recordsSeveral weeks missing or not reproducibleNo 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.

CLOWorksheetsModule quizzes
CLO1 Integrate control, navigation and sensorsW 1W 2W 3M1M2M3
CLO2 Develop autonomous missions using edge AIW 4W 5M4M5
CLO3 Test safely in simulation and the fieldW 1W 3W 5M1M3M5