You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
During code review and while working on #319, I noticed that when a QrmStation is created, the call to RndGaussLim() function result in an extremely short time (near zero) time duration. The call is attempting to create a timeout delay in the range of 2 to 6 seconds, but the result is ~0.
Details
The current code for computing the Timeout for the subsequent transmission is:
The problem is that the second argument value, 2, is in units of seconds, not in units of blocks. The first and second arguments must be in the same units. There are ~21.5 blocks/second. Substituting blocks for seconds, we have RndGaussLim(86, 2). This will clip the result to +/-2 blocks, or +/- 0.09 seconds, which is not anywhere near to desired 2 to 6 second timeout value.
The code should be (after converting the second argument from seconds to blocks:
This results in a timeout delay between 2 to 6 seconds.
Steps To Reproduce
This is hard to reproduce at runtime since QrmStation's are infrequently created. When they are created, their transmission times will appear to have a non-existent time delay between transmissions.
Expected behavior
There should be a 2 to 6 second delay between transmissions from the same QRM Station.
Actual Behavior
The transmissions appear almost immediately and there is no delay between transmissions.
Version information
Morse Runner version: 1.84 and prior
OS/Version: Windows 11
Tasks
Coding
Code Review and Integration
Validation?
The text was updated successfully, but these errors were encountered:
- Previous code was creating QRM stations with ~0.1 second timeout.
- This timeout is the time between transmissions.
- timeout delay is now 2 to 6 seconds using a limited gaussian distribution
w7sst
linked a pull request
Jun 9, 2024
that will
close
this issue
Description
During code review and while working on #319, I noticed that when a QrmStation is created, the call to RndGaussLim() function result in an extremely short time (near zero) time duration. The call is attempting to create a timeout delay in the range of 2 to 6 seconds, but the result is ~0.
Details
The current code for computing the Timeout for the subsequent transmission is:
The problem is that the second argument value, 2, is in units of seconds, not in units of blocks. The first and second arguments must be in the same units. There are ~21.5 blocks/second. Substituting blocks for seconds, we have
RndGaussLim(86, 2)
. This will clip the result to +/-2 blocks, or +/- 0.09 seconds, which is not anywhere near to desired 2 to 6 second timeout value.The code should be (after converting the second argument from seconds to blocks:
This results in:
This results in a timeout delay between 2 to 6 seconds.
Steps To Reproduce
This is hard to reproduce at runtime since QrmStation's are infrequently created. When they are created, their transmission times will appear to have a non-existent time delay between transmissions.
Expected behavior
There should be a 2 to 6 second delay between transmissions from the same QRM Station.
Actual Behavior
The transmissions appear almost immediately and there is no delay between transmissions.
Version information
Tasks
The text was updated successfully, but these errors were encountered: