[#1328] Added wind environment modules#1329
Open
carlo98 wants to merge 1 commit intoAVSLab:developfrom
Open
Conversation
Contributor
Author
|
@juan-g-bonilla @schaubh |
Contributor
Author
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.

Description
Implements the wind environment module infrastructure requested in issue #1328.
Two modules are introduced:
WindBase— abstract base class that handles all shared operations for atmospheric wind models:scStateInMsg) and one planet SPICE ephemeris (planetPosInMsg) per instance.r_BP_N = r_BN_N - r_PN_Nat every time step, handling simulations where the planet is not at the inertial origin.planetOmega_Nautomatically fromJ20002PfixandJ20002Pfix_dotwhen SPICE provides orientation derivatives; falls back to a subclass-supplied value when the derivative is zero.epochDateTimestructure for time-dependent empirical models, populated from the optionalepochInMsgor via thecustomSetEpochFromVariable()method.windOutMsgper update.CorotatingAtmosphereWindModelcomputesv_wind_N = planetOmega_N x r_BP_NDefaults to Earth's sidereal rotation rate about the inertial Z-axis (
OMEGA_EARTH). The rotation rate can be overridden viasetPlanetOmega_N()or automatically from SPICE DCM derivatives managed byWindBase.Verification
Unit tests added in
_UnitTest/test_corotatingAtmosphereWindModel.py:v_wind_N = omega x r_BP_Nfor all combinations of zero/non-zero planet position and manual/default rotation rate.OMEGA_EARTH.setPlanetOmega_N/getPlanetOmega_N.Reset()raises whenplanetPosInMsgis not linked.Reset()raises whenscStateInMsgis not linked.planetOmega_Nis derived fromJ20002Pfix_dotwhen non-zero.planetOmega_Nderived from DCM combined with non-zero planet position.epochInMsgdoes not breakReset()or the wind output.windOutMsgis zeroed when input messages are linked but not yet written.Documentation
windBase.rstadded.corotatingAtmosphereWindModel.rstadded.docs/source/Support/ReleaseNotes/1328-windBase_corotatingAtmosphereWindModel.rst.Future work
WindBasesubclasses, reusing all shared infrastructure.