public interface AdditionalEquations extends Externalizable
In some cases users may need to integrate some problem-specific equations along with classical spacecraft equations of motions. One example is optimal control in low thrust where adjoint parameters linked to the minimized hamiltonian must be integrated. Another example is formation flying or rendez-vous which use the Clohessy-Whiltshire equations for the relative motion.
This interface allows users to add such equations to a numerical
propagator
. Users provide the equations as an implementation of this interface and register it to the propagator
thanks to its NumericalPropagator.addAdditionalEquations(AdditionalEquations)
method. Several such objects
can be registered with each numerical propagator, but it is recommended to gather in the same object the sets of
parameters which equations can interact on each others states.
The additional parameters are gathered in a simple p array. The additional equations compute the pDot array, which is
the time-derivative of the p array. Since the additional parameters p may also have an influence on the equations of
motion themselves (for example an equation linked to a complex thrust model may induce an acceleration and a mass
change), the same time derivatives equations adder
already shared by all force
models to add their contributions is also provided to the additional equations implementation object. This means
these equations can be used as an additional force model if needed. If the additional parameters have no influence at
all on the spacecraft state, this adder can simply be ignored.
This interface is the numerical (read not already integrated) counterpart of the
AdditionalStateProvider
interface. It allows to append various additional
state parameters to any numerical propagator
.
NumericalPropagator
,
AdditionalStateProvider
Modifier and Type | Method and Description |
---|---|
double[] |
buildAdditionalState(double[] y,
double[] yDot)
Build full first order additional state from second order y and yDot.
|
void |
computeDerivatives(SpacecraftState s,
TimeDerivativesEquations adder)
Compute the derivatives related to the additional state parameters.
|
double[] |
computeSecondDerivatives(SpacecraftState s)
Compute the second derivatives related to the additional state parameters.
|
double[] |
extractY(double[] additionalState)
Retrieve second order additional state y from full first order additional state.
|
double[] |
extractYDot(double[] additionalState)
Retrieve second order additional state derivative yDot from full first order additional state.
|
int |
getFirstOrderDimension()
Returns the number of first order additional states.
|
String |
getName()
Get the name of the additional state.
|
int |
getSecondOrderDimension()
Returns the number of second order additional states.
|
readExternal, writeExternal
String getName()
void computeDerivatives(SpacecraftState s, TimeDerivativesEquations adder) throws PatriusException
s
- current state information: date, kinematics, attitude, additional statesadder
- object where the contribution of the additional parameters
to the orbit evolution (accelerations) should be addedPatriusException
- if some specific error occursdouble[] computeSecondDerivatives(SpacecraftState s) throws PatriusException
CowellIntegrator
.s
- current state information: date, kinematics, attitude, additional statesPatriusException
- if some specific error occursint getFirstOrderDimension()
CowellIntegrator
.int getSecondOrderDimension()
CowellIntegrator
.double[] buildAdditionalState(double[] y, double[] yDot)
CowellIntegrator
.y
- second order additional state yyDot
- second order additional state derivative yDotdouble[] extractY(double[] additionalState)
CowellIntegrator
.additionalState
- full first order additional statedouble[] extractYDot(double[] additionalState)
CowellIntegrator
.additionalState
- full first order additional stateCopyright © 2023 CNES. All rights reserved.