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

Feature/bsk 857 polymorphic state data #858

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from

Conversation

juan-g-bonilla
Copy link
Contributor

@juan-g-bonilla juan-g-bonilla commented Nov 25, 2024

Description

StateData was made polymorphic, StateData::propagateState is now virtual.

This also required improvements to how the integrators work. ExtendedStateVector was given additional methods and updated to handle the polymorphic StateData. Similarly, DynParamManager had to be updated (registerState is now a templated method for different state classes, for example). Unfortunately, this means a SWIG file is now necessary for DynParamManager (templated code needs some extra massaging in SWIG), which in turn means a lot of SWIG interface files must be updated to use this new SWIG file.

I'm a good boy scout, so I also tried to clean up code and add extra docstrings in these classes.

Verification

Commit 8976004 (or it's current equivalent) removes support for operator+ and operator* on StateData, that test_stateArchitecture depended on. This test has been updated to use other, equivalent, methods.

No new tests added. Essentially all other Basilisk tests use StateData and integration, thus these tests passing should prove the refactored system works as expected. For now, only one StateData class appears in Basilisk (with the standard propagation function), and that should be shown to work. New StateData classes should be tested as they are implemented.

Documentation

No changes. API remains very similar: by default DynParamManager assumes you want to create a standard StateData. The state system is not discussed on the prosaic documentation, thus no changes are needed.

Future work

Implement custom StateData classes, such as the MRPStateData or QuaternionStateData classes described in #857

@juan-g-bonilla juan-g-bonilla self-assigned this Nov 25, 2024
@juan-g-bonilla juan-g-bonilla requested a review from a team as a code owner November 25, 2024 04:45
@juan-g-bonilla juan-g-bonilla force-pushed the feature/bsk-857-polymorphic-StateData branch 3 times, most recently from 9b6777c to 93442a2 Compare November 27, 2024 04:18
@juan-g-bonilla
Copy link
Contributor Author

Ola @joaogvcarneiro! I have a test failing for this branch. It's related to the variable integrator scenario, which I believe you wrote?

I made some changes to the adaptive integrators. The math should be the same, but the numerics have shifted around. I think the failing test is testing to an accuracy that is within the integrator error, so the updated numerics trigger the comparison failure. That's only my intuition, so I'd appreciate your take on it if you have a minute.

@juan-g-bonilla juan-g-bonilla added the enhancement New feature or request label Nov 27, 2024
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
None yet
Development

Successfully merging this pull request may close these issues.

Make StateData polymorphic to support alternative state propagation equations
1 participant