Skip to main content

Phase 7 — Tracking & Telemetry

Duration: ~5 working days Critical-path predecessor: Phase 1 Status: in progress

Deliverables (§5.7 / §11)

  1. Orbital tracker — Skyfield TLE propagation for 12 active satellites, 24-h pass prediction, Redis pub/sub snowir:pass
  2. Seismic listener — IRIS FDSN poller (60-s cadence) + IMD-NCS fallback, halo-bounded to basin + 200 km, Redis snowir:seismic
  3. IoT MQTT pipelineEdgeReading Pydantic schema enforcement, Supabase hypertable persistence, Redis fan-out, synthetic publisher for staging
  4. GRDC hydrological correlator — Akhnoor / Salal Pearson r + NSE drift gauge
  5. WebSocket fan-out service/ws/feed rebroadcasting Redis pub/sub envelopes
  6. Server-side acknowledgementPOST /alerts/{forecast_hash}/acknowledge with optional Polygon PoS anchor
  7. Frontend telemetryOverpassCountdown, SeismicFeed, LiveTelemetryStream, replacing Phase-5 synthetic stream
  8. Background-worker containersnow_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

HopBudgetAchieved (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_by and acknowledged_at columns in Supabase
  • An audit_events row 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.