fix: /B was not recognized in the cluster
This commit is contained in:
@@ -303,11 +303,12 @@ func normalizeCallsign(s string) string {
|
||||
if p == "" {
|
||||
continue
|
||||
}
|
||||
// A TRAILING /MM (maritime) or /AM (aeronautical) mobile is stripped and
|
||||
// the operator's home entity is kept, so the contact still resolves to a
|
||||
// country in the log (e.g. YB1SCY/AM → Indonesia). A LEADING "MM" is the
|
||||
// Scotland operating prefix (MM/F4NIE) and must NOT be stripped.
|
||||
if i > 0 && (p == "MM" || p == "AM") {
|
||||
// A TRAILING /MM (maritime) or /AM (aeronautical) mobile, or /B (beacon), is
|
||||
// stripped and the operator's home entity is kept, so the contact still
|
||||
// resolves to a country in the log (e.g. YB1SCY/AM → Indonesia, 4U1UN/B →
|
||||
// 4U1UN → United Nations HQ). A LEADING "MM"/"B" is a PREFIX (MM = Scotland,
|
||||
// B = China: B/F4NIE) and must NOT be stripped.
|
||||
if i > 0 && (p == "MM" || p == "AM" || p == "B") {
|
||||
continue
|
||||
}
|
||||
if suffixModifiers[p] {
|
||||
|
||||
@@ -224,6 +224,8 @@ func TestNormalize(t *testing.T) {
|
||||
"MM/LY3X/P": "MM",
|
||||
"F4BPO/W6": "W6",
|
||||
"VK9/F4BPO": "VK9",
|
||||
"4U1UN/B": "4U1UN", // trailing /B = beacon → strip, keep the base call
|
||||
"B/F4BPO": "B", // leading B = China operating prefix, NOT a beacon
|
||||
}
|
||||
for in, want := range cases {
|
||||
if got := normalizeCallsign(in); got != want {
|
||||
|
||||
Reference in New Issue
Block a user