Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DX station will send an abbreviated exchange number #204 #207

Merged
merged 1 commit into from
Apr 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Main.pas
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ TFieldDefinition = record
(C: 'Zone'; R: '[0-9]*'; L: 4; T:Ord(etItuZone)),
(C: 'Age'; R: '[0-9][0-9]'; L: 2; T:Ord(etAge)),
(C: 'Power'; R: '([0-9]*)|(K)|(KW)|([0-9A]*[OTN]*)'; L: 4; T:Ord(etPower)),
(C: 'Number'; R: '([0-9]*)([LMHP])'; L: 4; T:Ord(etJaPref)),
(C: 'Number'; R: '([0-9]*)([LMHP])'; L: 7; T:Ord(etJaCity))
(C: 'Number'; R: '([0-9AOTN]*)([LMHP])'; L: 4; T:Ord(etJaPref)),
(C: 'Number'; R: '([0-9AOTN]*)([LMHP])'; L: 7; T:Ord(etJaCity))
);

type
Expand Down
17 changes: 17 additions & 0 deletions Station.pas
Original file line number Diff line number Diff line change
Expand Up @@ -350,6 +350,23 @@ function TStation.NrAsText: string;
if Random < 0.97
then Result := StringReplace(Result, '9', 'N', [rfReplaceAll]);
end;

// for JARL ALLJA, ACAG contest
// The probability is adjusted to the domestic CW situation
if (Ini.RunMode <> rmHst) and (SentExchTypes.Exch2 in
[etJaPref, etJaCity]) and
(MyCall <> Ini.Call) then
begin
if Random < 0.4 then begin
Result := StringReplace(Result, '0', 'O', [rfReplaceAll]);
Result := StringReplace(Result, '00', 'TT', [rfReplaceAll]);
end
else if Random < 0.8
then Result := StringReplace(Result, '0', 'T', [rfReplaceAll]);

if Random < 0.1
then Result := StringReplace(Result, '9', 'N', [rfReplaceAll]);
end;
end;


Expand Down