Skip to content

Commit

Permalink
DX station will send an abbreviated exchange number #204 (#207)
Browse files Browse the repository at this point in the history
  • Loading branch information
w7sst authored Apr 22, 2023
2 parents 4595e07 + 2b56510 commit 4dc9008
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 2 deletions.
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 @@ -351,6 +351,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

0 comments on commit 4dc9008

Please sign in to comment.