Teaching pack · UAT 458
A 15-week teaching plan, 10 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 11 of 11 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 |
|---|---|---|---|
| Indoor operations | M1M5 | Module 1: Why this matters · Hazards specific to indoor flight · Survey the site and divide it into zones · Law and safety at the workplace · Module 5: Safety in indoor mission operations | Covered |
| GNSS-denied environments | M1M2 | Module 1: What the autopilot lacks without GNSS · The IMU alone does not get you far · Module 2: EKF source sets and source switching | Covered |
| Sensors for perception and positioning | M2M4M6M7M8 | Module 2: Indoor position sources as the autopilot sees them · Module 4: Indoor height sources · Module 6: Inertial sensors and error growth · Positioning with fiducial markers · Optical flow and VIO · Module 7: Infrared motion capture · How UWB works · Module 8: LiDAR indoors | Covered |
| Localization and mapping principles | M3M8M9M10 | Module 3: SLAM from the operator's side · Tying the map to the building plan · Module 8: Scan matching with ICP · A Kalman filter fusing IMU and UWB · Module 9: Occupancy grid maps · SLAM and loop closure · Module 10: Real-time localization · Monte Carlo localization | Covered |
| Path planning | M5M9 | Module 5: Three layers of path planning · A* on the pump-hall grid (Example 1) · Module 9: Obstacle inflation and A* search · Sampling-based planning | Covered |
| Obstacle detection and avoidance | M4M8 | Module 4: Obstacle avoidance indoors (Example 4, stopping distance and the blind directions of sensors) · Module 8: LiDAR indoors (glass and glossy surfaces reflect the laser away) | Covered |
| Autonomous flight control | M2M4M5 | Module 4: Control loops and flight modes behind autonomous flight (mode table, Example 5 how late can the position estimate be, delay margin) · Position-hold quality · Module 2: Frames and delay · Module 5: From route to autopilot mission | Covered |
| Waypoint and mission configuration | M5 | Module 5: From route to autopilot mission (Example 2, converting waypoints to latitude and longitude and checking battery time; failsafes, virtual fences and emergency switches) | Covered |
| Simulation | M5 | Module 5: Simulation: what it can and cannot prove (SITL, Gazebo, HITL, the sim-to-real gap, Example 4 fitting a simulator and checking it on another flight) · Testing in stages (stage 2, SITL) | Covered |
| Indoor flight testing | M2M5 | Module 5: Testing in stages (seven stages, acceptance criteria and test cards) · How many test flights are enough? (Example 3) · Module 2: Pre-flight proof by walk test | Covered |
| Evaluation of system performance and safety | M4M5M10 | Module 4: Position-hold quality (RMS and R95) · Module 5: Safety in indoor mission operations · Module 10: Accuracy metrics: ATE and RPE · Robustness testing | Covered |
Weekly teaching plan
| Week | Topic | Pre-class | Lecture | Lab | Evidence |
|---|---|---|---|---|---|
| 1 M1 | Course overview and flight without GNSS | Read module 1 'Why this matters' and 'What the autopilot lacks without GNSS' | The four questions of indoor flight, the EKF origin and the water treatment plant case | Worksheet 1 part A: get permission and sketch the chosen building with ceiling heights and major obstacles | Draft building plan |
| 2 M1 | Zoning and workplace safety | Read 'Survey the site and divide it into zones' and 'Law and safety at the workplace'; run Example 2; take the module 1 quiz | Zone criteria for data sources, confined spaces and the hierarchy of controls | Worksheet 1 part C: adapt Example 2 to the group's data, list hazards and the failsafe settings that must change | Zone table, hazard list and quiz result |
| 3 M2 | EKF source sets and switching | Read 'EKF source sets and source switching' | EK3_SRCx_*, RCx_OPTION = 90, EK3_SRC_OPTIONS, PX4 equivalents and the switching test procedure | Worksheet 2 part B: bench-test switching, wait 10 seconds, then check events 85 to 87 and XKFS in the log | Switching test results from the log |
| 4 M3 | SLAM and planning the mapping run | Read module 3 'SLAM from the operator's side', 'Map once, localize on every flight' and 'Planning the mapping flight'; run Example 1 | Front-end, back-end, loop closure, false closures and L_max = e_max/r | Worksheet 3 part A: plan mapping loops from the real building size, then carry the sensors to build the map | Mapping-loop plan and first map |
| 5 M3 | Map maintenance; midterm | Read 'Looking after the map'; review modules 1 to 3; take the module 3 quiz | Midterm examination (modules 1 to 3) | Worksheet 3 part C: write the map maintenance procedure: version numbers, remapping triggers and the pre-mission check | Worksheet 3 report and midterm score |
| 6 M4 | Position-hold quality | Read 'Position-hold quality'; run Example 3 | RMS, R95, maximum and setting criteria from free space | Worksheet 4 part B: hover for 120 seconds twice in a netted area on different source sets and compute the indicators | Hover-quality table |
| 7 M5 | Path planning with A* | Read module 5 'Three layers of path planning' and 'A* on the pump-hall grid'; run Example 1 | Grids, inflation, height layers, f = g + h and consistency with the stopping distance | Worksheet 5 part A: build a grid from the group's map, inflate obstacles, plan the route and define at least 8 inspection points | Route and inspection-point list |
| 8 M5 | Mini-project presentations and practical exam | Prepare the mini-project report as in worksheet 5 step 6 | Course wrap-up and project criteria | Demonstrate a slow indoor inspection mission to the instructor (practical exam) and present to the plant manager (role-play) | Mini-project report and demonstration, scored with the rubric |
| 9 M6 | Inertial sensors and drift | Read 'Inertial sensors and error growth'; run Example 1 | Accelerometer and gyro bias and the gravity-leakage path | Worksheet 1 part B: log a still IMU for 10 minutes, find the bias and compute the time to exceed 0.30 m | Measured bias and computed time |
| 10 M7 | Infrared motion capture | Read module 7 'Infrared motion capture'; run Example 1 | Retroreflective markers, triangulation, camera baseline and use as ground truth | Worksheet 2 part A: motion-capture demonstration or camera layout for a test cage, and set up two UWB nodes | Camera layout with expected error |
| 11 M7 | Multilateration and anchor geometry | Read 'Position from several ranges'; run Example 3; take the module 7 quiz | Gauss-Newton, DOP, NLOS and how many anchors are needed | Worksheet 2 part C: mount 4 to 6 anchors in two layouts and compute position, HDOP and VDOP against truth | Worksheet 2 report and module 7 quiz result |
| 12 M8 | Matching degeneracy and the Kalman filter | Read 'When scan matching degenerates' and 'A Kalman filter fusing IMU and UWB'; run Examples 2 and 3 | Information-matrix eigenvalues, predict and update, and bias in the state | Worksheet 3 part B: measure degeneracy in a long corridor and fuse IMU with UWB from a walk along a measured line | Plot comparing IMU alone, UWB alone and the filter |
| 13 M9 | Occupancy grid maps | Read module 9 'Occupancy grid maps'; run Example 1 | Log-odds, unknown versus free cells, and 3D map memory | Worksheet 4 part A: build a 0.1 m occupancy grid of the lab from 5 positions | Occupancy grid of the room |
| 14 M9 | Inflation, A* and sampling-based planning | Read 'Obstacle inflation and A* search' and 'Sampling-based planning'; run Example 3; take the module 9 quiz | Rounding up inflation, A* versus Dijkstra, and when to use RRT | Worksheet 4 part C: plan with A* and Dijkstra, move a table and rescan | Worksheet 4 report and module 9 quiz result |
| 15 M10 | ATE, RPE and robustness testing | Read 'Accuracy metrics: ATE and RPE' and 'Robustness testing'; run Examples 3 and 4; take the module 10 quiz | Trajectory alignment, availability and setting criteria before testing | Worksheet 5 part B: test against ground truth, compute ATE and RPE, and run at least four scenarios | ATE and RPE table and robustness test matrix |
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 Survey a building and build a zone table
Field/workplace · About 6 h of class time · CLO1
Objective: Survey a real building, divide it into zones and choose the position, height and heading sources for each, with a hazard list and indoor failsafe settings
Equipment
- Written permission from the building manager
- Laser distance meter, light meter or phone app, satellite-view app
- Training drone with propellers removed, connected to a ground station
- Computer with Python and the example code at /downloads/uat-458/
Safety
- Remove propellers before powering the drone; no flying in this worksheet
- Walk only in permitted areas; do not enter confined spaces
- Do not photograph people or personal information of building users
Steps
- Get permission, then sketch the plan, ceiling heights and major obstacles
- Divide the building into at least four zones; measure satellites, light, floor texture and magnetic deviation
- Carry the drone with propellers removed through each zone; record satellites, EKF status and compass readings
- Adapt Example 2 to the group's data and explain each zone's result
- Use Example 1 to find how long the IMU could carry the drone in the narrowest space
- List hazards and controls by the hierarchy of controls, and the failsafe settings that must change
Deliverables
- Building plan with zones
- Zone measurement table
- Zone table from the code, with explanation
- Hazard list, controls and failsafe settings
Checklist
- Table 1 has at least 4 zones, every cell filled with units, and floor texture points to a photo number
- Table 2 matches what Example 2 prints from your data, and the criteria are written in the code
- The IMU hold-time working is shown with the tolerance of the narrowest space
- Table 3 uses at least 4 levels of the hierarchy, sets failsafes to Land or Brake then Land, and marks any confined space as no-fly
- The building manager's permission is attached and no photo shows people
Instructor guide
Class timing
- Objectives, safety briefing and permission check30 min
- Sketch the plan, ceiling heights and obstacles, and divide into zones60 min
- Measure each zone and carry the drone (propellers off) logging EKF and compass120 min
- Adapt Examples 2 and 1 to the group's data75 min
- Write the hazard list, controls and failsafe settings60 min
- Short presentation, questions and hand-in checklist15 min
Expected results
- Table 1: at least 4 zones. Under a steel roof the satellite count is usually below 12 or zero away from doors, hall lighting is typically about 100 to 300 lux, and machine rooms or areas near steel frames and motors show clearly higher magnetic deviation (lesson case: apron 18 satellites, 20,000 lux, 3%; walkway 0 satellites, 180 lux, 8%; pump hall 250 lux, 42%; covered reservoir 2 lux). Real values depend on the building; check that every cell is measured and has a unit.
- Table 2: must agree with the criteria in the code. With the lesson's criteria (GNSS with at least 12 satellites; LiDAR SLAM with at least 50 lux; optical-flow backup where the floor is textured, there is no water and light is at least 100 lux; compass where deviation is at most 15%) the lesson case gives: apron GNSS and compass; walkway LiDAR SLAM with optical-flow backup, compass; over the filter beds LiDAR SLAM only, height from the barometer; pump hall LiDAR SLAM with optical flow, heading from ExtNav; confined space no flight. A zone below 50 lux must say to add lighting.
- Table 3: at least elimination (keep people from under the flight path, reschedule crane work), substitution (smallest drone that still carries the camera), engineering (propeller guards, nets, emergency motor stop, virtual fence below the ceiling), administrative (permit to work, flight plan, pre-flight checklists) and PPE (helmets and eye protection). Settings to change: failsafe from RTL to Land or Brake then Land, and set the EKF origin. Any confined space must be no-fly with a recovery plan.
- With a 0.5 m tolerance: 7.1, 4.5 and 3.2 s at biases of 0.02, 0.05 and 0.10 m/s²; with 0.3 m: 5.5, 3.5 and 2.4 s. The results are single-digit seconds. A strong answer concludes that the IMU only bridges short gaps between measurements; when the position source is lost for more than a few seconds the drone must land or the pilot must take over in a mode that does not need position, because the error grows with the square of time (three times the time, nine times the error).
- A strong answer points to a zone whose measurements clearly differ, for example a machine room with magnetic deviation above 15%, where heading must come from the external system, or a zone over water or a plain floor with no optical-flow backup where the rangefinder should not control height. It must quote numbers from Table 1, not just zone names.
- In a zone with no satellites the count is zero or very low, the EKF has no horizontal position from GNSS, and the compass reading may change near steel frames or motors. Most non-GPS navigation needs the EKF origin set manually from a ground station or a Lua script; otherwise position modes such as Loiter and Auto cannot be used.
- RTL first climbs to at least RTL_ALT_M above home before returning; above the ceiling the drone hits the roof structure, and indoors there may be no safe straight path home. It should become Land, or Brake then Land. A strong answer refers to the real ceiling height measured on the plan.
Discussion questions
- If a zone meets none of the criteria, should the team add equipment, change the method of work or not fly there, and how would you decide?
- Why is using one positioning method for the whole building risky even if it is accurate in most zones?
- If the drone falls into a confined space, who must do what before anyone goes in to retrieve it, and when should that be planned?
Adapting to student background
- Upper secondary (M.6)
- Have them explain δp = ½bt² before running the code and predict how much the error grows when time triples; pair them with a peer who is confident connecting the drone to the ground station for the walk.
- Vocational certificate
- Start with the real measurements for Table 1, then add the criteria to the code line by line from a printed criteria table; let them check one IMU hold time with a calculator alongside the code.
- Diploma
- Extension: add a new rule to Example 2 for zones below 50 lux (for example, add lighting first) and measure magnetic deviation at several distances from one large motor to find where the compass becomes usable.
2Worksheet 2 Configure sources and prove them by walk test
Lab · About 6 h of class time · CLO2, CLO1
Objective: Configure EKF source sets and switching, convert frames correctly and prove the set-up with a walk test before flight
Equipment
- Computer with ArduPilot or PX4 SITL
- Training drone with propellers removed and the group's indoor position source
- Transmitter with a three-position switch
- Measuring tape and floor marking tape
Safety
- Propellers stay off throughout; bench work and walking only
- Save the parameter file before every change
- Take care with cables and the lithium battery while walking
Steps
- Configure three source sets as in the lesson table, adjusted to the group's sensors, and set RCx_OPTION = 90
- Save complete parameter files before and after, with the firmware version
- Bench-test switching through all three positions, wait 10 seconds, then check events 85 to 87 and XKFS in the log
- Write an ENU-to-NED converter and test it by moving the drone 1 m north
- Walk a measured rectangle at least three times and compute the closure error
- If optical flow is available, apply Example 1 to a real log and compare textured and plain floors
Deliverables
- Parameter files before and after, with the source-set table
- Source-switching evidence from the log
- Frame converter code and test result
- Walk-test results and closure error
Checklist
- Table 1 lists all five EK3_SRCx parameters for all three sets and EK3_SRC_OPTIONS, with reasons tied to the zone table
- Parameter files before and after, with the firmware version, are attached
- Table 2 shows events 85 to 87 and the XKFS SS field from a real log, with the log number
- Table 3 has at least three laps, closure in metres and percent, compared with the 1% criterion set in advance
- Propellers stayed off throughout, confirmed by a photo or a note
Instructor guide
Class timing
- Objectives and safety briefing; remove propellers15 min
- Configure three source sets and the switch; save parameter files before and after90 min
- Bench-test switching; download the log and check events and XKFS75 min
- Write the ENU-to-NED converter and test with a 1 m move north75 min
- Walk the rectangle three times and analyse optical flow if available90 min
- Wrap-up, questions and hand-in checklist15 min
Expected results
- Table 1 for the lesson case (EKF3 option values: 0 none, 1 baro, 3 GPS, 5 optical flow, 6 ExternalNav): POSXY 3/6/0, VELXY 3/6/5, POSZ 1/1/1, VELZ 3/6/0, YAW 1/6/1, and EK3_SRC_OPTIONS = 2 (bit 1 aligns the ExternalNav position with optical flow, bit 0 off), switch RCx_OPTION = 90. Values may differ if the group lacks a sensor, but the reasons must agree with the zone table from Worksheet 1.
- Table 2: flipping low, middle and high shows source-change messages on the ground station, the EKF stays healthy after 10 seconds, the log contains events 85, 86 and 87 for the set used, and the XKFS SS field shows the set each core uses. Moving the drone 1 m north must show the N axis rising by about +1.0 m with E almost unchanged.
- Table 3: lesson example, a 20 × 10 m rectangle, 60 m, ending at N 0.42 m, E −0.31 m, gives a closure of 0.52 m or 0.87%, passing the 1% criterion (at most 0.60 m over 60 m). The group's real result should be in the tenths of a metre and within 1% on all three laps. If not, or if the shape is wrong, go back to the frames and the delay.
- NED: N 4.0 m, E 3.0 m, D −1.5 m (1.5 m above the floor), heading 60°. Unconverted, the autopilot reads N 3.0, E 4.0, D 1.5, believing the drone is 1.5 m below the floor (3.0 m height difference) and 1.41 m off horizontally, and flying north looks like flying east, so it corrects the wrong way and spirals off the path.
- A mirrored or 90°-rotated track means a frame error, for example ENU sent unconverted or heading not converted with ψNED = 90° − ψENU. Fix the converter and repeat the walk test until the shape is right and the closure passes before the propellers go on.
- From the lesson example: textured floor, 0.40 rad/s at 2.5 m gives 1.00 m/s; pitching, 0.55 − 0.15 rad/s also gives 1.00 m/s (1.375 m/s without rotation compensation); a height reading 10% low (2.25 m) gives 0.90 m/s, also 10% low. On a plain floor or water the quality falls below the threshold (for example 18 < 50) and the flow is rejected. A strong answer links this to the quality values actually measured on the two floors.
- Δp = vΔt: 0.04 m at 0.5 m/s and 0.24 m at 3.0 m/s. The EKF sees the source disagreeing with the IMU, so the position oscillates or is rejected. Fly slowly (about 0.5 m/s) until VISO_DELAY_MS or EKF2_EV_DELAY is set from logs, then raise the speed.
- Set 3 takes heading from the compass. In a machine room with strong magnetic deviation (42% in the lesson case) heading would be wrong enough to make the drone circle, and optical flow gives only velocity, so position slowly drifts. The lesson restricts it to the walkway with only 8% deviation, and the restriction must be written into the operating procedure.
Discussion questions
- Why may switching from ExternalNav back to GPS make the position jump, while switching from GPS to ExternalNav does not?
- How can a drone with good sensors but wrong wiring or frames be more dangerous than one with no sensors at all?
- What does a walk test prove, and what can it not prove, about real flight?
Adapting to student background
- Upper secondary (M.6)
- Have them draw the ENU and NED axes on paper before writing the converter and work the example point by hand first; give extra time on SITL and the ground station with a confident peer.
- Vocational certificate
- Let them set parameters row by row from a printed table and check by physically moving the drone north before looking at the formula; have them compute one lap's closure with a calculator alongside the code.
- Diploma
- Extension: write a script that extracts events 85 to 87 and XKFS from the log into a timeline, and estimate the delay from the log by shifting the external position until it lines up with the IMU.
3Worksheet 3 Build a map, tie it to the plan and check quality
Lab · About 6 h of class time · CLO2
Objective: Plan and build a SLAM map of the building, tie it to the plan with control points and write a map maintenance procedure
Equipment
- 2D LiDAR sensor rig, recorded data or a Gazebo scene
- Computer with SLAM software such as Cartographer and the example code
- Building drawings or a laser distance meter for control points
- Cones or tape to close the area
Safety
- Map by carrying the sensors; no autonomous flight in this worksheet
- Close the area and inform building users before mapping
- Check the LiDAR laser class in the maker's documents; do not look into the beam at close range
Steps
- Plan mapping loops with Example 1 from the real building size and choose what to walk
- Carry the sensors along the plan in the closed area, noting times and revisit points
- Build the map and inspect loop closures visually
- Choose at least five well-spread control points, measure them and tie the map with Example 3
- Deliberately misidentify one control point and record how the residuals change
- Write the map maintenance procedure: versions, remapping triggers and pre-mission check
Deliverables
- Mapping-loop plan
- Map file and map image
- Residual table, including the misidentified-point case
- Map maintenance procedure
Checklist
- Table 1 uses the real building size, states the assumed drift rate, speed and battery time, and says which parts are walked and why
- Table 2 has at least five well-spread control points, the RMS and maximum, and the one-misidentified case
- The map file and an image with loop closures inspected are attached, with the map version number
- The maintenance procedure covers versions, remapping triggers and the floor-mark check before each mission
Instructor guide
Class timing
- Safety briefing, close the area and inform building users25 min
- Plan mapping loops with Example 145 min
- Carry the sensors along the plan and note revisit points90 min
- Build the map and inspect loop closures75 min
- Measure control points, tie with Example 3 and test a misidentified point90 min
- Write the maintenance procedure, answer questions and hand-in checklist35 min
Expected results
- Table 1 (with the lesson values: filter hall 96 × 30 m, drift 0.5% of distance, tolerance 0.5 m, speed 1.0 m/s, 12 battery minutes): longest distance between revisits 100 m; k = 1 loop of 252 m drifts 1.26 m; k = 2, 156 m, 0.78 m; k = 4, 108 m, 0.54 m; k = 8, 84 m, 0.42 m, passing, with 672 m in total and 11.2 minutes, almost a whole battery. The group's building gives different numbers using the same L_loop = 2(L/k + W) and drift = r × L_loop.
- Table 2 (lesson values): rotation 1.76°, translation (5.19, 2.42) m, residuals 3.5, 6.1, 3.9, 1.5 and 1.8 cm, RMS 3.8 cm, maximum 6.1 cm, passing the 10 cm criterion. If the central point is misread as a column 6 m away (54, 15 instead of 48, 15) the residuals become 123.5, 114.1, 123.7, 119.2 and 480.5 cm, RMS 240.3 cm: every point is spoiled, not only the wrong one. The group's real LiDAR residuals should be centimetres to a few tens of centimetres.
- A good procedure has: a map version number recorded in the log of every flight; remapping triggers such as structural change, control-point or walk-test residuals beyond tolerance, or frequent low match-quality reports; a pre-mission check placing the drone on a floor reference mark and confirming the reported position matches within tolerance; and a rule that the first mapping run is never an autonomous flight.
- The lesson values fall from 1.26 m to 0.42 m with 8 loops, but the 30 m width means the shortest loop is 2W = 60 m, which always drifts 0.30 m however many sections are used, while total distance and battery time grow with each split. If it still fails, lower the drift rate r, for example by moving more slowly, turning less, or dividing the space into narrower rooms.
- No. The rotation and translation (1.76° and about 5.2 and 2.4 m in the lesson) only reflect where and in which direction mapping started. Quality is shown by each point's residual, the RMS and the maximum against the criterion set in advance (10 cm), and, if scale is fitted, a scale close to 1.
- Every residual grows sharply because least squares spreads the error over all points (in the example even the correct points are off by about 1.1 to 1.2 m). To find the wrong point: look at the largest residual, check that the right column was read, then drop one point at a time and refit; if dropping one point makes the rest small again, that point was wrong and the map is not warped.
- Two points in 2D exactly match the number of unknowns, so the fit is always perfect and leaves no residual to warn of a misread point. Points on one line leave the rotation about that line poorly determined. Extra, well-spread points make the quality checkable and let a misread point be found.
Discussion questions
- Why is a false loop closure worse than none, and which buildings on campus are most at risk?
- If people walk through the building all the time, how should the team map so that moving objects are not baked into the map?
- When should the existing map be kept and when must the area be remapped, and who should decide?
Adapting to student background
- Upper secondary (M.6)
- Have them show by hand why the shortest loop is 2W and explain at a concept level how the SVD finds the rotation before running Example 3; give extra practice carrying the sensors steadily.
- Vocational certificate
- Have them measure control points with the laser meter and fill the table first, then run prepared code changing only the coordinates; let them compare each residual with the 10 cm criterion by eye.
- Diploma
- Extension: add scale estimation to the tie function, report how close the fitted scale is to 1, and write a leave-one-out loop that finds a misread point automatically.
4Worksheet 4 Hover tests and stopping before obstacles
Lab · About 6 h of class time · CLO2
Objective: Measure altitude and position-hold quality from logs, configure avoidance from a distance budget and test stopping before soft obstacles
Equipment
- Training drone with propeller guards, an indoor position source and a LiDAR or rangefinders
- Netted test area
- Cardboard boxes for the crossing test and soft obstacles such as foam
- Computer to download and analyse logs
Safety
- Fly in a netted area with nobody inside; the pilot is ready to take over in a mode that does not need position
- Set the emergency motor stop and avoidance switches before flight
- Start stopping tests at 0.3 m/s and increase step by step; soft obstacles only
- Check batteries and propellers before every flight; store lithium batteries in fire-resistant containers
Steps
- Hover at 1.5 m for 120 seconds twice on different source sets; compute RMS, R95 and maximum with Example 3
- Fly the MC_06 box-crossing test with surface tracking on and off
- With the drone resting on the floor, log the barometer while doors or fans change; analyse with Example 1
- Compute the stopping budget with Example 4 and set AVOID_MARGIN or CP_DIST
- Test stopping before soft obstacles from 0.3 m/s up to inspection speed and compare real stopping distance with the setting
- Record directions the sensors cannot see and write the limitation into the procedure
Deliverables
- Hover-quality table and plots
- Box-crossing results and pressure-step sizes
- Stopping budget and avoidance settings
- Stopping test results and blind-direction limitations
Checklist
- Table 1 has two 120 s flights on different source sets with RMS, R95 and maximum, plots and log numbers
- The stopping budget shows every term (sensor to prop tip, R95, speed times delay, spare) and the real setting is not below it
- The parameter file showing AVOID_MARGIN or CP_DIST, SURFTRAK_MODE and the avoidance switch is attached
- Stopping tests started at 0.3 m/s in steps with soft obstacles only, and blind directions are written into the procedure
Instructor guide
Class timing
- Safety briefing; check nets, batteries, propellers and emergency switches30 min
- Two hover flights and quality analysis with Example 390 min
- MC_06 box crossing and barometer logging while doors or fans change75 min
- Compute the stopping budget and set avoidance45 min
- Stopping tests before soft obstacles, step by step in speed90 min
- Blind directions summary, questions and hand-in checklist30 min
Expected results
- Table 1 (lesson Example 3, simulated with seed 473): optical flow RMS 0.28 m, R95 0.48 m, maximum 0.65 m; LiDAR SLAM RMS 0.07 m, R95 0.12 m, maximum 0.18 m. Both pass R95 ≤ 0.5 m for a 2.5 m walkway. The group's real results depend on sensors and floor; a source that gives position directly should reach an R95 of tens of centimetres, while optical flow usually shows a slow one-way drift.
- Table 2: at 30 °C and 101,325 Pa the air density is 1.164 kg/m³, so pressure steps of 5, 10 and 20 Pa make the barometer believe the height changed by 0.44, 0.88 and 1.75 m (Δh = Δp/(ρg)). Real pressure steps depend on the building. Box crossing: with surface tracking off the drone must not rise and fall with the boxes; with it on, the drone changes height to follow the surface beneath it.
- Table 3 (lesson values: sensor 0.45 m from the prop tips, R95 0.12 m, delay 0.3 s, spare 0.3 m): the budget at 1.0 m/s is 1.17 m, so the setting is 1.2 m; at 0.3 m/s it is 0.96 m and at 0.5 m/s 1.02 m. Every run must stop before the setting with positive clearance at the prop tips (clearance = stopping distance from the sensor minus 0.45 m). If any run comes closer than the setting, stop raising the speed and check the delay.
- Use the set with the much smaller R95 (LiDAR SLAM, 0.12 m, in the example) as the main source. Optical flow reaches an R95 of 0.48 m, almost at the limit, with a maximum of 0.65 m beyond it, and drifts one way because it gives only velocity, so it is a fallback for landing only. A strong answer compares R95 and the maximum with the real free space, not RMS alone.
- With surface tracking on, the drone sinks with the lower surface. In the example, crossing a 1.6 m deep tank at 3.0 m leaves 1.4 m above the walkway and only 0.3 m above the 1.1 m rail, while holding height with baro or ExtNav keeps 3.0 m and 1.9 m above the rail. Set SURFTRAK_MODE = 0 on routes crossing tanks or uneven floors.
- In the lesson 10 Pa is about 0.88 m (5 Pa 0.44 m, 20 Pa 1.75 m). Hovering 1.5 m from a beam, more than half the margin disappears because the controller pushes the drone up or down to correct a height that never changed. Rule: no opening large doors or switching fans while flying near the roof, or use an upward rangefinder to follow the ceiling (SURFTRAK_MODE = 2) with care over gaps in lattice trusses.
- The stopping distance is measured from the sensor. With the sensor 0.45 m from the prop tips, a 0.5 m setting leaves only 0.05 m at the tips before counting wander (R95) and the distance flown during the delay. The correct budget is 0.45 + 0.12 + 1.0 × 0.3 + 0.3 = 1.17 m, so set 1.2 m. A strong answer uses the group's own airframe numbers.
- An 87° forward depth camera covers 18 of 72 five-degree bins, leaving 54 blind; a 2D LiDAR does not see objects above or below its scan plane. The default CP_GO_NO_DATA = 0 forbids moving into directions without data, which is safe but prevents inspecting around pipes; setting 1 means flying into unprotected directions. The right fix is more sensor coverage, such as a 360° LiDAR covering all 72 bins, with the limitation written into the procedure.
Discussion questions
- Why is the PX4 test-card criterion of holding position within 1 metre not enough for real indoor work, and what should the criterion be based on?
- What happens if position gains are raised for a crisp hover while the position estimate arrives late?
- Should obstacle avoidance be the first or the last line of defence, and why?
Adapting to student background
- Upper secondary (M.6)
- Have them explain R95 by sorting 20 distances by hand and reading the 95th percentile before using numpy, and let them keep the test card during flights to see the procedure in practice.
- Vocational certificate
- Have them measure the sensor-to-prop-tip distance on the real airframe first, then fill the budget term by term in a prepared table, using a calculator alongside the code.
- Diploma
- Extension: use Example 5 to find the delay margin for the group's own position gains and compare it with the delay measured from the logs.
5Worksheet 5 Plan and test an indoor inspection mission
Lab · About 6 h of class time · CLO3, CLO5
Objective: Plan a route from the map, turn it into a mission, configure safety settings and test in stages with test cards and statistics, as the end-of-term mini-project
Equipment
- Map tied to the plan from worksheet 3 and results from worksheet 4
- Computer with SITL and the example code
- Training drone with a tested indoor position source and avoidance
- Netted test area or a permitted empty building
Safety
- Test in order without skipping stages; real flights only under the instructor's supervision
- Set failsafes to Land or Brake then Land and test them in SITL before real flight
- Keep people from under the flight path; pilot, observer and area controller at their posts
- Charge batteries only where permitted and never unattended
Steps
- Build a grid for the flight layer, inflate obstacles by aircraft size and stopping distance, and plan the route with Example 1
- Define at least 8 inspection points, convert them with Example 2 and check battery time
- Configure failsafes, fences and emergency switches, then test in SITL including position-source loss
- Write test cards for stages 1 to 6 with acceptance criteria and test in order
- Count passed flights in stage 6, compute the failure-rate upper bound with Example 3 and state the limits of the evidence
- Compile the mini-project report and prepare the demonstration
Deliverables
- Route, inspection points and mission file
- Safety settings and SITL test results
- Completed test cards with log numbers
- Mini-project report and demonstration
Checklist
- Table 1 has at least 8 inspection points, coordinates to seven decimals, and a battery-time check after the reserve
- Table 2 tests every failsafe case including position-source loss mid-mission, and no case climbs
- Table 3 gives every stage a measurable criterion written before testing, a log number, and stages done in order without skipping
- The report states the failure-rate bound with the limits of the evidence, and the procedure names pilot, observer and area-controller roles
Instructor guide
Class timing
- Mini-project briefing, roles and safety25 min
- Build the grid, inflate obstacles and plan the route with Example 165 min
- Define inspection points, convert to waypoints and check battery time45 min
- Configure failsafes, fences and emergency switches and test in SITL75 min
- Write test cards and test in order under supervision120 min
- Failure-rate bound, report summary and hand-in checklist30 min
Expected results
- Table 1 (lesson values, EKF origin 14.0000000, 100.6000000): N 2.0 E 14.0 becomes 14.0000180, 100.6001296; N 2.0 E 44.0, 14.0000180, 100.6004074; N 16.0 E 46.0, 14.0001437, 100.6004259; N 18.0 E 23.0 at 8 m, 14.0001617, 100.6002129. The route back to the start is 111.5 m; with 10 photo stops of 20 s it takes 5.2 minutes (8 stops, 4.5 minutes), under the 9.8 minutes allowed (14 minutes less a 30% reserve). The group's values depend on its origin and layout.
- Table 2: position-source loss, the EKF failsafe (FS_EKF_ACTION = 1 or 3) lands; fence breach, FENCE_ACTION = 2 (Always Land) or 4 (Brake or Land); radio loss must land or Brake then Land, not RTL; switch RCx_OPTION = 31 stops the motors at once. No case may climb; a climb means an RTL setting is still left somewhere.
- Table 3 with the lesson's example criteria: stage 1 closure within 1% and EKF healthy 10 s after switching; stage 2 every failsafe lands as set, no climb; stage 3 no oscillation, no bounce on landing; stage 4 R95 ≤ 0.5 m and no rising and falling over boxes; stage 5 stops before the setting every time at every speed; stage 6 reaches every waypoint without unnecessary braking. A failed stage goes back for a fix before moving up.
- Lesson example, pump hall 48 × 20 m, 0.5 m cells: without inflation A* gives 30.3 m through the 1.5 m gap in the pipe rack, where a 0.9 m wide drone leaves 0.3 m at the prop tips on each side; inflated by 1.0 m (radius 0.45 + margin 0.55) the gap closes because it would need to be at least 2.0 m, and the route goes round the end of the rack at 34.1 m, only 3.8 m longer. It must agree with the 1.2 m stopping distance from Worksheet 4, or avoidance brakes all the way.
- In the lesson 111.5 m takes 5.2 minutes against 9.8 allowed, so one flight is enough. Hovering for photos, 200 of 311.5 seconds, takes longer than travelling. Recompute whenever points are added, and if the time allowed is exceeded, split the mission into two flights instead of cutting the battery reserve.
- Clopper-Pearson upper bounds with no failures: 5 flights 0.451, 10 flights 0.259, 20 flights 0.139, 30 flights 0.095 (rule of three 3/n gives 0.600, 0.300, 0.150, 0.100); 1 failure in 30 gives 0.149. 59 consecutive passes are needed to claim a rate below 5%. A strong answer says the group can only claim the failure rate is unlikely to exceed the bound, not that it never fails, and that other layers are needed, such as keeping people from under the flight path and tested failsafes.
- FENCE_ALT_MAX has a documented range of 10 to 1000 m, so it cannot be set below the ceiling of a room lower than 10 m. The route must be planned in a height layer below the ceiling with a margin, backed by an upward rangefinder.
- Every 2 m north changes latitude by only 0.000018°. The fifth decimal place (0.00001°) is about 1.11 m, so rounding can shift a waypoint by up to about a metre, too much for indoor margins. Seven decimals resolve about 1 cm.
Discussion questions
- The plant manager asks how safe flying in their building is and how you know. What evidence would the group give?
- What can SITL testing prove, and what can only be tested for real?
- If stage 5 fails once at the highest speed, should the team lower the inspection speed or go back and fix the system, and how would it decide?
Adapting to student background
- Upper secondary (M.6)
- Have them trace A* by hand on a small 6 × 6 grid before running the code and explain where 1 − 0.05^(1/n) comes from; give extra practice as observer and area controller during real tests.
- Vocational certificate
- Start them from printed test-card headings filled with criteria from the lesson table; have them compute mission time with a calculator against the code and own the real pre-flight checklist.
- Diploma
- Extension: add a second height layer, plan a route that climbs to inspect the crane rail and comes back down, and in SITL drop the position source during the climb to confirm the failsafe does not keep climbing.
6Worksheet 6 IMU drift and range from AprilTags
Lab · About 6 h of class time · CLO4, CLO1
Objective: Measure a real IMU bias and compute its effect on position, check tag ranges against the pinhole model, and find the limits of optical flow
Equipment
- IMU or flight controller with a logging cable
- Calibrated camera and AprilTag detection software
- AprilTags printed in two sizes and a measuring tape
- Optical-flow sensor with a rangefinder
- Computer with Python
Safety
- Bench work and carrying sensors by hand; no flying
- Fix tags to walls within reach; do not climb chairs or ladders without someone holding them
- Keep cables and equipment clear of walkways
Steps
- Leave the IMU still on a bench for 10 minutes, log the accelerometer and find the bias from the mean
- Use the code in Example 1 to compute when the position error would exceed 0.30 m
- Photograph both tag sizes from 1 to 8 m, measure true range with the tape and compare with Z = f_x S/s
- Find the longest range at which every image decodes and set the group's tag-size rule
- Carry the optical-flow sensor and rangefinder over three floors, log flow quality and decide which floors are usable
Deliverables
- Navigation-requirements table for the group's chosen space
- Measured bias and time to exceed 0.30 m
- Plot of tag range against true range and the tag-size rule
- Summary of floor suitability for optical flow
Checklist
- Table 1 states all five requirements (accuracy, rate, latency, coverage, robustness) as numbers with units
- Table 2 uses the real 10-minute still log, runnable code is attached, and the time to 0.30 m matches the formula
- Table 3 has both tag sizes at five or more ranges each, states f_x from calibration, and has a plot of tag range against true range
- The floor-suitability summary for three floors quotes the logged flow quality
- Tags were fixed within reach, there was no flying, and cables were kept clear of walkways
Instructor guide
Class timing
- Objectives, safety briefing and navigation requirements45 min
- Log the still IMU for 10 minutes, find the bias and apply Example 175 min
- Fix two tag sizes, photograph from 1 to 8 m and measure true range90 min
- Compare with the pinhole model and set the tag-size rule60 min
- Carry optical flow over three floors and judge suitability60 min
- Wrap-up, questions and hand-in checklist30 min
Expected results
- Table 1 in the lesson's format (Hall 3 values): 95th-percentile accuracy at most 0.30 m, update rate at least 30 Hz, latency at most 80 ms, coverage of the whole working area and height, robustness tested against a list of scenarios. The group's values may differ but must be checkable numbers, not the word accurate.
- Table 2: time to 0.30 m is √(2 × 0.30 / b): 7.7, 5.5 and 3.5 s at biases of 0.01, 0.02 and 0.05 m/s², with errors at 10 s of 0.50, 1.00 and 2.50 m. A still MEMS bias is usually hundredths to tenths of a m/s². Gravity must be removed from the vertical axis first; a vertical mean near 9.8 m/s² means it was not.
- Table 3 (with the lesson's f_x = 900 px, 0.40 m tag, 0.5 px edge noise): 2 m 180 px, about 0.6 cm; 5 m 72 px, 3.5 cm; 8 m 45 px, 8.9 cm; 9 m 40 px, 11.2 cm. Small 0.20 m tag: 2 m 90 px, 1.1 cm; 4 m 45 px, 4.4 cm; 8 m 22.5 px, 17.8 cm. Real results should show the same trend: image size falls as 1/Z and error grows as Z².
- In the lesson example a 0.05 m/s² bias reaches 0.30 m in 3.5 s, 2.50 m at 10 s and 22.5 m at 30 s. A 0.01°/s gyro bias reaches 0.30 m only at 10.2 s but grows with the cube of time: 7.70 m at 30 s and 61.6 m at 60 s. A strong answer concludes the IMU only bridges short gaps and must be corrected by another source within a few seconds.
- Yes: twice the range gives about four times the error, for example a 0.40 m tag errs 1.2 cm at 3 m and 5.0 cm at 6 m (δZ ≈ Z²δs/(f_x S)). Real data may not fit exactly because of oblique views and light, but the trend should show. If every range is off by the same proportion, suspect a wrong f_x.
- Tag-size rule: S ≥ s_min × Z / f_x, where s_min is the pixel size that decoded in every image in the group's test. With the lesson's 40 px and f_x = 900 px, a tag for 12 m must be at least 0.53 m (about 15 cm error at 12 m), and for 8 m about 0.36 m.
- Textured floors such as patterned carpet work, with high, steady flow quality; plain or glossy floors give low or fluctuating quality and are unusable. Velocity v ≈ ωh, so a height error of some percent gives the same percent velocity error: in the lesson 0.6 rad/s at 2.5 m gives 1.50 m/s, and a 0.25 m (10%) height error gives 0.15 m/s.
- Every 0.30 / 0.01 = 30 m. On the lesson's 840 m route VIO drifts 8.4 m and needs about 28 reference sightings per route. A strong answer concludes that tags visible everywhere are hard to achieve, so a reference covering the whole space, such as the UWB of module 7, should be considered.
Discussion questions
- Why does a gyro bias that looks tiny become the critical error path over longer times?
- If the calibrated f_x is 5% wrong, how are all tag ranges affected, and can this experiment catch it?
- How do motion-measuring and reference-measuring methods complement each other in a real building?
Adapting to student background
- Upper secondary (M.6)
- Have them derive δZ ≈ Z²δs/(f_x S) themselves and compare it with the data on a log plot; give extra practice photographing tags square-on and taping ranges accurately.
- Vocational certificate
- Have them tabulate true ranges and image sizes first, compute Z = f_x S/s row by row with a calculator, then check with the code; use the plot to see the trend rather than proving the formula.
- Diploma
- Extension: photograph the tag at 0°, 30° and 60° at the same range and report how much the oblique view adds to the error and shortens the decoding range.
7Worksheet 7 UWB ranging and multilateration
Lab · About 6 h of class time · CLO4
Objective: Measure UWB range error in clear and blocked conditions, then compute position and DOP for two anchor layouts
Equipment
- At least 5 UWB nodes (anchors and tag) permitted for use in Thailand
- Measuring tape or laser distance meter
- Stands for mounting anchors at several heights
- Metal sheet for blocking tests
- Computer with Python
Safety
- Ground work; no flying
- Set stands firmly; never climb a ladder alone to mount high anchors
- Watch the sharp edges of the metal sheet; wear gloves when lifting
- Never aim the laser distance meter at anyone's eyes
Steps
- Measure true ranges of 2, 5, 10 and 20 m, log 200 UWB ranges at each, and compute mean error and standard deviation
- If modes can be selected, compare SS-TWR with DS-TWR and explain with Example 2
- Block the direct path with a person and then the metal sheet; check whether the error is always positive
- Mount anchors around the room in two layouts and range from test points at known positions
- Use the code in Example 3 to compute position, HDOP and VDOP against the true position
Deliverables
- Table of range error by distance
- SS-TWR versus DS-TWR comparison
- Blocking-test results
- Two anchor layouts with computed positions, HDOP and VDOP
Checklist
- Table 1 covers all four ranges with 200 readings each, mean error and standard deviation with units
- Table 3 has two layouts with surveyed anchor coordinates, and HDOP and VDOP from the attached code
- Blocking results separate the person and metal-sheet cases and judge from real data whether errors are always positive
- UWB devices are permitted in Thailand, stands were firm, nobody climbed a ladder alone, and the laser was never aimed at eyes
Instructor guide
Class timing
- Safety briefing and device permission check25 min
- Log 200 UWB ranges at 2, 5, 10 and 20 m90 min
- Compare SS-TWR with DS-TWR and run the blocking tests75 min
- Mount two anchor layouts, survey them and range from test points90 min
- Compute position and DOP with Example 360 min
- Wrap-up, questions and hand-in checklist20 min
Expected results
- Table 1: with a clear line of sight, good UWB ranges usually err by centimetres to one or two decimetres with a standard deviation of a few centimetres (real values depend on the device; compare with the maker's data for the unit used). In DS-TWR the mean error usually does not grow clearly with range; in SS-TWR with a long reply time part of a constant error comes from the clocks.
- Table 2: when blocked the mean error should be positive (ranges too long) because the arriving signal took an indirect path. The lesson example uses 0.8 m for a steel panel. A metal sheet usually adds more than a person and sometimes drops readings entirely. If a few negative values appear, check whether they come from the ordinary noise on top.
- Table 3 (lesson example, 120 × 72 m hall, point 40, 30, 12 m): anchors on the four corners at 3 m give HDOP 1.10, VDOP 3.67; anchors grouped in one corner give HDOP 2.39, VDOP 2.84. If the lab room is 10 × 8 m with a test point at (3, 2, 1.0) m: four corners at 2.5 m give HDOP 1.07, VDOP 1.97 (a 0.10 m range error gives about 0.11 m horizontally and 0.20 m vertically); four corners alternating 0.5 and 2.5 m give HDOP 1.13, VDOP 3.48. The group's values depend on its layout; the computed position should be off by roughly DOP times the range error.
- In DS-TWR the mean error should not depend much on range. In the lesson example, with a 25 ppm clock difference and reply times of 100, 300 and 1000 µs, SS-TWR errs 0.375, 1.125 and 3.748 m, growing with reply time, while AltDS-TWR errs only 0.075 mm in every case, because the third message gives both sides a round trip and a reply time, cancelling the clock-rate effect.
- It should be positive always or nearly always, because a blocked signal travels further than the direct path, so the error has one direction rather than random plus or minus. In the lesson, anchor 3 reading 0.8 m long pulls the position 1.20 m off, mostly vertically, and the residuals after the fit rise to about 0.2 to 0.3 m, larger than normal noise.
- A layout whose anchors surround the test point gives better HDOP than one with anchors on one side, because the directions to the anchors are spread out. VDOP depends on height differences between anchors compared with horizontal distances. In the large hall with low, distant anchors VDOP is 3.67 and height errs about 0.37 m, so UWB height should not be trusted; use a rangefinder or LiDAR instead. The answer must quote the group's DOP values.
- No. Four anchors and three unknowns leave only one redundant equation: the residuals show something is wrong, but the error is spread over all anchors, and dropping any one leaves three that always fit exactly. Add anchors (at least five in view) or check each range against a position predicted from other sensors before using it, as in module 8.
Discussion questions
- Why is infrared motion capture suited to ground truth in a test cage but not to navigating a whole hall?
- If a surveyed anchor position is 10 cm wrong, what happens to the drone position, and how often should the team re-check anchor positions?
- Which work suits TDoA and which suits TWR if several drones must fly in the same building at once?
Adapting to student background
- Upper secondary (M.6)
- Have them explain that each row of H is a unit vector from an anchor to the drone and predict which layout gives better DOP before running the code; give extra time mounting stands and surveying anchors.
- Vocational certificate
- Focus first on complete measurements; use a spreadsheet for mean and standard deviation, then run prepared code changing only the anchor coordinates, and explain DOP with a sketch of anchor directions.
- Diploma
- Extension: add anchors up to six, write leave-one-out code to find the blocked anchor from the residuals, and report how often it is identified correctly over several blocking trials.
8Worksheet 8 LiDAR scan matching and an IMU and UWB fusion filter
Lab · About 6 h of class time · CLO4, CLO5
Objective: Find motion from LiDAR scans, detect degenerate matching, and build a Kalman filter with a gate from real data
Equipment
- 2D LiDAR with logging software
- IMU and UWB tag on a hand-held board
- UWB anchors from Worksheet 7
- Measuring tape and floor tape for a marked line
- A box to place across the corridor
Safety
- Check the laser class under IEC 60825-1 in the maker's documents; never look into the LiDAR head at close range
- Hand-carried sensors, no flying; watch cables and passers-by
- The test corridor must not obstruct fire exits
Steps
- Record two scans in a room with wall corners and a column, moving the sensor by a measured amount, and find the motion with Example 1
- Record a scan in a long corridor, compute eigenvalues as in Example 2, then place the box across it and recompute
- Log IMU and UWB together while walking the floor line
- Adapt Example 3 to the real data and compare IMU alone, UWB alone and the filter
- Block one anchor during the walk, use the gate in Example 4 to count rejected ranges, and compare position with and without the gate
Deliverables
- ICP result against the taped motion
- Eigenvalues before and after placing the box
- Plot comparing the three methods with RMS values
- Number of rejected ranges and the effect on accuracy
Checklist
- Table 1 compares ICP with the taped motion for both distance and angle, with the final RMS
- Table 2 gives eigenvalues before and after placing the box from real scans and names the unobservable direction
- Table 3 covers all three methods with a plot, the Q and R used, and the number of rejected ranges
- The LiDAR laser class was checked in the maker's documents and the test corridor did not block fire exits
Instructor guide
Class timing
- Laser and area safety briefing25 min
- Record two scans and find the motion with ICP75 min
- Corridor scan, eigenvalues, then the box and recompute60 min
- Log IMU and UWB while walking the floor line60 min
- Adapt the filter to real data and test the gate with a blocked anchor110 min
- Wrap-up, questions and hand-in checklist30 min
Expected results
- Table 1 (lesson Example 1): true motion 4° and (0.30, −0.15) m. ICP's first iteration gives 1.00° and (0.077, 0.001) m with RMS 12.0 cm; iteration 30 gives 4.03° and (0.301, −0.150) m with RMS 1.3 cm, close to the sensor's 1 cm noise. The group's result should differ from the tape by no more than about one to two centimetres and under a degree if the room has wall corners and a column.
- Table 2 (lesson Example 2): two parallel walls with 400 points give eigenvalues 0 and 400, no information along the walls; with a 60-point box face across the view, 60 and 200, every direction constrained. Real data will not give exactly zero because real walls are not perfect, but the smaller value must be far below the larger and rise clearly with the box.
- Table 3 (lesson Example 3, one axis, true bias 0.05 m/s², UWB 0.10 m): IMU alone is 2.37 m off after 10 s; UWB alone about 0.10 m; the filter has RMS 0.046 m, filter sigma 0.040 m, and estimates the bias as 0.048 m/s². With real walking data the filter should beat UWB alone, and the gate should reject almost all ranges from the blocked period.
- The first iteration finds only 1.00° of the true 4° and 0.077 m of 0.30 m because the nearest-point pairs are still badly wrong; each iteration improves the pairs until 4.03°. Started far from the truth, ICP can converge to a wrong local solution. On a drone the guess comes from the IMU or VIO. A strong answer notes that the round column helps because it gives information in every direction.
- A smaller eigenvalue near zero (0 of 400 in the example) means the along-wall direction is unobservable, and ICP may report a low RMS as if it succeeded while that direction is wrong. With the box it rises (60 in the example). The system should compute it for every scan and, below a threshold, down-weight LiDAR in that direction and rely on UWB or the IMU.
- Yes: the filter (0.046 m in the example) beats UWB alone (0.10 m) because the IMU smooths UWB noise between measurements and the bias, being in the state, is removed. A sigma of 0.040 m close to the real 0.046 m error means the filter judges its own uncertainty sensibly, which the gate depends on.
- Lesson example: the normal range has innovation +0.03 m, d² = 0.01, and is used; the blocked range, 0.85 m too long, has d² = 14.29, above 3.84, and is rejected. Real data should show rejections rising during the blocking and the gated position not being pulled off as it is without the gate. If rejections continue for long, the position drifts with the IMU, and if P is too small correct ranges are rejected too, so the system must count rejections and alert when they become unusually frequent, not widen the gate to silence them.
Discussion questions
- If Q and R do not match the real sensors, is the filter overconfident or underconfident, and how would each show in your data?
- Why is feeding each anchor's raw range into the EKF better than feeding a position already computed from UWB?
- LiDAR struggles with glass, glossy surfaces and haze. In a real hall, how would you design the system to know when LiDAR cannot be trusted?
Adapting to student background
- Upper secondary (M.6)
- Have them work one filter update by hand (prediction 10.0 m, variance 0.04; measurement 10.3 m, variance 0.01; result 10.24 m) before running the code and explain eigenvalues with a sketch of wall normals; give extra practice carrying the sensors steadily.
- Vocational certificate
- Focus on recording data and taping the motion accurately; use prepared code changing only the data file names, and explain the results from the three-line comparison plot.
- Diploma
- Extension: extend the filter to 2D using raw ranges from every anchor with the gate, and count consecutive rejections to set an alert threshold.
9Worksheet 9 Occupancy grid, loop closure and path planning
Lab · About 6 h of class time · CLO5
Objective: Build an occupancy grid of the room, close a loop with a tag, and plan with A* and Dijkstra on the inflated map
Equipment
- 2D LiDAR
- AprilTag and a calibrated camera
- Measuring tape to survey scan positions
- Computer with Python, NumPy and matplotlib
Safety
- Check the laser class before use; never look into the LiDAR head at close range
- Hand-carried sensors; no flying
- Lift tables with two people; mind fingers and backs
Steps
- Scan the room from 5 known positions and build a 0.1 m map with log-odds as in Example 1, showing unknown cells in a different colour from free cells
- Carry the sensor once around the room with a tag at the start and log odometry
- Close the loop with the code in Example 2 and report the error before and after
- Inflate obstacles by the drone radius plus margin and plan with A* and Dijkstra between three pairs of points
- Move one table, rescan, and check how many scans the map and path take to adapt
Deliverables
- Image of the three-state occupancy grid
- Table of error before and after loop closure
- Table of path length and nodes expanded for A* and Dijkstra
- Notes on how the map adapted after moving the table
Checklist
- The map image shows three states in clearly different colours and states the 0.1 m cell, l_occ, l_free and the clamp used
- Table 2 gives the error before and after closure in metres and as a percent of distance
- Table 3 covers three pairs with both A* and Dijkstra and the rounded-up inflation in cells
- The notes on moving the table give the real number of scans and before-and-after images
- Tables were lifted by two people, the laser class was checked, and there was no flying
Instructor guide
Class timing
- Safety briefing and survey of the five scan positions30 min
- Scan and build the three-state grid with Example 190 min
- Walk once around the room and close the loop with Example 275 min
- Inflate obstacles and plan with A* and Dijkstra75 min
- Move a table, rescan and record how the map adapts60 min
- Wrap-up, questions and hand-in checklist30 min
Expected results
- Table 1 (lesson values l_occ = 0.85, l_free = −0.40, clamp ±3.5): hit, hit, pass, hit, hit gives log-odds +0.85, +1.70, +1.30, +2.15, +3.00 and p = 0.70, 0.85, 0.79, 0.90, 0.95. Never-observed cells must stay at log-odds 0 (p = 0.5) and be shown as unknown. A 10 × 8 m lab room at 0.1 m has 8,000 cells in 2D.
- Table 2 (lesson Example 2): odometry ends at (0.3, 0.8) m, 0.85 m off over 192 m (about 0.44%). After closure pose 4 returns to (0, 0) and the error spreads to the other poses: pose 1 shifts 0.21 m, pose 2 0.43 m, pose 3 0.64 m (from 0.6, 36.7 to 0.38, 36.1). A small room gives errors before closure of centimetres to tens of centimetres.
- Table 3 (lesson Example 3, 1 m cells, inflation 1 cell): A* and Dijkstra both give 81.6 m and 76 cells; A* expands 896 nodes and Dijkstra 1,061. In the group's room at 0.1 m the lengths must match for every pair, and A* must expand no more nodes than Dijkstra.
- They must differ: unknown cells must not count as free. A planner that treats them as free routes behind cabinets or tables the LiDAR has never seen, where real obstacles may stand. A strong answer points to the unknown cells in the group's map, such as behind a table or below the scan plane.
- In the lesson 0.85 m over 192 m, about 0.44%. After closure the error is spread back over every pose along the loop, poses near the closure shifting most and those near the start least. With a duplicate tag ID the system may close the loop at the wrong place, which is worse than no closure because it forces two places to be one and warps the whole map, so every tag ID in a building must be unique.
- Equal, because both find the shortest path. In the lesson A* expands 896 and Dijkstra 1,061 nodes (165 fewer). The straight-line heuristic never overestimates the remaining distance, so A* never skips a better path; the difference is modest because long booths block the straight line to the goal.
- From the +3.5 clamp with l_free = −0.40, 9 pass-throughs are needed to fall below 0 (p < 0.5). If a beam passes the cell once per scan, about 9 scans; the real number can be smaller or larger depending on how many beams cross the cell per scan. Without a clamp, a cell that held a table for long would hardly ever become free. The path should change once the cells become free.
- Cells = round up of (radius + margin) / cell size: 0.35 + 0.3 m at 0.1 m gives 6.5, so 7 cells; at 0.2 m, 3.25, so 4 cells; 0.45 + 0.5 m at 0.1 m gives 9.5, so 10 cells. Rounding down leaves less margin than required.
Discussion questions
- In a hall whose booth layout changes for every event, should the map be rebuilt each time or kept and updated through log-odds? What are the trade-offs?
- When should sampling-based planning such as RRT be used instead of A*, and what must you watch for?
- How does choosing 0.1 m or 0.2 m cells affect memory, safety and passing through narrow gaps?
Adapting to student background
- Upper secondary (M.6)
- Have them convert one cell's log-odds back to probability by hand and trace Dijkstra on a 5 × 5 grid before comparing with A*; give extra practice taping scan positions accurately.
- Vocational certificate
- Start with the real scan positions and the table move; use prepared code changing only coordinates and read results from the map images before the numbers, counting the scans after the move by eye.
- Diploma
- Extension: add path smoothing (drop waypoints where a straight segment stays clear of obstacles) and compare its length with the cell-corner path.
10Worksheet 10 Evaluate your group's navigation system against ground truth (mini-project)
Lab · About 6 h of class time · CLO6, CLO5
Objective: Measure system latency and load, evaluate accuracy with ATE and RPE, and test robustness against criteria set in advance
Equipment
- Small indoor drone or hand-held sensor rig with a companion computer
- Motion-capture system or surveyed checkpoints as ground truth
- Netted flight area per the procedures in modules 1–5 of this course
- Computer with Python and evo
Safety
- Fly only in a netted area or test cage under the safety procedures in modules 1–5 of this course; keep people out of the flight area
- Have a pilot ready on the emergency kill switch for every flight; start slow
- If lithium batteries are used, inspect them first, charge on a fire-resistant surface under supervision, and store them in fire-resistant bags or boxes
- Do not run real smoke or haze machines for haze tests; simulate them with data or test only in an authorised venue
Steps
- Time each stage of the localization pipeline on the real computer, compute total latency and load with Example 1, and check the timestamp clock
- Run Example 2 with the room's landmark layout, add one asymmetric landmark, and report the steps needed to localize
- Carry or fly in the ground-truth area and compute aligned ATE, RPE and the maximum with Example 3 or evo, stating the alignment method
- Set pass criteria first, then test at least four scenarios that change one factor at a time
- Summarise in a table like Example 4 with proposed fixes for any scenario that fails
Deliverables
- Latency budget and processing load
- MCL experiment results
- Table of ATE, RPE and maximum with the alignment method
- Robustness test matrix, proposed fixes and presentation
Checklist
- Table 1 is timed on the real flight computer, totals latency and load, and states whether timestamps share the IMU clock
- Table 2 states the alignment method (4-DOF, SE(3) or Sim(3)), ATE, RPE, maximum and distance for every run
- Table 3 has pass criteria written before testing, at least four one-factor scenarios, and both p95 and availability
- Every flight was in a netted area with a pilot on the kill switch, and no real smoke machine was used
- The presentation gives honest proposed fixes for failing scenarios
Instructor guide
Class timing
- Mini-project and safety briefing; set pass criteria before testing30 min
- Time the pipeline and load with Example 160 min
- Run MCL with Example 2 and add an asymmetric landmark45 min
- Carry or fly in the ground-truth area and compute ATE and RPE90 min
- Robustness tests in at least four scenarios105 min
- Summary table, proposed fixes and presentation30 min
Expected results
- Table 1 (lesson Example 1): latency 18 + 22 + 6 + 14 = 60 ms; at 2 m/s, uncompensated, that is 12 cm or 40% of 0.30 m. Load: VIO 22 ms × 30 Hz = 66%, scan matching 38 ms × 10 Hz = 38%, UWB and fusion 2 ms × 100 Hz = 20%, total 124% of one core, though each task meets its own deadline (33.3, 100 and 10 ms). The group's values must be measured on the real computer.
- Table 2 (lesson Example 3): ATE before alignment 1.283 m, after SE(3) alignment 0.087 m, maximum 0.150 m, RPE over 5 s windows 0.056 m, distance 40.7 m, true final drift 0.273 m. The group's results depend on its system, but every value must carry its alignment method and the aligned ATE must be far below the unaligned one.
- Table 3 (lesson Example 4, criteria p95 ≤ 0.30 m and availability ≥ 99%): 3 of 6 pass: baseline 0.12 m, 100%; lights dimmed to 20 lux 0.21 m, 99.6%; one anchor off 0.19 m, 99.8%. Failing: steel stand blocking anchor 3, 0.41 m, 99.9% (accuracy); long empty wall 0.27 m, 97.4% (availability); haze 0.35 m, 98.1% (both). Good fixes: more anchors so at least five are visible everywhere, tags on the long walls, and no flights during stage haze.
- In the lesson 60 ms at 2 m/s costs 12 cm, 40% of the 0.30 m budget, so timestamping and compensation are essential. The 124% total cannot fit on one core: tasks would queue and miss deadlines, so VIO and scan matching must go on separate cores or scan matching must slow down, and timing must be measured on the flight computer, not a development machine.
- In the lesson (columns every 12 m with a gap at 72 m) the 90% spread stays about 96 to 108 m wide until step 7 and collapses to about 0.5 m at step 8 when the unique 24 m gap is seen. Adding one asymmetric landmark (an assumed column at 42 m) localizes at step 4, four steps sooner. Before the spread narrows the belief has several peaks, so the median is meaningless and sending it would steer the autopilot to a wrong place.
- Before alignment the ATE includes the frame difference, because VIO starts in its own frame (1.283 m in the example); after alignment only the system's error remains (0.087 m). Alignment pulls the whole trajectory onto the ground truth as well as it can and absorbs part of the drift (true final 0.273 m). The report must always state the alignment method, the maximum, the RPE and the distance flown.
- A strong answer separates which scenario failed which criterion; in the lesson, the long wall passes accuracy but its 97.4% availability means about 15.6 s without a usable position in a 10-minute flight. Setting criteria after seeing results lets any system pass without becoming safer, so the team must fix the system or set operating restrictions instead.
Discussion questions
- Why can a low average error hide periods when the system was lost, and what should always be reported alongside it?
- If some scenarios fail, how should the team present this to the facility manager honestly while keeping the system usable?
- What does compensating latency by timestamping and keeping a state history require from the hardware and software?
Adapting to student background
- Upper secondary (M.6)
- Have them explain Umeyama alignment at a concept level and why VIO with an IMU should use a 4-degree-of-freedom alignment before running evo; give extra practice as area controller and test-card keeper during flights.
- Vocational certificate
- Focus on timing each stage for real and filling the table; use evo through prepared commands, and let them set up the one-factor test scenarios from a checklist.
- Diploma
- Extension: add timestamping and a state history to the Worksheet 8 filter to compensate the measured latency, and compare ATE before and after compensation.
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) |
|---|---|---|---|---|---|
| Accuracy of calculations and analysis | 30% | IMU drift, optical-flow velocity, frame conversion, mapping loops, control-point residuals, pressure height, R95, stopping distance, route and failure-rate bound all correct, with reproducible code | Nearly all correct, method shown | Some errors or missing steps | Many errors or no method |
| Configuration of GNSS-free navigation | 25% | Source sets, switching, frames, delay, map, height source and avoidance set correctly and consistent with the zone table, with parameter files and log evidence | Nearly all correct, most evidence present | Some settings wrong or inconsistent with the zones | Many errors or no evidence |
| Test evidence and interpretation | 25% | Complete test cards for every stage done, measurable acceptance criteria, results linked to logs and honest interpretation of the evidence's limits | Test cards and evidence mostly complete | Missing acceptance criteria or evidence for some stages | No staged testing, or conclusions beyond the evidence |
| Safety, operating procedure and presentation | 20% | Complete procedure covering roles, checklists, indoor failsafes, battery handling and confined spaces, presented clearly to users | Procedure mostly complete, presentation understandable | Some key safety points missing | Procedure inadequate for safe indoor flight |
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.
| CLO | Worksheets | Module quizzes |
|---|---|---|
| CLO1 Explain the limits of operating in GNSS-denied environments and choose visual, LiDAR and inertial position sources to suit each indoor zone | W 1W 2W 6 | M1M2M6 |
| CLO2 Configure an autopilot for GNSS-free flight, covering EKF sources, source switching, SLAM maps, altitude and position holding and obstacle avoidance, and check quality from logs | W 2W 3W 4 | M2M3M4 |
| CLO3 Plan routes and test indoor autonomous missions step by step and safely, using measurable acceptance criteria | W 5 | M5 |
| CLO4 Explain and compare indoor positioning with vision, infrared, ultra-wideband, LiDAR and inertial sensors, and compute the expected accuracy from error models | W 6W 7W 8 | M6M7M8 |
| CLO5 Apply sensor fusion, mapping, path planning and real-time localization to navigate unmanned aircraft indoors | W 5W 8W 9W 10 | M8M9M10 |
| CLO6 Evaluate the accuracy and robustness of indoor navigation systems with metrics and systematic test plans | W 10 | M10 |