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:
2026-08-13 12:25:33 +02:00
parent dc0b00b474
commit 4ba5569ca8
6 changed files with 443 additions and 361 deletions
+31
View File
@@ -132,6 +132,18 @@ func (db *DB) Entities() []*Entity {
func (db *DB) Lookup(callsign string) (Match, bool) {
db.mu.RLock()
defer db.mu.RUnlock()
// Maritime and aeronautical mobile belong to NO entity, and that is not a
// technicality — the station is at sea or in the air. RI1FJL/MM resolved to
// Franz Josef Land while the expedition was still on its way there, telling
// the operator they had worked an entity they had not.
//
// The previous choice was deliberate ("the log should still show the
// operator's country") and it is wrong for exactly that reason: a home
// country here is not extra information, it is a false claim about where the
// contact happened.
if IsMobileNoEntity(callsign) {
return Match{}, false
}
call := normalizeCallsign(callsign)
if call == "" {
return Match{}, false
@@ -364,3 +376,22 @@ func replaceAreaDigit(call string, d byte) string {
}
return call
}
// IsMobileNoEntity reports a callsign DXCC assigns to no entity: a TRAILING
// /MM (maritime mobile) or /AM (aeronautical mobile).
//
// Trailing only. A LEADING "MM" is the Scotland prefix and "AM" is Spain, so
// MM0ABC and AM5X are ordinary calls — treating those as entity-less would be a
// far larger error than the one this fixes.
func IsMobileNoEntity(callsign string) bool {
s := strings.ToUpper(strings.TrimSpace(callsign))
i := strings.LastIndex(s, "/")
if i < 0 {
return false
}
switch s[i+1:] {
case "MM", "AM":
return true
}
return false
}