Allow for a separate random seed for wind turbulence#1253
Allow for a separate random seed for wind turbulence#1253bcoconni merged 5 commits intoJSBSim-Team:masterfrom
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #1253 +/- ##
==========================================
+ Coverage 24.77% 24.95% +0.17%
==========================================
Files 169 169
Lines 19421 19523 +102
==========================================
+ Hits 4812 4871 +59
- Misses 14609 14652 +43 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
bcoconni
left a comment
There was a problem hiding this comment.
Great job! It's good to have you back on board @seanmcleod70 👍
I have suggested one change to GetRandomSeed to cover the corner case where FGFDMExec and FGWinds are using the same random number generator in which case FGWinds::GetRandomSeed must return the same value than FGFDMExec::Srand.
|
I guess you should also add a test case to |
|
I've pushed a commit to return |
|
Bonus point: this PR is partially addressing #666 by removing some static variables 👍 |
Co-authored-by: Sean McLeod <sean@seanmcleod.com>
As per the discussion at #1250 allow the user to specify a separate random seed for the random number generator used by the turbulence code in
FGWinds.I've tested this by running
JSBSim.exewith a script and varying the random seeds and comparing the wind output in the CSV file.So in this example, running the script twice and toggling ``simulation/randomseed
between 1 and 2 but keepingatmosphere/randomseed` constant gives the exact same wind output with turbulence enabled.As mentioned here - #1250 (comment) I haven't been able to write a python test case using the test setup we have.