public class PartialDerivativesEquations extends Object implements AdditionalEquations
additional equations
computing the partial derivatives
of the state (orbit) with respect to initial state and force models parameters.
This set of equations are automatically added to a numerical propagator
in order to
compute partial derivatives of the orbit along with the orbit itself. This is useful for example in orbit
determination applications.
Constructor and Description |
---|
PartialDerivativesEquations()
Empty constructor for
Externalizable use. |
PartialDerivativesEquations(String nameIn,
NumericalPropagator propagatorIn)
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 |
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.
|
List<Parameter> |
getAvailableParameters()
Get the names of the available parameters in the propagator.
|
int |
getFirstOrderDimension()
Returns the number of first order additional states.
|
JacobiansMapper |
getMapper()
Get a mapper between two-dimensional Jacobians and one-dimensional additional state.
|
String |
getName()
Get the name of the additional state.
|
int |
getSecondOrderDimension()
Returns the number of second order additional states.
|
void |
readExternal(ObjectInput oi) |
void |
selectParamAndStep(Parameter parameter,
double hP)
Select the parameters to consider for Jacobian processing.
|
void |
selectParameters(Parameter... parameters)
Select the parameters to consider for Jacobian processing.
|
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 s0,
int paramDimension)
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 PartialDerivativesEquations()
Externalizable
use.public PartialDerivativesEquations(String nameIn, NumericalPropagator propagatorIn)
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 equationspropagatorIn
- the propagator that will handle the orbit propagationpublic String getName()
getName
in interface AdditionalEquations
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 void selectParameters(Parameter... parameters)
Parameters names have to be consistent with some ForceModel
added elsewhere.
parameters
- 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 processinghP
- step to use for computing Jacobian column with respect to the specified parameterNumericalPropagator.addForceModel(ForceModel)
,
setInitialJacobians(SpacecraftState, double[][], double[][])
,
ForceModel
,
Parameterizable
public void setSteps(double hPosition)
hPosition
- step used for finite difference computation with respect to spacecraft position (m)public SpacecraftState setInitialJacobians(SpacecraftState s0, int paramDimension) 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 stateparamDimension
- parameters dimensionPatriusException
- 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, int)
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, int)
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 JacobiansMapper getMapper() throws PatriusException
PatriusException
- if the initial Jacobians have not been initialized yetsetInitialJacobians(SpacecraftState, int)
,
setInitialJacobians(SpacecraftState, double[][], double[][])
public 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 int getFirstOrderDimension()
CowellIntegrator
.getFirstOrderDimension
in interface AdditionalEquations
public int getSecondOrderDimension()
CowellIntegrator
.getSecondOrderDimension
in interface AdditionalEquations
public 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 statepublic 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
Copyright © 2021 CNES. All rights reserved.