UAT 104 Computer Programming

Worksheet 3 A flight-data quality report

Analysis activity 6 hAssesses CLO2

Objective

Read, check, clean, summarise and plot flight data in a notebook that reruns to the same result

Equipment and materials

  • Computer with Python, pandas and matplotlib
  • flight_log_sample.csv from /downloads/uat-104/
  • Jupyter Notebook

Safety

  • Desk work only; no flying

Steps

  1. Read the file; check missing values, altitude outliers and periods under 10 GPS satellites; report in a table
  2. Clean with .loc and compare describe() before and after
  3. Summarise time and mean speed per flight mode
  4. Find when the battery first drops to 90%
  5. Compute distance flown by at least two methods and explain the choice
  6. Plot altitude and battery voltage against time, then rerun the notebook from the start to the same result

Record of results

Table 1 Data-quality problems in flight_log_sample.csv
ProblemColumnRowsTime (s)How foundHow handled
Table 2 Summary by flight mode
ModeRowsTime (s)Mean speed (m/s)
Table 3 Distance flown by different methods
MethodCode or parameters usedDistance (m)Difference from the 3 015 m plan (m)

Questions

  1. How much does the maximum altitude from describe() differ before and after cleaning? If you reported the value before cleaning, what would a reader misunderstand?

  2. Why is the raw-data distance in Table 3 longer than the plan, while the 9-point smoothed distance is shorter? Which method does your group report, and why?

  3. At what second does the battery first reach 90%, and which flight mode is the drone in then? What does this tell you about planning mission time?

  4. Why does rerunning the notebook from the start matter? If the group ran cells out of order or edited the original file, what would happen to the results handed in?

Check before you hand in

What to hand in

  • Reproducible notebook
  • Data-quality table and per-mode summary
  • Two plots with commentary

CLO2 Read, process and store data from files and telemetry. (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