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:
2026-09-07 10:51:16 +02:00
parent 7a84f00060
commit 1009d06a4c
8 changed files with 1110 additions and 1 deletions
+27
View File
@@ -123,6 +123,33 @@ type Bird struct {
Transponders []Transponder `json:"transponders"`
}
// Matches reports whether a name from an element feed is this satellite.
//
// The same rules Find uses, exposed for the other direction: the caller holds a
// bird and is scanning an element set spelled by somebody else.
func (b Bird) Matches(feedName string) bool {
cands := []string{feedName}
if i := strings.IndexByte(feedName, '('); i > 0 {
cands = append(cands, feedName[:i], strings.Trim(feedName[i:], "()"))
}
names := append([]string{b.Name}, b.Aliases...)
if i := strings.IndexByte(b.Name, '('); i > 0 {
names = append(names, b.Name[:i], strings.Trim(b.Name[i:], "()"))
}
for _, n := range names {
ln := loose(n)
if ln == "" {
continue
}
for _, c := range cands {
if ln == loose(c) {
return true
}
}
}
return false
}
// Birds is the frequency plan for every satellite the station knows.
type Birds struct {
mu sync.RWMutex