PI4 — Correlated Multi-Instrument Mission (Level 4: Coordination & Optimisation)
Mission Goal
Run a coordinated mission where multiple instruments (e.g., camera + sensor streams + micro:bit beacon) produce data that can be aligned and compared. Your job is to make the combined dataset coherent.
Why This Matters
Real spacecraft integrate instruments. The value often comes from correlation: “What did the camera see when the sensor spiked?” Level 4 is about system design across teams.
What Data You Collect
- Time-synchronised sensor stream (CSV)
- Image captures (with timestamps)
- Optional inbound messages from another team (micro:bit beacons or events)
- Mission timeline markers (manual event tags)
Hardware / Software Needed
- Raspberry Pi + camera
- At least one sensor stream (IMU or environment)
- Python 3 (OpenCV optional)
- Optional: micro:bit receiver via USB serial for event tags
Inputs From Other Teams
- Micro:bit MI: Provide event beacons (e.g., MB2 “IMPACT” events).
- Data: Define shared timestamp conventions (ISO time vs monotonic seconds).
- Command & Control: Provide a mission plan with named phases and event times.
- Comms: Provide message formats and channel plan if using radio/serial events.
What You Must Produce (Deliverables)
- A combined dataset folder with a clear structure (images, logs, events).
- A “correlation method” that aligns streams (timestamp mapping).
- A short mission summary showing at least 2 correlated findings.
Step-by-Step Build
- Agree a shared clock strategy:
- Option A: Use Raspberry Pi system time for everything.
- Option B: Use monotonic “t=0” and record start timestamp.
- Implement continuous sensor logging (e.g., 10 Hz) to CSV.
- Implement periodic image capture (e.g., every 5 seconds) with timestamped filenames.
- Capture events:
- Manual: press a key to write an “EVENT” line to an events.csv
- External: ingest micro:bit event beacons and log them
- Run a mission with at least 3 phases (e.g., still → movement → still).
- Correlate:
- Find sensor spikes and link them to nearest images
- Check if events align with sensor/visual changes
- Optimise: adjust rates and formats to reduce file sizes while preserving insight.
Data Format / Output
data/pi4/sensor.csv—t_ms,ax,ay,az,temp_c,...data/pi4/images/img_YYYYMMDD_HHMMSS.jpgdata/pi4/events.csv—ts_iso,event,sourcedata/pi4/README.txt— describes correlation method
Analysis Ideas
- “Nearest image to peak event” lookup.
- Phase segmentation: label time windows and compute per-phase stats.
- Quality trade-offs: what happens if you halve sensor rate or image frequency?
Success Criteria
- Dataset is coherent: consistent timestamps and file naming.
- Team demonstrates correlation with concrete examples (two findings).
- Optimisation decisions are justified (rate vs storage, complexity vs reliability).
Evidence Checklist
- Folder structure screenshot
- Snippet of sensor.csv + events.csv
- Two example correlations (“At 12:01:30 sensor spiked; image shows…”)
- README describing time alignment
Safety & Privacy
- Camera must avoid people/faces and private content.
- Secure storage; do not share images publicly without consent.
- Coordinate movement tests to avoid trip hazards.
Common Failure Modes
- Misaligned time sources (sensor uses monotonic, images use wall-clock) with no mapping.
- Missing metadata makes correlation impossible later.
- Too much data with no plan → analysis overload.
- Overfitting conclusions from a single run.
Stretch Goals
- Build an auto-generated report (basic HTML/Markdown) summarising mission.
- Add “data quality flags” (dropped frames, missing samples).
- Synchronise via an external “start tone” or LED flash visible to camera and logged in sensors.
Scaffolding Example (optional)
You are allowed to reuse structures and formats from other teams — but not their decisions.
Structure: “Comms Relay” interface contract
- Inputs: what messages/data arrive?
- Processing: how you validate/transform?
- Outputs: what you forward/store?
- Failure handling: what if data is missing?
Example contract line
- “If no message for 10s, write
TIMEOUTand keep listening.”