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 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
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 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