feat: toggleable live map feeds (ADS-B, trains, AIS, radar, WFIGS, NWS)

Wire the free data streams from docs/free-data-streams.md into the
dashboard as layer-panel toggles. Third-party APIs are proxied/cached
in FastAPI; raster tiles (IEM, RainViewer, GIBS) stay in the browser.

- Aircraft via ADSB.lol viewport poll (bbox required, radius ≤ 150 nm)
- Amtraker trains, NHC storms, WFIGS incidents/perimeters
- NWS + IEM SBW as /api/weather-alerts (does not collide with /api/alerts)
- AISStream worker is server-side only and idles without AISSTREAM_API_KEY
- Caltrans CWWP2 D1–D12 camera parser; FIRMS dual-write NOAA-20/21
This commit is contained in:
Sirius DevOps 2026-08-27 19:08:30 -04:00
commit f779b1f225
15 changed files with 1662 additions and 39 deletions

View file

@ -47,7 +47,8 @@ MINIO_SECURE = os.getenv("MINIO_SECURE", "false").lower() not in ("false", "0",
# warning and stays idle (no crash).
FIRMS_MAP_KEY = os.getenv("FIRMS_MAP_KEY", "")
# NRT VIIRS S-NPP active fire/hotspot detection (375m).
FIRMS_DATASET = os.getenv("FIRMS_DATASET", "VIIRS_SNPP_NRT")
# NASA stops Suomi NPP product delivery on 2026-11-01 — default to NOAA-20.
FIRMS_DATASET = os.getenv("FIRMS_DATASET", "VIIRS_NOAA20_NRT")
# Area bounding box as "minlon,minlat,maxlon,maxlat". Default covers most of
# the inhabited globe; narrow it (e.g. CONUS "-125,24,-66,50") to shrink
# payloads and the Postgres write volume.
@ -60,3 +61,23 @@ FIRMS_INTERVAL = int(os.getenv("FIRMS_INTERVAL", "900"))
FIRMS_DAYS = int(os.getenv("FIRMS_DAYS", "2"))
# Outbound HTTP timeout for the FIRMS CSV download.
FIRMS_TIMEOUT = float(os.getenv("FIRMS_TIMEOUT", "60"))
# Comma-separated FIRMS products to dual-write. S-NPP delivery ends 2026-11-01;
# default to NOAA-20 + NOAA-21 NRT. FIRMS_DATASET is still honored when
# FIRMS_DATASETS is unset (empty string means "use FIRMS_DATASET only").
_FIRMS_DATASETS_RAW = os.getenv("FIRMS_DATASETS", "VIIRS_NOAA20_NRT,VIIRS_NOAA21_NRT")
FIRMS_DATASETS = [d.strip() for d in _FIRMS_DATASETS_RAW.split(",") if d.strip()] or [FIRMS_DATASET]
# Identifying User-Agent for NWS / Amtraker / Nominatim (mandatory on some APIs).
OSINT_USER_AGENT = os.getenv(
"OSINT_USER_AGENT", "osint-dashboard/1.0 (self-hosted; [email protected])"
)
# AISStream (server-side WebSocket only). Idle when unset.
AISSTREAM_API_KEY = os.getenv("AISSTREAM_API_KEY", "")
# Bounding box(es) as minlat,minlon,maxlat,maxlon — note lat/lon order (AISStream).
# Default: CONUS coasts + Great Lakes, not the world.
AISSTREAM_BBOX = os.getenv("AISSTREAM_BBOX", "24,-125,50,-66")
# Run the AIS worker inside the dashboard process (default on so vessels work
# without the ingest profile). Set 0 if the ingester owns the only connection.
AISSTREAM_IN_APP = os.getenv("AISSTREAM_IN_APP", "1").lower() in ("1", "true", "yes")
AISSTREAM_IN_INGEST = os.getenv("AISSTREAM_IN_INGEST", "0").lower() in ("1", "true", "yes")