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(String nameIn,
NumericalPropagator propagatorIn)
Simple constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
computeDerivatives(SpacecraftState s,
TimeDerivativesEquations adder)
Compute the derivatives related to the additional state parameters.
|
List<Parameter> |
getAvailableParameters()
Get the names of the available parameters in the propagator.
|
JacobiansMapper |
getMapper()
Get a mapper between two-dimensional Jacobians and one-dimensional additional state.
|
String |
getName()
Get the name of the additional state.
|
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.
|
public PartialDerivativesEquations(String nameIn, NumericalPropagator propagatorIn) throws PatriusException
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 propagationPatriusException
- if a set of equations with the same name is already presentpublic 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 occursCopyright © 2019 CNES. All Rights Reserved.