Move the Mach/VCAS conversion methods to FGAuxiliary
#898
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
FGAuxiliary
rather than toFGAtmosphere
as the PR #881 did. For that purpose,FGAuxiliary
only needs an access toFGAtmosphere
constants such as the specific heat ratio and the standard day pressure, temperature and speed of sound. As these areconstexpr
members,FGAuxiliary
can safely access them using C++ qualified identifiers such asFGAtmosphere::StdDaySLpressure
which is much simpler than #881 and #885 combined. Even though the standard day speed of sound needs a special treatment as the functionsqrt
cannot be used forconstexpr
members. So we need to fall back to a good oldconst
variable forStdDaySLsoundspeed
.IMHO, with this PR, all the pieces are finally falling into place and I'd suggest to merge this PR and cancel #885.