fix(dxcc): /MM and /AM belong to no entity
RI1FJL/MM resolved to Franz Josef Land while the expedition was still sailing there, telling the operator they had worked an entity they had not. The old behaviour was deliberate — the comment read "strict DXCC says no entity, but the log should still show the operator's country" — and that is wrong for exactly this reason. A home country on a maritime mobile is not extra information; it is a false claim about where the contact happened, and it is the kind of false claim that gets a QSO submitted for an award it cannot win. Trailing only. A LEADING "MM" is the Scotland prefix and "AM" is Spain, so MM0ABC and AM5X keep their entities — getting that wrong would be a far larger error than the one being fixed. /P, /M and /B are unaffected: a portable station is still ashore. In the cluster the column says "Maritime mobile — no DXCC" rather than going blank, because blank is what an UNRESOLVED spot looks like and the two mean opposite things — one is "we don't know yet", this is "there is nothing to know". Display only: the QSO's own Country stays empty, since that field holds a DXCC entity name and there is none.
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
package dxcc
|
||||
|
||||
import "testing"
|
||||
|
||||
// /MM and /AM belong to NO DXCC entity: the station is at sea or in the air.
|
||||
//
|
||||
// This is not a technicality. RI1FJL/MM resolved to Franz Josef Land while the
|
||||
// expedition was still sailing there, which told the operator they had worked
|
||||
// an entity they had not.
|
||||
func TestMobileNoEntity(t *testing.T) {
|
||||
for _, tc := range []struct {
|
||||
call string
|
||||
want bool
|
||||
}{
|
||||
{"RI1FJL/MM", true},
|
||||
{"YB1SCY/AM", true},
|
||||
{"ri1fjl/mm", true},
|
||||
{" RI1FJL/MM ", true},
|
||||
// A LEADING MM is Scotland and AM is Spain. Treating those as
|
||||
// entity-less would be a far larger error than the one this fixes.
|
||||
{"MM0ABC", false},
|
||||
{"AM5X", false},
|
||||
{"MM/F4BPO", false},
|
||||
{"AM/DL1ABC", false},
|
||||
// Other suffixes keep their entity — a portable station is still ashore.
|
||||
{"F4BPO/P", false},
|
||||
{"F4BPO/M", false},
|
||||
{"4U1UN/B", false},
|
||||
{"F4BPO", false},
|
||||
// Only the LAST element counts: RI1FJL/MM/P is still maritime, and a
|
||||
// call whose /MM is not final is not.
|
||||
{"RI1FJL/MM/P", false},
|
||||
{"", false},
|
||||
} {
|
||||
if got := IsMobileNoEntity(tc.call); got != tc.want {
|
||||
t.Errorf("IsMobileNoEntity(%q) = %v, want %v", tc.call, got, tc.want)
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user