UAT 305 Autopilot and Control Technology
Worksheet 5 Testing failsafes and geofences in SITL
Objective
Check missions against fences before flight, prove from logs that failsafes act on time, and measure position-tracking accuracy
Equipment and materials
- ArduPilot SITL and a GCS
- Log viewer
- Python and the module 5 example code
Safety
- Simulation only; no real flights
Steps
- In class: draw inclusion and exclusion fences in the GCS, upload to SITL and set FENCE_TYPE and FENCE_ACTION
- In class: export fence and mission points and check them with Example 1
- Self-study: fly towards the fence in SITL and observe stopping distance and action
- In class: cut the GCS link in SITL and collect heartbeat and mode-change times from the log
- Self-study: check the event times with Example 2 and make the failsafe event timing table
- Self-study: fly a 200 m line out and back in SITL with a simulated crosswind, extract PSCN and PSCE and assess error with Example 4 before and after changing PSC_NE_VEL_I
- Self-study: write a test report with firmware version and parameters
- In class (week 15): present the report
Record of results
| Point or test | Coordinates (m) | Program result | Distance to edge (m) | Action and stopping distance in SITL |
|---|---|---|---|---|
| Event | Log time (s) | Expected time (s) | Difference (s) | Pass? |
|---|---|---|---|---|
| Case | Error type | RMS (m) | Maximum (m) | Pass? |
|---|---|---|---|---|
Questions
Is a point closer to the fence edge than FENCE_MARGIN a breach? Why check points with a program before uploading a mission?
From Table 2, did the failsafe act as configured? If the time differed a lot from the expected time, what would you check?
From Table 3, how do the error to the moving target and the cross-track error differ, and which should your test plan use, and why?
How did changing PSC_NE_VEL_I change the error in a crosswind, and why is the logged position still not external truth?
Check before you hand in
What to hand in
- Fence point check results
- Failsafe event timing table
- Test report
- RMS and maximum error table before and after the change