mirror of
https://github.com/zvx-echo6/central.git
synced 2026-06-10 11:54:37 +02:00
v0.11.1: satpass_predict adapter (server-side pass alerts for fixed observers) (#101)
This commit is contained in:
parent
621148ac46
commit
86e8b6b56a
13 changed files with 933 additions and 3 deletions
35
sql/migrations/038_add_satpass_predict_adapter.sql
Normal file
35
sql/migrations/038_add_satpass_predict_adapter.sql
Normal file
|
|
@ -0,0 +1,35 @@
|
|||
-- Migration 038: register satpass_predict adapter row (v0.11.1)
|
||||
--
|
||||
-- Server-side complement to meshAI's per-user client-side pass computation.
|
||||
-- Reads the latest TLE per norad_id from the events table (celestrak_tle
|
||||
-- adapter, v0.11.0) and emits one Event per (observer, satellite, AOS)
|
||||
-- tuple within a 24h horizon. Publishes on the existing CENTRAL_SAT
|
||||
-- stream via the supervisor's STREAM_CATEGORY_DOMAINS extension
|
||||
-- ("CENTRAL_SAT": ("tle", "pass")) -- no new stream is needed and
|
||||
-- migration does NOT touch config.streams.
|
||||
--
|
||||
-- Ships disabled (`enabled=false`) -- operator-configures observers via
|
||||
-- GUI, then enables. Default settings include one Treasure Valley observer
|
||||
-- as a worked example operators can edit/extend in place.
|
||||
--
|
||||
-- Cadence 3600s (1h): the adapter recomputes the 24h horizon every hour.
|
||||
-- New TLEs landing between polls are naturally picked up at the next poll.
|
||||
--
|
||||
-- Idempotent: ON CONFLICT (name) DO NOTHING preserves any operator-tuned
|
||||
-- state (settings changed by hand, enabled flag flipped, cadence override).
|
||||
|
||||
INSERT INTO config.adapters (name, enabled, cadence_s, settings)
|
||||
VALUES (
|
||||
'satpass_predict',
|
||||
false,
|
||||
3600,
|
||||
'{
|
||||
"observers": [
|
||||
{"name": "Treasure Valley", "slug": "treasure-valley",
|
||||
"state": "ID", "lat": 43.6, "lon": -116.2, "elev_m": 0}
|
||||
],
|
||||
"min_elevation_deg": 10,
|
||||
"horizon_hours": 24
|
||||
}'::jsonb
|
||||
)
|
||||
ON CONFLICT (name) DO NOTHING;
|
||||
Loading…
Add table
Add a link
Reference in a new issue