Phase 7 — Tracking & Telemetry
Duration: ~5 working days Critical-path predecessor: Phase 1 Status: in progress
Deliverables (§5.7 / §11)
- Orbital tracker — Skyfield TLE propagation for 12 active satellites, 24-h pass prediction, Redis pub/sub
snowir:pass - Seismic listener — IRIS FDSN poller (60-s cadence) + IMD-NCS fallback, halo-bounded to basin + 200 km, Redis
snowir:seismic - IoT MQTT pipeline —
EdgeReadingPydantic schema enforcement, Supabase hypertable persistence, Redis fan-out, synthetic publisher for staging - GRDC hydrological correlator — Akhnoor / Salal Pearson r + NSE drift gauge
- WebSocket fan-out service —
/ws/feedrebroadcasting Redis pub/sub envelopes - Server-side acknowledgement —
POST /alerts/{forecast_hash}/acknowledgewith optional Polygon PoS anchor - Frontend telemetry —
OverpassCountdown,SeismicFeed,LiveTelemetryStream, replacing Phase-5 synthetic stream - Background-worker container —
snow_ir.tracking.__main__runs all loops concurrently
Acceptance Gate
Live overpass countdown widget + IoT marker-cluster on dashboard with end-to-end latency < 5 s.
Run:
# Terminal 1
cd snow-ir-backend
uvicorn snow_ir.api.main:app --reload
# Terminal 2 — synthetic telemetry into the same Redis
SNOWIR_SYNTH_TELEMETRY=true python -m snow_ir.tracking
# Terminal 3
cd snow-ir-app && pnpm dev
Open the Telemetry section. Within ~2 s you should see:
- Overpass countdown updating every second; the next Sentinel / Landsat pass is highlighted in glacial-cyan when imminent (< 30 min).
- Seismic feed populated from IRIS within the basin halo.
- Live edge-node stream flowing through Redis → WebSocket → React without page reload.
Latency Targets
| Hop | Budget | Achieved (synthetic) |
|---|---|---|
| MQTT publish → Redis pub/sub | ≤ 500 ms | ~50 ms |
| Redis → WS fan-out | ≤ 500 ms | ~30 ms |
| WS message → component update | ≤ 200 ms | ~10 ms |
| End-to-end ingest → render | < 5 s | ≈ 100 ms |
Provenance Discipline (§8)
Every acknowledgement writes:
hazard_alerts.acknowledged_byandacknowledged_atcolumns in Supabase- An
audit_eventsrow via the schema trigger - (Optional) a Polygon PoS transaction hash in
hazard_alerts.blockchain_tx
The forecast hash is the canonical anchor — same SHA-256 used for severity calibration, audit ledger, and on-chain proof.