-
Notifications
You must be signed in to change notification settings - Fork 61
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
base: develop
Are you sure you want to change the base?
Conversation
9b6777c
to
93442a2
Compare
Also improvements to docstrings in StateData
DynParamManager now makes use of some templated code, for which we need to provide some SWIG machinery.
Now, we make use of the StateData propragate function, which can now be overridden to provide custom state integration function.
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. |
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 polymorphicStateData
. 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 forDynParamManager
(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+
andoperator*
onStateData
, thattest_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 oneStateData
class appears in Basilisk (with the standard propagation function), and that should be shown to work. NewStateData
classes should be tested as they are implemented.Documentation
No changes. API remains very similar: by default
DynParamManager
assumes you want to create a standardStateData
. The state system is not discussed on the prosaic documentation, thus no changes are needed.Future work
Implement custom
StateData
classes, such as theMRPStateData
orQuaternionStateData
classes described in #857