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
96 lines
3.2 KiB
C#
96 lines
3.2 KiB
C#
using Nonemm.Core;
|
|
using Nonemm.Core.Country;
|
|
|
|
namespace Nonemm.Contests.Tests;
|
|
|
|
/// A country file and QSO builder small enough to read, so a scoring test says
|
|
/// what it is testing rather than how to build a contact.
|
|
public static class TestLog
|
|
{
|
|
public const string Countries = """
|
|
Germany: 14: 28: EU: 51.00: -10.00: -1.0: DL:
|
|
DA,DB,DC,DD,DE,DF,DG,DH,DJ,DK,DL,DM,DO,DP,DQ,DR;
|
|
Italy: 15: 28: EU: 42.83: -12.83: -1.0: I:
|
|
I,IK,IZ;
|
|
United States: 05: 08: NA: 37.60: 91.87: 5.0: K:
|
|
K,W,N,AA,K6(3)[6];
|
|
Canada: 05: 09: NA: 44.35: 78.75: 5.0: VE:
|
|
VE,VA;
|
|
Japan: 25: 45: AS: 36.40: -138.38: -9.0: JA:
|
|
JA,JH,JR,7K;
|
|
Brazil: 11: 15: SA: -10.00: 55.00: 3.0: PY:
|
|
PY,PP;
|
|
Asiatic Russia: 17: 30: AS: 55.88: -84.10: -7.0: UA9:
|
|
RM8,RM9,RM0,UA8,UA9,UA0,R8,R9,R0;
|
|
Slovak Republic: 15: 28: EU: 48.67: -19.50: -1.0: OM:
|
|
OM;
|
|
Czech Republic: 15: 28: EU: 49.80: -15.47: -1.0: OK:
|
|
OK,OL;
|
|
France: 14: 27: EU: 46.00: 2.00: -1.0: F:
|
|
F;
|
|
Ukraine: 16: 29: EU: 50.00: -30.00: -2.0: UR:
|
|
UR,US,UT,UY,UZ,EM,EO;
|
|
European Russia: 16: 29: EU: 55.75: -37.62: -3.0: UA:
|
|
UA,RA,RN,RV,RW,RX,RZ,R3;
|
|
Romania: 20: 28: EU: 45.50: -25.00: -2.0: YO:
|
|
YO,YP,YQ,YR;
|
|
Australia: 30: 59: OC: -23.70: -133.87: -10.0: VK:
|
|
VK,AX;
|
|
""";
|
|
|
|
public static readonly CountryFile CountryFile = CountryFile.Parse(Countries);
|
|
|
|
public static readonly StationInfo Germany = new()
|
|
{
|
|
Callsign = "DL1ABC",
|
|
CqZone = 14,
|
|
ItuZone = 28,
|
|
Continent = "EU",
|
|
CountryPrefix = "DL",
|
|
};
|
|
|
|
public static readonly StationInfo UnitedStates = new()
|
|
{
|
|
Callsign = "K1ABC",
|
|
CqZone = 5,
|
|
ItuZone = 8,
|
|
Continent = "NA",
|
|
CountryPrefix = "K",
|
|
State = "CT",
|
|
ArrlSection = "CT",
|
|
};
|
|
|
|
public static readonly StationInfo Slovakia = new()
|
|
{
|
|
Callsign = "OM5M",
|
|
CqZone = 15,
|
|
ItuZone = 28,
|
|
Continent = "EU",
|
|
CountryPrefix = "OM",
|
|
County = "BRA",
|
|
};
|
|
|
|
public static Qso Contact(
|
|
string call,
|
|
double kilohertz = 14_025,
|
|
Mode? mode = null,
|
|
int zone = 0,
|
|
int number = 0,
|
|
string exchange = "",
|
|
string section = "",
|
|
DateTime? at = null) =>
|
|
new()
|
|
{
|
|
Id = Qso.NewId(),
|
|
TimestampUtc = at ?? new DateTime(2026, 5, 30, 12, 0, 0, DateTimeKind.Utc),
|
|
Call = Callsign.Parse(call),
|
|
Frequency = Frequency.FromKilohertz(kilohertz),
|
|
Mode = mode ?? Modes.Cw,
|
|
ContestName = "TEST",
|
|
Zone = zone,
|
|
ReceivedNumber = number,
|
|
Exchange1 = exchange,
|
|
Section = section,
|
|
};
|
|
}
|