Get WAE ready: the score split, the Cabrillo layouts and the QTC list
The score summary now splits the way N1MM's does. `ContestLog` keeps a tally per band, and per kind of row where the contest has kinds, and the score window reads those instead of adding the rows up itself. Three things were wrong with the old sum: - The band rows counted a multiplier as one whatever the band. WAE weights it by band — `ScoreRow.AddContact` adds four on 3.5, three on 7 and two on 14, 21 and 28 — so the band rows did not add up to the total. - The band rows counted contacts left out of the claimed score. - There was no split by kind. `CWAE.LogInfo` and `ScoreClass.Description` give WAE a `Q/QTC` column and a row per band and kind, so contacts, traffic sent and traffic received are read apart. The Cabrillo writer now pads the record name to seven characters, which is what `ConvertCabrilloStructStdToString` does and why: `X-QSO:` is six characters and a space, so every record name puts the frequency in the same column. Nonemm wrote five, and the `X-QSO:` lines added last commit did not line up with the rest. WAE's own layouts follow `CWAE.CabrilloString`: three spaces after the sent serial rather than the one every other column gets, and the transmitter column only for a multi-operator entry. `QtcTraffic.ToSend` no longer offers a contact marked as a dupe, which is what `DBSupport.QTCRecordsetCount` leaves out with `Trim(ContactType) = ''`. Checked by running the program against a WAE SSB log of six contacts and a series of ten received: the band rows read 4, 3, 2 and 2 and add up to the 11 in the total row. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015NZkFxHde1iifAQemFTHxf
This commit is contained in:
@@ -115,6 +115,32 @@ public class WaeTests
|
||||
Assert.Empty(log.Judge(On("D2X", 14_025)).NewMultipliers);
|
||||
}
|
||||
|
||||
/// N1MM's score window gives contacts, traffic sent and traffic received a
|
||||
/// row of their own on every band, and the multipliers in a band row carry
|
||||
/// that band's weight: four on 80, three on 40, two on 20, 15 and 10.
|
||||
[Fact]
|
||||
public void TheScoreSplitsByBandAndByKindOfRow()
|
||||
{
|
||||
ContestLog log = LogFor(Cw, TestLog.Germany);
|
||||
log.Add(On("JA1XYZ", 3_525));
|
||||
log.Add(On("K1ABC", 14_025));
|
||||
log.Add(new WaeQtc(
|
||||
Callsign.Parse("JA1XYZ"), IsSent: false, 1, 10, "1435", Callsign.Parse("W1AW"), 42)
|
||||
.ApplyTo(On("JA1XYZ", 3_525)));
|
||||
|
||||
Assert.Equal(4, log.Rows[new ScoreKey("80M", WaeQtc.Contact)].TotalMultipliers);
|
||||
Assert.Equal(1, log.Rows[new ScoreKey("80M", WaeQtc.Contact)].Points);
|
||||
Assert.Equal(2, log.Rows[new ScoreKey("20M", WaeQtc.Contact)].TotalMultipliers);
|
||||
|
||||
ScoreTally traffic = log.Rows[new ScoreKey("80M", WaeQtc.Received)];
|
||||
Assert.Equal(1, traffic.Qsos);
|
||||
Assert.Equal(1, traffic.Points);
|
||||
Assert.Equal(0, traffic.TotalMultipliers);
|
||||
|
||||
Assert.Equal(log.Tally.Points, log.Rows.Values.Sum(r => r.Points));
|
||||
Assert.Equal(log.Tally.TotalMultipliers, log.Rows.Values.Sum(r => r.TotalMultipliers));
|
||||
}
|
||||
|
||||
[Fact]
|
||||
public void AQtcIsAPointAndNothingElse()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user