Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decouple KeplerianOrbit from GravityEffector #5

Merged

Conversation

patkenneally
Copy link
Contributor

@patkenneally patkenneally commented Dec 15, 2022

Description

This PR is a refactoring and introduces no new functionality. The KeplerianOrbit module's coupling with GravityEffector.GravBodyData is undesirable. The KeplerianOrbit module is using the GravBodyData to get at the mu gravitational constant parameter. No other feature/aspect of the module needs the GravBodyData type. We should uncouple these two and change the KeplerianOrbit module to take a mu value which is obtained from a source of truth location such as astroConstants.h. Decoupling these also provides a simpler generated Python API where the user of the KeplerianOrbit module won't be surprised that the GravBodyData type appears. Rather, users are coached to use single source of truth APIs to get at constants.

Verification

The unit tests for the module were updated to account for this change in api.

Documentation

Doc strings in the module are updated

Future work

None

Former-commit-id: abf9001d6345caf89a3fe3a6d75dfba1742ad5ed
Former-commit-id: 1a25a192811f5d584c42e40a9e14f4275345174c
@patkenneally patkenneally requested a review from schaubh December 15, 2022 21:44
@patkenneally patkenneally force-pushed the refactor/decouple-keplarian-orbit-from-gravityEffector branch from bca364e to 19515e5 Compare December 15, 2022 21:54
@patkenneally patkenneally changed the title [REFACTOR] Decouple keplarian orbit from gravity effector [REFACTOR] Decouple KeplerianOrbit from GravityEffector Dec 15, 2022
@patkenneally patkenneally linked an issue Dec 15, 2022 that may be closed by this pull request
@patkenneally patkenneally changed the title [REFACTOR] Decouple KeplerianOrbit from GravityEffector [resolve #6] Decouple KeplerianOrbit from GravityEffector Dec 15, 2022
@patkenneally patkenneally changed the title [resolve #6] Decouple KeplerianOrbit from GravityEffector [refactor] Decouple KeplerianOrbit from GravityEffector Dec 15, 2022
@patkenneally patkenneally changed the title [refactor] Decouple KeplerianOrbit from GravityEffector [GH-6] Decouple KeplerianOrbit from GravityEffector Dec 15, 2022
@patkenneally patkenneally changed the title [GH-6] Decouple KeplerianOrbit from GravityEffector [refactor] Decouple KeplerianOrbit from GravityEffector Dec 15, 2022
@patkenneally patkenneally changed the title [refactor] Decouple KeplerianOrbit from GravityEffector Decouple KeplerianOrbit from GravityEffector Dec 15, 2022
@patkenneally patkenneally self-assigned this Dec 15, 2022
Copy link
Contributor

@schaubh schaubh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

almost there, just small changes.

This change seek primarily seeks to establish discipline in
preventing "use-before-set" possibilities. Generally member
data should be initialized in-class or in a constructor
initialization list. See C++ Core Guidelines C.48 and C.49
@patkenneally patkenneally force-pushed the refactor/decouple-keplarian-orbit-from-gravityEffector branch from 19515e5 to 44fbc26 Compare December 16, 2022 01:48
@patkenneally patkenneally requested a review from schaubh December 16, 2022 04:02
@patkenneally patkenneally merged commit cae789e into develop Dec 16, 2022
@patkenneally patkenneally deleted the refactor/decouple-keplarian-orbit-from-gravityEffector branch December 16, 2022 04:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Decouple KeplerianOrbit from GravityEffector
2 participants