forked from VE3NEA/MorseRunner
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
DX station will send an abbreviated exchange number #204
- Loading branch information
Showing
2 changed files
with
19 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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]); | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
jr8ppg
Author
Collaborator
|
||
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; | ||
|
||
|
||
|
Hi @jr8ppg ,
Is this what you wanted here? This first
StringReplace
will mask the replacement on the next line. This means that '0' will never be abbreviated with 'T', only 'O'. Perhaps you want 40%'0'->'O'
replacement and 80%'0'->'T'
replacement.I am working on a fix now for this overall function and will have it posted soon. Thanks, Mike