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:
@@ -72,6 +72,26 @@ func TestFindByAlias(t *testing.T) {
|
||||
}
|
||||
}
|
||||
|
||||
// Matches is the other direction: a bird in hand, scanning a feed's names.
|
||||
func TestBirdMatches(t *testing.T) {
|
||||
b := Bird{Name: "AO-91", Aliases: []string{"RADFXSAT", "FOX-1B"}}
|
||||
for _, feed := range []string{"AO-91", "RADFXSAT (FOX-1B)", "radfxsat", "FOX 1B"} {
|
||||
if !b.Matches(feed) {
|
||||
t.Errorf("%q was not recognised as AO-91", feed)
|
||||
}
|
||||
}
|
||||
for _, feed := range []string{"AO-92", "NOAA 15", "FOX-1A"} {
|
||||
if b.Matches(feed) {
|
||||
t.Errorf("%q was wrongly taken for AO-91", feed)
|
||||
}
|
||||
}
|
||||
// A bracketed catalogue name matched from the other side.
|
||||
iss := Bird{Name: "ISS (ZARYA)"}
|
||||
if !iss.Matches("ISS") || !iss.Matches("ZARYA") {
|
||||
t.Error("the ISS was not recognised by either half of its catalogue name")
|
||||
}
|
||||
}
|
||||
|
||||
// The uplink maths is the part that matters on the air: a station worked at one
|
||||
// end of an inverting transponder has to be answered at the other.
|
||||
func TestUplinkFor(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user