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

Port prescribedTrans module to C++ with coast profiler #588

Conversation

patkenneally
Copy link
Contributor

@patkenneally patkenneally commented Feb 3, 2024

  • Tickets addressed: bsk-564
  • Review: By commit
  • Merge strategy: Merge (no squash)

Description

This PR ports the existing prescribedTrans C module to a C++ module. The primary motivation for this migration is to provide a significantly simpler public api for the module. This simpler interface make the module easier to setup and use, and makes it much hard to use in an incorrect fashion.

This PR is a refactor of a previously opened PR #565 which was later closed in favor of this migration to C++. As a result, this PR implements the features added in the previous PR (in their order) and then cleans up elements made redundant by the move to C++. As a first step the PR ports the existing module directly to a C++ class. Then a new coast feature is added where a period of zero acceleration is added between the two acceleration segments when the user sets the ramp duration via setCoastRampDuration. The final significant change to the module is that all class variables are made private, with only the needed accessor methods provided.

Verification

The same module test is employed here with only modifications to account for the simplified module interface.

Documentation

The documentation from prescribedTrans module has been added and updated.

Future work

The prescribedTrans module is now deprecated. A general Basilisk module deprecation facility needs to be added so that we can mark an entire module as deprecated. I have a branch that does this and will open a separate PR for that.

@patkenneally patkenneally self-assigned this Feb 3, 2024
@leahkiner leahkiner linked an issue Feb 9, 2024 that may be closed by this pull request
@patkenneally patkenneally marked this pull request as ready for review February 9, 2024 22:15
@leahkiner leahkiner added the enhancement New feature or request label Feb 10, 2024
@leahkiner leahkiner force-pushed the feature/cpp-translation-with-coast-profiler branch 4 times, most recently from b09b3d1 to c2bc42a Compare February 12, 2024 20:57
Copy link
Contributor

@leahkiner leahkiner left a comment

Choose a reason for hiding this comment

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

I just finished adding my changes directly to this PR @patkenneally, it is ready for @schaubh and you to review!

@leahkiner leahkiner force-pushed the feature/cpp-translation-with-coast-profiler branch from c2bc42a to 66696e6 Compare February 12, 2024 21:03
@leahkiner leahkiner requested a review from schaubh February 12, 2024 21:06
@leahkiner leahkiner self-assigned this Feb 12, 2024
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.

Please see my comments. The CI test builds did not happen on this branch? I'm unable to compile the branch when I pulled the full forked repo. See comments on *.I file. This means I can't check documentation, unit test execution, etc.

Also, please see my comments of not moving this to simulation/dynamics. We are keeping the profilers in other folders. Profiler modules are odd as they can simulation the physics of a component, or they can be used in FSW as well.

As this module can be used in FSW as well, we need to add a C-wrapped output message as well. Just takes a few lines. In the comment I outline how to do this.

@leahkiner leahkiner force-pushed the feature/cpp-translation-with-coast-profiler branch 5 times, most recently from b2b5af0 to 7149ac3 Compare February 13, 2024 20:48
@patkenneally patkenneally force-pushed the feature/cpp-translation-with-coast-profiler branch from 7149ac3 to dfd80d6 Compare February 14, 2024 22:16
@leahkiner leahkiner force-pushed the feature/cpp-translation-with-coast-profiler branch from dfd80d6 to 7fe71cc Compare February 19, 2024 20:25
@patkenneally patkenneally force-pushed the feature/cpp-translation-with-coast-profiler branch from 7fe71cc to 5fb6260 Compare February 27, 2024 18:10
@leahkiner leahkiner force-pushed the feature/cpp-translation-with-coast-profiler branch 2 times, most recently from 2977097 to e8b4c3f Compare March 4, 2024 19:12
@schaubh schaubh self-requested a review March 5, 2024 03:03
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.

Did clean build on my system and everything passed. Documentation build was clean. I think this is good to go after rebasing on latest develop.

@patkenneally patkenneally force-pushed the feature/cpp-translation-with-coast-profiler branch from e8b4c3f to a730aa9 Compare March 6, 2024 14:59
@patkenneally patkenneally merged commit 4da8e1a into AVSLab:develop Mar 6, 2024
2 checks passed
@patkenneally patkenneally deleted the feature/cpp-translation-with-coast-profiler branch March 6, 2024 16:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Add translation with coast option to prescribedTrans module
3 participants