Move the Mach/VCAS conversion methods to FGAuxiliary#898
Merged
agodemar merged 2 commits intoJSBSim-Team:masterfrom Apr 26, 2023
Merged
Move the Mach/VCAS conversion methods to FGAuxiliary#898agodemar merged 2 commits intoJSBSim-Team:masterfrom
FGAuxiliary#898agodemar merged 2 commits intoJSBSim-Team:masterfrom
Conversation
Codecov Report
@@ Coverage Diff @@
## master #898 +/- ##
==========================================
+ Coverage 23.05% 23.10% +0.04%
==========================================
Files 167 167
Lines 19619 19627 +8
==========================================
+ Hits 4524 4534 +10
+ Misses 15095 15093 -2
... and 1 file with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Member
|
Looks good. |
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 is a counter proposal to the PRs #881 and #885 that I previously submitted. The motivations remain the same than the ones exposed in #881 while avoiding the problems that the PR #885 is awkwardly trying to fix. In the current PR, the Mach/VCAS conversion methods are moved to
FGAuxiliary. As such this PR undoes #881 and supersedes #885.Basically the idea is to move the Mach/VCAS conversion routines to
FGAuxiliaryrather than toFGAtmosphereas the PR #881 did. For that purpose,FGAuxiliaryonly needs an access toFGAtmosphereconstants such as the specific heat ratio and the standard day pressure, temperature and speed of sound. As these areconstexprmembers,FGAuxiliarycan safely access them using C++ qualified identifiers such asFGAtmosphere::StdDaySLpressurewhich is much simpler than #881 and #885 combined. Even though the standard day speed of sound needs a special treatment as the functionsqrtcannot be used forconstexprmembers. So we need to fall back to a good oldconstvariable forStdDaySLsoundspeed.IMHO, with this PR, all the pieces are finally falling into place and I'd suggest to merge this PR and cancel #885.