REF, the Ukrainian DX contest, the BARTG Sprint, ARRL 10M, Russian DX RTTY, RDAC, YO DX HF, Oceania DX, IARU Region 1 Field Day, SARTG RTTY, All Asian and SA 10. Every contest name in the log now opens, and every one of these but Field Day scores its log contact for contact as N1MM did. Most are written from N1MM's own class and checked against the log. Three things the log settled that the class does not say plainly: ARRL 10M counts its multipliers once per mode rather than once, the BARTG Sprint counts a continent once in the contest while its countries and call areas count per band, and RDAC counts nothing but the districts and scores nothing for a station that sends none. All Asian and SA 10 have no class in N1MM, which logs them from a .udc file, so those two are written from the published rules and the log. docs/unfinished.md lists what is still not settled. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RoGtneMQaz4M9w7Kk49AVD
64 lines
2.8 KiB
C#
64 lines
2.8 KiB
C#
using Nonemm.Core;
|
|
|
|
namespace Nonemm.Contests;
|
|
|
|
/// N1MM names a contest per mode: CQ WW is `CQWWCW`, `CQWWSSB` or `CQWWRTTY`,
|
|
/// never plain `CQWW`. Our registry is keyed by the family, so a log written by
|
|
/// N1MM has to have its contest name turned back into a family and a mode
|
|
/// before the rules can be built.
|
|
///
|
|
/// The `.udc` files people use for OK/OM DX name it per mode as well, and one
|
|
/// file per side of the contest — `OKOMDXS_DX` is the one a station outside OK
|
|
/// and OM runs. Both sides are the same rules here, so both names resolve to
|
|
/// the same contest.
|
|
public static class N1mmContestNames
|
|
{
|
|
private static readonly Dictionary<string, (string Family, ModeCategory Mode)> Known =
|
|
new(StringComparer.OrdinalIgnoreCase)
|
|
{
|
|
["CQWWCW"] = ("CQWW", ModeCategory.Cw),
|
|
["CQWWSSB"] = ("CQWW", ModeCategory.Phone),
|
|
["CQWWRTTY"] = ("CQWW", ModeCategory.Digital),
|
|
["CQWPXCW"] = ("CQWPX", ModeCategory.Cw),
|
|
["CQWPXSSB"] = ("CQWPX", ModeCategory.Phone),
|
|
["CQWPXRTTY"] = ("CQWPX", ModeCategory.Digital),
|
|
["WAECW"] = ("WAE", ModeCategory.Cw),
|
|
["WAESSB"] = ("WAE", ModeCategory.Phone),
|
|
["WAERTTY"] = ("WAE", ModeCategory.Digital),
|
|
["ARRLDXCW"] = ("ARRLDX", ModeCategory.Cw),
|
|
["ARRLDXSSB"] = ("ARRLDX", ModeCategory.Phone),
|
|
["SSCW"] = ("SS", ModeCategory.Cw),
|
|
["SSSSB"] = ("SS", ModeCategory.Phone),
|
|
["NAQPCW"] = ("NAQP", ModeCategory.Cw),
|
|
["NAQPSSB"] = ("NAQP", ModeCategory.Phone),
|
|
["NAQPRTTY"] = ("NAQP", ModeCategory.Digital),
|
|
["OKOMDXC"] = ("OKOMDX", ModeCategory.Cw),
|
|
["OKOMDXS"] = ("OKOMDX", ModeCategory.Phone),
|
|
["OKOMDXC_DX"] = ("OKOMDX", ModeCategory.Cw),
|
|
["OKOMDXS_DX"] = ("OKOMDX", ModeCategory.Phone),
|
|
["CQ160CW"] = ("CQ160", ModeCategory.Cw),
|
|
["CQ160SSB"] = ("CQ160", ModeCategory.Phone),
|
|
["EU_DXC"] = ("EUDXC", ModeCategory.Cw),
|
|
["REFCW"] = ("REF", ModeCategory.Cw),
|
|
["REFSSB"] = ("REF", ModeCategory.Phone),
|
|
["OCEANIACW"] = ("OCEANIA", ModeCategory.Cw),
|
|
["OCEANIASSB"] = ("OCEANIA", ModeCategory.Phone),
|
|
["BARTGSRTTY"] = ("BARTGRTTYS", ModeCategory.Digital),
|
|
["ALLASIACW"] = ("ALLASIA", ModeCategory.Cw),
|
|
["ALLASIASSB"] = ("ALLASIA", ModeCategory.Phone),
|
|
["SA10_DX"] = ("SA10", ModeCategory.Phone),
|
|
};
|
|
|
|
public static bool TryResolve(string name, out string family, out ModeCategory mode)
|
|
{
|
|
if (Known.TryGetValue(name.Trim(), out (string Family, ModeCategory Mode) found))
|
|
{
|
|
(family, mode) = found;
|
|
return true;
|
|
}
|
|
family = "";
|
|
mode = ModeCategory.Cw;
|
|
return false;
|
|
}
|
|
}
|