fix: recognise the microwave bands — 10 GHz resolved to no band at all
Reported on 3 cm. cat.BandFromHz stopped at 23 cm, so a 10 GHz frequency came back EMPTY — and an empty band is not cosmetic: the QSO is logged without one, counts in no award slot, and exports with no BAND field. The low end was short too (2190m / 630m / 560m). Four band tables had to be extended because four exist: the CAT one, the award plan in app.go, the cluster spot classifier, and the frontend's. Plus the places that LIST bands — the QSO editor and award-definition pickers (you could not set 3 cm by hand either), the statistics axis, and the award band ORDER, where a missing band sorts to the end instead of in frequency order. Ranges and names are ADIF 3.1.7, which is what an export has to carry. A test now pins one frequency per band across the Go tables and asserts they agree — that is what was missing, four hand-maintained copies with nothing checking them. It also pins that an out-of-band frequency stays empty rather than snapping to the nearest band, which would file a QSO under a band the operator never used.
This commit is contained in:
@@ -3846,7 +3846,9 @@ type AwardStatsResult struct {
|
||||
Rows []AwardStatRow `json:"rows"`
|
||||
}
|
||||
|
||||
var statsBands = []string{"160m", "80m", "60m", "40m", "30m", "20m", "17m", "15m", "12m", "10m", "6m", "2m", "1.25m", "70cm", "23cm", "13cm"}
|
||||
var statsBands = []string{"2190m", "630m", "160m", "80m", "60m", "40m", "30m", "20m", "17m", "15m", "12m", "10m",
|
||||
"6m", "4m", "2m", "1.25m", "70cm", "33cm", "23cm", "13cm", "9cm", "6cm", "3cm", "1.25cm",
|
||||
"6mm", "4mm", "2.5mm", "2mm", "1mm"}
|
||||
|
||||
// awardSnapshot returns the logbook as a light-scanned, award-enriched slice,
|
||||
// reused across award computations. Pulling the whole logbook is the dominant
|
||||
@@ -4176,7 +4178,11 @@ var awardBandPlan = []struct {
|
||||
{"15m", 21000000, 21450000}, {"12m", 24890000, 24990000}, {"10m", 28000000, 29700000},
|
||||
{"6m", 50000000, 54000000}, {"4m", 70000000, 71000000}, {"2m", 144000000, 148000000},
|
||||
{"1.25m", 222000000, 225000000}, {"70cm", 420000000, 450000000}, {"23cm", 1240000000, 1300000000},
|
||||
{"13cm", 2300000000, 2450000000},
|
||||
{"13cm", 2300000000, 2450000000}, {"9cm", 3300000000, 3500000000},
|
||||
{"6cm", 5650000000, 5925000000}, {"3cm", 10000000000, 10500000000},
|
||||
{"1.25cm", 24000000000, 24250000000}, {"6mm", 47000000000, 47200000000},
|
||||
{"4mm", 75500000000, 81000000000}, {"2.5mm", 119980000000, 123000000000},
|
||||
{"2mm", 134000000000, 149000000000}, {"1mm", 241000000000, 250000000000},
|
||||
}
|
||||
|
||||
func bandForHz(hz int64) string {
|
||||
|
||||
Reference in New Issue
Block a user