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

Consider using a gaussian distribution to compute CW speed of each Dx Station #24

Closed
w7sst opened this issue Sep 17, 2022 · 7 comments
Closed
Labels
enhancement New feature or request feedback Feedback to help us improve

Comments

@w7sst
Copy link
Owner

w7sst commented Sep 17, 2022

Summary

Consider using a gaussian distribution when generating the DxStation's CW sending speed instead of the current random number algorithm. This will give a greater concentration of sending speeds near a desired target receiving speed, rather than randomly across the range of speeds.

Motivation

Morse Runner's original implementation of the DX Station's CW Sending speed is using a random distribution across the range of sending speeds. When I am practicing receiving call signs, I find I learn better if most Dx Station calls are using a similar target CW speed over the desired range. I think this change will help those people trying to improve their copy.

Detailed Description

  • The Dx Station will send its message using a CW speed in the range [MinRxSpeed, MaxRxSpeed].
  • Current code uses a random function to generate a speed within the above range.
  • Consider using a gaussian distribution function to generate a number within this range.

Current Implementation

The current implementation computes a random value within the range [Wpm-MinRxWpm, Wpm+MaxRxWpm].

  { use Random value, [Wpm-Min, Wpm+Max] }
  Result := Round(Ini.Wpm - MinRxWpm + (MinRxWpm + MaxRxWpm) * Random);

Proposed Implementation

The proposed implementation uses a gaussian distribution between this same range. This results in a centering around the midpoint with a gaussian rolloff on either side.

  if useGaussLim then  { use Gaussian w/ limit, [Wpm-Min, Wpm+Max] }
    begin                           // assume Wpm=30,  MinRxWpm=6, MaxRxWpm=2
    mean := Ini.Wpm + (-MinRxWpm + MaxRxWpm)/2; // 30+(-6+2)/2 = 30-4/2 = 28
    limit := (MinRxWpm + MaxRxWpm)/2;           // (6+2)/2 = 4 wpm
    Result := Round(RndGaussLim(mean, limit));  // [28-4, 28+4] -> wpm [24,32]
    end
  else                      { use Random value, [Wpm-Min,Wpm+Max] }
     Result := Round(Ini.Wpm - MinRxWpm + (MinRxWpm + MaxRxWpm) * Random);

The code above has an example assuming Wpm=30, MinRxWpm=6, MaxRxWpm=2. Thus the range will be [30-6, 30+2], which simplifies to a CW speed range of [24, 32] (or mean=28 with limit=4). Computing a gaussian distribution value using RndGaussLim(28, 4) provides a value centered around 28wpm with a rolloff of +/- 4 wpm on either side.

Perhaps a switch can be provided via the MorseRunner.ini file (short term) and a future Settings Dialog (long term).

@w7sst w7sst added the enhancement New feature or request label Sep 17, 2022
@w7sst
Copy link
Owner Author

w7sst commented Sep 17, 2022

Hi @ct7aup, @scotthibbs,

I'd like to get your feedback on this proposal. I have implemented this behavior in the FD prototype that you have both used back in June. I don't know if you noticed this or not, but when using David's CW Rx Speed adjustment, the code you have is using this gaussian distribution idea rather than the original random number.

For me, I liked the centering of the Rx speeds centering around a given value. I can then tailor a range of values around a center value.

Do either of you have any feedback on this?

I've also thought of a few variations within the UI:

  • perhaps the UI could change to more of an offset from Transmit CW speed along with a CW Speed width, kind of a offset and width value.
  • perhaps Morse Runner's speed indicator is a receive speed selection. The menu item is then controlling the transmit speed delta. This allows most practices sessions to use a faster CW transmit speed than receive speed. A second menu pick would determine the receive speed width (e.g. +/- 5wpm).

@w7sst w7sst added the feedback Feedback to help us improve label Sep 17, 2022
@w7sst
Copy link
Owner Author

w7sst commented Sep 17, 2022

I also noticed that Steve, N2IC, has added his own modification using a random value within the range of [wpm-10, wpm+2].

Steve's implementation is simply:

TDxOperator.GetWpm: integer;
begin
  if RunMode = rmHst
    then Result := Ini.Wpm
    else Result := Round((Ini.Wpm - 10) + Random(12));
end;

@ct7aup
Copy link
Collaborator

ct7aup commented Sep 19, 2022

  • perhaps the UI could change to more of an offset from Transmit CW speed along with a CW Speed width, kind of a offset and width value.
  • perhaps Morse Runner's speed indicator is a receive speed selection. The menu item is then controlling the transmit speed delta. This allows most practices sessions to use a faster CW transmit speed than receive speed. A second menu pick would determine the receive speed width (e.g. +/- 5wpm).

The advantage of having a minRxSpeed and a maxRxSpeed instead of having a width value is having the possibility to adjust the gaussian curve to the user needs. If the user wants to consolidate his receiving he can shift the curve to the left and if he wants to exit his confort zone he can shift the curve to the right.

@w7sst
Copy link
Owner Author

w7sst commented Sep 19, 2022

David, thank you for your feedback.

The advantage of having a minRxSpeed and a maxRxSpeed instead of having a width value is having the possibility to adjust the gaussian curve to the user needs. If the user wants to consolidate his receiving he can shift the curve to the left and if he wants to exit his confort zone he can shift the curve to the right.

David, I see your point. With separate min/max controls, the user can simply adjust the receive speed from either end of the range. This makes sense and is simpler for the user. I think you are suggesting to leave the UI as is.

It would be nice if we could find a double-slider UI Component, something like this control. It would allow both min/max values could be specified using one control.

What do you think of using a gaussian random function versus the original random function? Did you get a chance to listen to the difference in the current prototype?

@ct7aup
Copy link
Collaborator

ct7aup commented Sep 19, 2022

It would be nice if we could find a double-slider UI Component, something like this control. It would allow both min/max values could be specified using one control.
Yes. It is a very nice control.Is very suitable to this propose.

What do you think of using a gaussian random function versus the original random function? Did you get a chance to listen to the difference in the current prototype?

I forgot to comment this. I understand your point of view. In the real world the operators tend to adjust their speed. So using the gaussian function aligns the program to the real world. But using the gaussian random function gives more predictability on the receiver speed. So it could mantain the user near his confort zone. Without the gaussian function the rx speed will be more random, so it forces the user to manage the different speeds. It could be a bit more difficult but it prepares better the user to the real world.

One good think of the Morse Runner with all band conditions setting active is that tends to be more difficult than a real contest. So it turns the operation on the radio easier. Thats why I like Morse Runner.

@w7sst
Copy link
Owner Author

w7sst commented Sep 23, 2022

David @ct7aup,

But using the gaussian random function gives more predictability on the receiver speed. So it could mantain the user near his confort zone. Without the gaussian function the rx speed will be more random, so it forces the user to manage the different speeds. It could be a bit more difficult but it prepares better the user to the real world.

Are you saying you like the random distribution better because it is better for training purposes? I see your point. I do agree that the gaussian distribution seems to provide a pocket of comfort where most stations calling you are on similar speeds.

I think I'll add a switch in the .INI file to adjust this and leave it off by default (meaning random distribution is enabled by default).

@scotthibbs, Do you have any thoughts on this conversation?

@w7sst
Copy link
Owner Author

w7sst commented Sep 30, 2022

To resolve this discussion, I decided to add a variable to the .INI file to allow user to enable gaussian distribution if they want to use it.

To enable usage of the gaussian distribution, add the following to the [Station] section of the MorseRunner.ini file:

[Station]
GetWpmUsesGaussian=1

I have not documented this switch in the Readme.txt file.

@w7sst w7sst closed this as completed in 605e7df Oct 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request feedback Feedback to help us improve
Projects
None yet
Development

No branches or pull requests

2 participants