Fix wind initial conditions#855
Merged
agodemar merged 3 commits intoJSBSim-Team:masterfrom Mar 15, 2023
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## master #855 +/- ##
==========================================
+ Coverage 22.43% 22.60% +0.17%
==========================================
Files 167 167
Lines 19608 19602 -6
==========================================
+ Hits 4400 4432 +32
+ Misses 15208 15170 -38
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
bcoconni
added a commit
to bcoconni/jsbsim
that referenced
this pull request
Apr 8, 2023
* Fix Wind IC * Add tests for Wind IC. * Protect `atan2` against domain errors.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes a 12+ years old bug where the input value was not converted from kts to ft/s.
void FGInitialCondition::SetWindDownKtsIC(double wD) { const FGMatrix33& Tb2l = orientation.GetTInv(); FGColumnVector3 _vt_NED = Tb2l * Tw2b * FGColumnVector3(vt, 0., 0.); - _vt_NED(eW) = vUVW_NED(eW) + wD; + _vt_NED(eW) = vUVW_NED(eW) + wD * ktstofps;The PR contains an update to the unit test
FGInitialConditionsTest.hto prevent regressions. I also took this opportunity to fix a couple of details:ktstofpsis computed to the floating point precision ofdouble(thanks to the C++constexprfeature, the computation is done at compile time, i.e. once for all)GetNEDWindFpsIChas been removed as it was redundant withGetWindNEDFpsIC.