feat(sat): the station side — elements, plan, passes and tuning
What internal/sat could not know: where the antenna is, which birds the operator cares about, and where the files live. Startup reads the cached elements and the frequency plan from disk and nothing else — one file and a few hundred parses, so the tab is full the moment it is opened, on a shack PC with no internet as much as on one with. Fetching is the slow, optional half and never blocks a launch; it happens on its own only when the set is stale and the operator asked for it. Elements pasted in by hand go in their own file. The feed cache is replaced wholesale on every refresh, so a freshly launched satellite — whose elements circulate on a mailing list days before any feed carries it, which is exactly the week everybody wants to hear it — would otherwise be wiped by the first automatic update. The list joins both halves and shows what is missing on either side. A bird with elements and no plan is one the operator can still track; a bird with a plan and no elements is the visible symptom of an element set that is too old. Dropping either turns a fixable configuration problem into a satellite that "does not exist". GetSatelliteTuning is the working answer, and everything that will later drive a radio is built on top of it rather than beside it, so the display and the rig can never disagree. It keeps the operator's frequency nominal and applies Doppler only on the way out: on a linear pass the station being answered stays put on the dial while both radios chase the shift. A geostationary bird is corrected by nothing at all.
This commit is contained in:
@@ -67,6 +67,7 @@ import (
|
||||
"hamlog/internal/rotator/pst"
|
||||
"hamlog/internal/rotator/spid"
|
||||
"hamlog/internal/rotgenius"
|
||||
"hamlog/internal/sat"
|
||||
"hamlog/internal/scp"
|
||||
"hamlog/internal/settings"
|
||||
"hamlog/internal/solar"
|
||||
@@ -884,6 +885,15 @@ type App struct {
|
||||
|
||||
alertStore *alerts.Store // DX-cluster spot alert rules (global JSON)
|
||||
|
||||
// Satellites. The elements (where the birds are) and the frequency plan
|
||||
// (what to do with the radio) are held apart because they come from
|
||||
// different places and change for different reasons — a feed every few
|
||||
// days, an operator's correction when a transponder is switched.
|
||||
satMu sync.Mutex
|
||||
satStore *sat.Store // orbital elements, by satellite name
|
||||
satBirds *sat.Birds // uplink/downlink plan
|
||||
satFetch *sat.Fetcher // element feeds + the on-disk cache
|
||||
|
||||
cwMu sync.Mutex // guards the CW decoder lifecycle
|
||||
cwStop chan struct{} // stops the CW decoder capture loop; nil when off
|
||||
cwDecoder *cwdecode.Decoder // live decoder (for retargeting the pitch)
|
||||
@@ -1643,6 +1653,10 @@ func (a *App) startup(ctx context.Context) {
|
||||
a.alertStore = as
|
||||
}
|
||||
|
||||
// Satellites: the cached elements and the frequency plan. Local files only —
|
||||
// any element fetch it decides to make goes to the network on its own.
|
||||
a.startSatellites()
|
||||
|
||||
// Ultrabeam antenna: connect in the background if enabled.
|
||||
a.startUltrabeam()
|
||||
// Antenna Genius switch: connect in the background if enabled.
|
||||
|
||||
Reference in New Issue
Block a user