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
co-authored by Claude Opus 5
parent a07b181ee1
commit 12dab9644a
7 changed files with 137 additions and 14 deletions
+21
View File
@@ -44,6 +44,10 @@ public sealed class OperatingPosition
public string Comment { get; set; } = "";
/// The time this station sent, `HHmm`, for a contest that exchanges it.
/// Empty until the exchange has gone out.
public string SentTime { get; private set; } = "";
public Contest Contest => Session.Contest;
public ContestInstance Instance => Session.Instance;
@@ -199,13 +203,28 @@ public sealed class OperatingPosition
{
throw new InvalidOperationException($"the exchange for {Entry.Call} is not complete");
}
StampSentTime();
Qso stored = Session.Add(Noted(BuildQso(Entry.Call.Trim())));
Entry.Clear();
OtherName = "";
Comment = "";
SentTime = "";
return stored;
}
/// Notes the time the exchange went out, which the BARTG RTTY contest
/// sends and logs. The first message of a contact sets it, so the time in
/// the log is the time the other station copied, not the time the contact
/// was logged. Does nothing for the contests that do not send a time.
public void StampSentTime()
{
if (Contest.StampsSentTime && SentTime.Length == 0 && Entry.Call.Trim().Length > 2)
{
SentTime = DateTime.UtcNow.ToString("HHmm");
Session.NotifyChanged();
}
}
/// Puts the report the operator would send anyway into the report boxes
/// that are empty: 599 on CW and digital modes, 59 on phone. N1MM does the
/// same when the callsign box is left, which is why neither program stops
@@ -386,6 +405,7 @@ public sealed class OperatingPosition
Entry.Clear();
OtherName = "";
Comment = "";
SentTime = "";
Session.NotifyChanged();
}
@@ -396,6 +416,7 @@ public sealed class OperatingPosition
{
Name = qso.Name.Length > 0 ? qso.Name : OtherName.Trim(),
Comment = qso.Comment.Length > 0 ? qso.Comment : Comment.Trim(),
MiscText = qso.MiscText.Length > 0 ? qso.MiscText : SentTime,
};
/// The report an operator sends without thinking about it: 599 on CW and