public abstract class AbstractPartialDerivativesEquations extends Object implements AdditionalEquations
PartialDerivativesEquations
and MultiPartialDerivativesEquations
.Constructor and Description |
---|
AbstractPartialDerivativesEquations()
Empty constructor for
Externalizable use. |
AbstractPartialDerivativesEquations(String nameIn)
Simple constructor.
|
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 |
clearSelectedParameters()
Clear the selected parameters list.
|
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.
|
void |
concatenate(List<Parameter> parameters)
Concatenate a list of parameters with the already existing selectedParameters list
Check that the parameter to add is not already on the list (to avoid problems with the step)
|
boolean |
contains(Parameter parameter)
Check if the parameter is already in the selectedParameters list
|
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.
|
List<Parameter> |
getAvailableParameters()
Get the names of the available parameters in the propagator.
|
int |
getFirstOrderDimension()
Returns the number of first order additional states.
|
protected abstract List<ForceModel> |
getForceModels()
Returns the propagator force models.
|
protected abstract Frame |
getFrame()
Returns the propagator frame.
|
double |
gethPos()
Returns the step used for finite difference computation with respect to spacecraft position.
|
List<IJacobiansParameterizable> |
getJacobiansProviders()
Get the list of jacobians providers.
|
JacobiansMapper |
getMapper()
Get a mapper between two-dimensional Jacobians and one-dimensional additional state.
|
String |
getName()
Get the name of the additional state.
|
protected abstract OrbitType |
getOrbitType()
Returns the propagator orbit type.
|
int |
getParamDim()
Returns the parameters dimension.
|
protected abstract PositionAngle |
getPositionAngle()
Returns the propagator position angle.
|
int |
getSecondOrderDimension()
Returns the number of second order additional states.
|
List<ParameterConfiguration> |
getSelectedParameters()
Get a copy of the selected parameters.
|
boolean |
isDirty()
Returns a boolean for force models / selected parameters consistency.
|
boolean |
isInitialJacobians()
Returns true if the initial Jacobians have not been initialized yet.
|
void |
readExternal(ObjectInput oi) |
void |
selectParamAndStep(Parameter parameter,
double hP)
Select the parameters to consider for Jacobian processing.
|
void |
selectParameters(List<Parameter> parameters)
Select the parameters to consider for Jacobian processing.
|
void |
selectParameters(Parameter... parameters)
Select the parameters to consider for Jacobian processing.
|
void |
setDirty(boolean value)
Setter for the boolean for force models / selected parameters consistency.
|
void |
setHPos(double value)
Setter for the step used for finite difference computation with respect to spacecraft position
|
SpacecraftState |
setInitialJacobians(SpacecraftState s0)
Set the initial value of the Jacobian with respect to state and parameter.
|
SpacecraftState |
setInitialJacobians(SpacecraftState s,
double[][] dY1dY0)
Set the initial value of the Jacobian with respect to state.
|
SpacecraftState |
setInitialJacobians(SpacecraftState s1,
double[][] dY1dY0,
double[][] dY1dP)
Set the initial value of the Jacobian with respect to state and parameter.
|
SpacecraftState |
setInitialJacobians(SpacecraftState s,
Parameter parameter,
double[] dY1dP)
Set the initial value of the Jacobian with respect to state.
|
void |
setSteps(double hPosition)
Set the step for finite differences with respect to spacecraft position.
|
void |
writeExternal(ObjectOutput oo) |
public AbstractPartialDerivativesEquations()
Externalizable
use.public AbstractPartialDerivativesEquations(String nameIn)
Upon construction, this set of equations is automatically added to the propagator by calling its
NumericalPropagator.addAdditionalEquations(AdditionalEquations)
method. So there is no need to call this
method explicitly for these equations.
nameIn
- name of the partial derivatives equationspublic String getName()
getName
in interface AdditionalEquations
public List<ParameterConfiguration> getSelectedParameters()
public void clearSelectedParameters()
public void selectParameters(Parameter... parameters)
Parameters names have to be consistent with some ForceModel
added elsewhere.
parameters
- parameters to consider for Jacobian processing. Parameters will not be added if already added elsewhereNumericalPropagator.addForceModel(ForceModel)
,
setInitialJacobians(SpacecraftState, double[][], double[][])
,
ForceModel
,
Parameterizable
public void selectParameters(List<Parameter> parameters)
Parameters names have to be consistent with some ForceModel
added elsewhere.
parameters
- list of parameters to consider for Jacobian processingNumericalPropagator.addForceModel(ForceModel)
,
setInitialJacobians(SpacecraftState, double[][], double[][])
,
ForceModel
,
Parameterizable
public void selectParamAndStep(Parameter parameter, double hP)
Parameters names have to be consistent with some ForceModel
added elsewhere.
parameter
- parameter to consider for Jacobian processing. Parameter will not be added if already added elsewherehP
- step to use for computing Jacobian column with respect to the specified parameterNumericalPropagator.addForceModel(ForceModel)
,
setInitialJacobians(SpacecraftState, double[][], double[][])
,
ForceModel
,
Parameterizable
public List<Parameter> getAvailableParameters()
The names returned depend on the force models set up in the propagator, including the Newtonian attraction from the central body.
public JacobiansMapper getMapper() throws PatriusException
PatriusException
- if the initial Jacobians have not been initialized yetsetInitialJacobians(SpacecraftState)
,
setInitialJacobians(SpacecraftState, double[][], double[][])
public void concatenate(List<Parameter> parameters)
parameters
- list of parameters to concatenatepublic boolean contains(Parameter parameter)
parameter
- to checkpublic void setSteps(double hPosition)
hPosition
- step used for finite difference computation with respect to spacecraft position (m)public SpacecraftState setInitialJacobians(SpacecraftState s0) throws PatriusException
This method is equivalent to call setInitialJacobians(SpacecraftState, double[][], double[][])
with
dYdY0 set to the identity matrix and dYdP set to a zero matrix.
s0
- initial statePatriusException
- if the partial equation has not been registered in
the propagator or if matrices dimensions are incorrectselectedParameters
,
selectParamAndStep(Parameter, double)
public SpacecraftState setInitialJacobians(SpacecraftState s1, double[][] dY1dY0, double[][] dY1dP) throws PatriusException
s1
- current statedY1dY0
- Jacobian of current state at time t1 with respect
to state at some previous time t0 (6x6)dY1dP
- Jacobian of current state at time t1 with respect
to parameters (may be null if no parameters are selected)PatriusException
- if the partial equation has not been registered in
the propagator or if matrices dimensions are incorrectselectedParameters
,
selectParamAndStep(Parameter, double)
public SpacecraftState setInitialJacobians(SpacecraftState s, double[][] dY1dY0) throws PatriusException
If state does not have partial derivatives yet, an exception is thrown. Call
setInitialJacobians(SpacecraftState)
to initialize Jacobians with default values or
setInitialJacobians(SpacecraftState, double[][], double[][])
to initialize Jacobians with own values.
s
- current statedY1dY0
- Jacobian of current state at time t1 with respect
to state at some previous time t0 (6x6)PatriusException
- if the partial equation has not been registered in
the propagator or if matrices dimensions are incorrectselectedParameters
,
selectParamAndStep(Parameter, double)
public SpacecraftState setInitialJacobians(SpacecraftState s, Parameter parameter, double[] dY1dP) throws PatriusException
If state does not have partial derivatives yet, an exception is thrown. Call
setInitialJacobians(SpacecraftState)
to initialize Jacobians with default values or
setInitialJacobians(SpacecraftState, double[][], double[][])
to initialize Jacobians with own values.
s
- current stateparameter
- parameterdY1dP
- Jacobian of current state at time t1 with respect to provided parameterPatriusException
- if the partial equation has not been registered in
the propagator or if matrices dimensions are incorrect or if state partial derivatives have not
been initialized beforehandselectedParameters
,
selectParamAndStep(Parameter, double)
public int getFirstOrderDimension()
CowellIntegrator
.getFirstOrderDimension
in interface AdditionalEquations
public int getSecondOrderDimension()
CowellIntegrator
.getSecondOrderDimension
in interface AdditionalEquations
public void writeExternal(ObjectOutput oo) throws IOException
writeExternal
in interface Externalizable
IOException
public void readExternal(ObjectInput oi) throws IOException, ClassNotFoundException
readExternal
in interface Externalizable
IOException
ClassNotFoundException
public List<IJacobiansParameterizable> getJacobiansProviders()
public boolean isInitialJacobians()
public int getParamDim()
public double gethPos()
public void setHPos(double value)
value
- the new step used for finite difference computation with respect to spacecraft positionpublic boolean isDirty()
public void setDirty(boolean value)
value
- the new boolean for force models / selected parameters consistencypublic void computeDerivatives(SpacecraftState s, TimeDerivativesEquations adder) throws PatriusException
computeDerivatives
in interface AdditionalEquations
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 occurspublic double[] computeSecondDerivatives(SpacecraftState s) throws PatriusException
CowellIntegrator
.computeSecondDerivatives
in interface AdditionalEquations
s
- current state information: date, kinematics, attitude, additional statesPatriusException
- if some specific error occurspublic double[] buildAdditionalState(double[] y, double[] yDot)
CowellIntegrator
.buildAdditionalState
in interface AdditionalEquations
y
- second order additional state yyDot
- second order additional state derivative yDotpublic double[] extractY(double[] additionalState)
CowellIntegrator
.extractY
in interface AdditionalEquations
additionalState
- full first order additional statepublic double[] extractYDot(double[] additionalState)
CowellIntegrator
.extractYDot
in interface AdditionalEquations
additionalState
- full first order additional stateprotected abstract List<ForceModel> getForceModels()
protected abstract Frame getFrame()
protected abstract OrbitType getOrbitType()
protected abstract PositionAngle getPositionAngle()
Copyright © 2023 CNES. All rights reserved.