Log the time the BARTG exchange went out

The BARTG RTTY contest sends the time with the serial number, and both
stations log the time the other one sent. The entry window now has the
report, serial and time boxes N1MM's has, and the time this station sent
is stamped into the MiscText column as the exchange message goes out, or
at log time when nothing sent it. The Cabrillo line writes that time and
falls back to the time of the contact when the column is empty, which is
what N1MM writes, in N1MM's columns.

The total score was points times every multiplier. N1MM's class works
out points times the countries and areas together, times the continents.
Per-contact points and multiplier flags do not change, so the station's
2022 log still scores contact for contact as N1MM did.

N1MM has a class each for the March HF RTTY contest and the September
sprint. This program has one contest holding the March rules under the
sprint's name, and docs/unfinished.md now says so.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RoGtneMQaz4M9w7Kk49AVD
This commit is contained in:
2026-08-31 13:29:08 +00:00
parent a07b181ee1
commit 12dab9644a
7 changed files with 137 additions and 14 deletions

View File

@@ -120,6 +120,33 @@ public class CabrilloWriterTests
Assert.EndsWith("ABC ", writer.QsoLine(Contact() with { Exchange1 = "ABCDEF" }));
}
/// BARTG writes the time this station sent, which is the `MiscText`
/// column, and the time the other station sent in the exchange column.
[Fact]
public void TheBartgLineCarriesBothTimes()
{
CabrilloWriter writer = new(new BartgSprint(), Me);
string line = writer.QsoLine(
Contact(14_025, Modes.Rtty) with { MiscText = "1704", Exchange1 = "905" });
Assert.Equal(
"QSO: 14025 RY 2026-05-30 1234 "
+ "DL1ABC 599 0012 1704 "
+ "JA1XYZ 599 0034 0905 0",
line);
}
/// A contact logged before the time was stamped falls back to the time of
/// the contact, as N1MM does.
[Fact]
public void TheBartgLineFallsBackToTheTimeOfTheContact()
{
CabrilloWriter writer = new(new BartgSprint(), Me);
Assert.Contains("1234 JA1XYZ", writer.QsoLine(Contact(14_025, Modes.Rtty)));
}
/// `CabrilloFormat = 2` is the NAQP line: the serial number and the two
/// exchange values, each in a column of its own.
[Fact]

View File

@@ -50,6 +50,38 @@ public class OperatingPositionTests
session.Entry.Set(ExchangeSlot.Zone, zone);
}
/// The BARTG contest sends the time of the exchange, and logs the time it
/// sent rather than the time the contact was logged.
[Fact]
public void TheTimeTheExchangeWentOutIsLoggedForBartg()
{
OperatingPosition session = Session(new BartgSprint());
session.Entry.Call = "JA1XYZ";
session.Entry.Set(ExchangeSlot.ReceivedReport, "599");
session.Entry.Set(ExchangeSlot.SerialNumber, "12");
session.Entry.Set(ExchangeSlot.Exchange1, "1646");
session.StampSentTime();
string stamped = session.SentTime;
Qso logged = session.LogContact();
Assert.Equal(4, stamped.Length);
Assert.Equal(stamped, logged.MiscText);
Assert.Equal("", session.SentTime);
}
/// A contest that does not exchange a time keeps the column empty.
[Fact]
public void NothingIsStampedForAContestThatSendsNoTime()
{
OperatingPosition session = Session();
Type(session, "JA1XYZ", "25");
session.StampSentTime();
Assert.Equal("", session.SentTime);
Assert.Equal("", session.LogContact().MiscText);
}
[Fact]
public void LoggingAContactPutsItInTheLogAndClearsTheEntry()
{