feat(satellites): CelesTrak GP JSON satellites API with SGP4 propagation #43
Loading…
Add table
Reference in a new issue
No description provided.
Delete branch "osint-dashboard/t_fe710941-osint-celestrak-get-api-satellites"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
New
GET /api/satellites?groups=stations,weatheroverlay endpoint.Fetches CelesTrak GP JSON (OMM mean elements, not TLE) at most once per 2 hours per group, caches the element blob, and propagates positions on every request with the real
sgp4library (TEME -> geodetic) — not two-body Kepler. The OMM path consumes the GP JSON fields verbatim viasgp4.omm.initialize, so NORAD catalog numbers >= 100000 work (no TLE round-trip).Changes
app/satellites.py— parser + SGP4 propagation + 2h per-group TTL cache with a last-good blob fallback for 403 / "has not updated since" responses; SatNOGS TLE fallback only when the CelesTrak cache is empty.GET /api/satellites— default groupsstations,weather; optionalgps-ops;starlinkonly when explicitly requested;bboxviewport culling; unknown group -> 400.overlay_catalog()— newsatellitesentry (kind=points, endpoint/api/satellites).app/requirements.txt— addsgp4>=2.23.Tests
tests/test_satellites.py— parser on a tiny JSON fixture, 2h cache does not refetch, unknown group 400, bbox culling, SatNOGS fallback parser. Full suite: 192 passed, 17 skipped.Live verify
gps-ops: 32 satellites.bbox=-125,24,-66,50(CONUS): all results within box.groups=bogus-> HTTP 400.