UAT 305 Autopilot and Control Technology

Worksheet 5 Testing failsafes and geofences in SITL

Lab 3 hAssesses CLO3

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

  1. In class: draw inclusion and exclusion fences in the GCS, upload to SITL and set FENCE_TYPE and FENCE_ACTION
  2. In class: export fence and mission points and check them with Example 1
  3. Self-study: fly towards the fence in SITL and observe stopping distance and action
  4. In class: cut the GCS link in SITL and collect heartbeat and mode-change times from the log
  5. Self-study: check the event times with Example 2 and make the failsafe event timing table
  6. 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
  7. Self-study: write a test report with firmware version and parameters
  8. In class (week 15): present the report

Record of results

Table 1 Mission points checked against fences, and flying towards the fence in SITL
Point or testCoordinates (m)Program resultDistance to edge (m)Action and stopping distance in SITL
Table 2 GCS failsafe event timing
EventLog time (s)Expected time (s)Difference (s)Pass?
Table 3 RMS and maximum error before and after changing PSC_NE_VEL_I
CaseError typeRMS (m)Maximum (m)Pass?

Questions

  1. Is a point closer to the fence edge than FENCE_MARGIN a breach? Why check points with a program before uploading a mission?

  2. From Table 2, did the failsafe act as configured? If the time differed a lot from the expected time, what would you check?

  3. 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?

  4. 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

CLO3 Tune and verify control performance from logs. (CLOs are a web-team draft; the course owner sets the final ones.)

Instructors: answers and teaching notes for this worksheet are in the teaching pack