Let the published .udc files score the contests they are written for
I wrote SA 10 and OK/OM DX SSB in code after two failed attempts at the download. The download works — the page posts a nonce with the form — and the files say I got both contests wrong. SA 10 is deleted from the code. Its file scores the station's log to the contact, where the code had the wrong Cabrillo name and counted its multipliers once in the contest rather than once per mode. OK/OM DX now covers the CW running only, which is what N1MM's class is for and what N1MM's own documentation says: the SSB running has different rules and a pair of .udc files, one for each side. The CW rules go back to the class, so Czechia and Slovakia are one side of the contest again. With the SSB files in place both of the station's SSB logs score to the contact. Reading those files turned up four things in the .udc reader: a file whose extension is upper case was passed over, `Country` was not read as a multiplier source, `OtherCountry` was not a points condition, and a section multiplier counted the serial numbers the other side of a contest sends. All Asian stays in code — N1MM has a class for it after all — with the Cabrillo name and the band table it uses. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01RoGtneMQaz4M9w7Kk49AVD
This commit is contained in:
@@ -18,7 +18,7 @@ public sealed class ContestRegistry
|
||||
new("WAE", "Worked All Europe DX", [ModeCategory.Cw, ModeCategory.Phone, ModeCategory.Digital], m => new Wae(m)),
|
||||
new("ARRLRTTY", "ARRL RTTY Roundup", [ModeCategory.Digital], _ => new RttyRoundup()),
|
||||
new("NAQP", "North American QSO Party", [ModeCategory.Cw, ModeCategory.Phone, ModeCategory.Digital], m => new NorthAmericanQsoParty(m)),
|
||||
new("OKOMDX", "Czech and Slovak Republics DX", [ModeCategory.Cw, ModeCategory.Phone], m => new OkOmDx(m)),
|
||||
new("OKOMDX", "Czech and Slovak Republics DX", [ModeCategory.Cw], _ => new OkOmDx()),
|
||||
new("YOTA", "YOTA Contest", [ModeCategory.Cw, ModeCategory.Phone], _ => new Yota()),
|
||||
new("IOTA", "RSGB Islands On The Air", [ModeCategory.Cw, ModeCategory.Phone], _ => new Iota()),
|
||||
new("EUDXC", "EU DX Contest", [ModeCategory.Cw, ModeCategory.Phone], _ => new EuDxContest()),
|
||||
@@ -35,7 +35,6 @@ public sealed class ContestRegistry
|
||||
new("FDREG1", "IARU Region 1 Field Day", [ModeCategory.Cw, ModeCategory.Phone], _ => new FieldDayRegionOne()),
|
||||
new("SARTGRTTY", "SARTG World Wide RTTY", [ModeCategory.Digital], _ => new SartgRtty()),
|
||||
new("ALLASIA", "All Asian DX", [ModeCategory.Cw, ModeCategory.Phone], m => new AllAsian(m)),
|
||||
new("SA10", "SA 10 Metre Contest", [ModeCategory.Cw, ModeCategory.Phone], _ => new SouthAmerica10()),
|
||||
new("DX", "General logging", [], _ => new GeneralLogging()),
|
||||
];
|
||||
|
||||
@@ -60,15 +59,18 @@ public sealed class ContestRegistry
|
||||
return new ContestRegistry(byName);
|
||||
}
|
||||
|
||||
/// Reads every `.udc` file in the folder. A file that will not parse is
|
||||
/// reported rather than silently left out.
|
||||
/// Reads every `.udc` file in the folder. Published files come with the
|
||||
/// extension in either case, and a file that will not parse is reported
|
||||
/// rather than silently left out.
|
||||
public static ContestRegistry FromFolder(string folder, out IReadOnlyList<string> problems)
|
||||
{
|
||||
List<UdcFile> files = [];
|
||||
List<string> failures = [];
|
||||
if (Directory.Exists(folder))
|
||||
{
|
||||
foreach (string path in Directory.EnumerateFiles(folder, "*.udc"))
|
||||
IEnumerable<string> found = Directory.EnumerateFiles(folder)
|
||||
.Where(f => Path.GetExtension(f).Equals(".udc", StringComparison.OrdinalIgnoreCase));
|
||||
foreach (string path in found)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user