Class PartialDerivativesEquations
- java.lang.Object
-
- org.orekit.propagation.numerical.PartialDerivativesEquations
-
- All Implemented Interfaces:
AdditionalEquations
public class PartialDerivativesEquations extends Object implements AdditionalEquations
Set ofadditional 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.The partial derivatives with respect to initial state can be either dimension 6 (orbit only) or 7 (orbit and mass).
The partial derivatives with respect to force models parameters has a dimension equal to the number of selected parameters. Parameters selection is implemented at
force models
level. Users must retrieve aparameter driver
usingForceModel.getParameterDriver(String)
and then select it by callingsetSelected(true)
.If several force models provide different
drivers
for the same parameter name, selecting any of these drivers has the side effect of selecting all the drivers for this shared parameter. In this case, the partial derivatives will be the sum of the partial derivatives contributed by the corresponding force models. This case typically arises for central attraction coefficient, which has an influence onNewtonian attraction
,gravity field
, andrelativity
.- Author:
- Véronique Pommier-Maurussane, Luc Maisonobe
-
-
Constructor Summary
Constructors Constructor Description PartialDerivativesEquations(String name, NumericalPropagator propagator)
Simple constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description double[]
computeDerivatives(SpacecraftState s, double[] pDot)
Compute the derivatives related to the additional state parameters.JacobiansMapper
getMapper()
Get a mapper between two-dimensional Jacobians and one-dimensional additional state.String
getName()
Get the name of the additional state.ParameterDriversList
getSelectedParameters()
Get the selected parameters, in Jacobian matrix column order.SpacecraftState
setInitialJacobians(SpacecraftState s0)
Set the initial value of the Jacobian with respect to state and parameter.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 stateDimension)
Deprecated.as of 9.0, replaced bysetInitialJacobians(SpacecraftState)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.orekit.propagation.integration.AdditionalEquations
init
-
-
-
-
Constructor Detail
-
PartialDerivativesEquations
public PartialDerivativesEquations(String name, NumericalPropagator propagator)
Simple constructor.Upon construction, this set of equations is automatically added to the propagator by calling its
AbstractIntegratedPropagator.addAdditionalEquations(AdditionalEquations)
method. So there is no need to call this method explicitly for these equations.- Parameters:
name
- name of the partial derivatives equationspropagator
- the propagator that will handle the orbit propagation
-
-
Method Detail
-
getName
public String getName()
Get the name of the additional state.- Specified by:
getName
in interfaceAdditionalEquations
- Returns:
- name of the additional state
-
getSelectedParameters
public ParameterDriversList getSelectedParameters()
Get the selected parameters, in Jacobian matrix column order.The force models parameters for which partial derivatives are desired, must have been
selected
before this method is called, so the proper list is returned.- Returns:
- selected parameters, in Jacobian matrix column order which is lexicographic order
-
setInitialJacobians
public SpacecraftState setInitialJacobians(SpacecraftState s0)
Set the initial value of the Jacobian with respect to state and parameter.This method is equivalent to call
setInitialJacobians(SpacecraftState, double[][], double[][])
with dYdY0 set to the identity matrix and dYdP set to a zero matrix.The force models parameters for which partial derivatives are desired, must have been
selected
before this method is called, so proper matrices dimensions are used.- Parameters:
s0
- initial state- Returns:
- state with initial Jacobians added
- Since:
- 9.0
- See Also:
getSelectedParameters()
-
setInitialJacobians
@Deprecated public SpacecraftState setInitialJacobians(SpacecraftState s0, int stateDimension)
Deprecated.as of 9.0, replaced bysetInitialJacobians(SpacecraftState)
Set the initial value of the Jacobian with respect to state and parameter.This method is equivalent to call
setInitialJacobians(SpacecraftState, double[][], double[][])
with dYdY0 set to the identity matrix and dYdP set to a zero matrix.The force models parameters for which partial derivatives are desired, must have been
selected
before this method is called, so proper matrices dimensions are used.- Parameters:
s0
- initial statestateDimension
- state dimension, must be either 6 for orbit only or 7 for orbit and mass- Returns:
- state with initial Jacobians added
- See Also:
getSelectedParameters()
-
setInitialJacobians
public SpacecraftState setInitialJacobians(SpacecraftState s1, double[][] dY1dY0, double[][] dY1dP)
Set the initial value of the Jacobian with respect to state and parameter.The returned state must be added to the propagator (it is not done automatically, as the user may need to add more states to it).
The force models parameters for which partial derivatives are desired, must have been
selected
before this method is called, and thedY1dP
matrix dimension must be consistent with the selection.- Parameters:
s1
- current statedY1dY0
- Jacobian of current state at time t₁ with respect to state at some previous time t₀ (must be 6x6)dY1dP
- Jacobian of current state at time t₁ with respect to parameters (may be null if no parameters are selected)- Returns:
- state with initial Jacobians added
- See Also:
getSelectedParameters()
-
getMapper
public JacobiansMapper getMapper()
Get a mapper between two-dimensional Jacobians and one-dimensional additional state.- Returns:
- a mapper between two-dimensional Jacobians and one-dimensional additional state, with the same name as the instance
- See Also:
setInitialJacobians(SpacecraftState, int)
,setInitialJacobians(SpacecraftState, double[][], double[][])
-
computeDerivatives
public double[] computeDerivatives(SpacecraftState s, double[] pDot)
Compute the derivatives related to the additional state parameters.When this method is called, the spacecraft state contains the main state (orbit, attitude and mass), all the states provided through the
additional state providers
registered to the propagator, and the additional state integrated using this equation. It does not contains any other states to be integrated alongside during the same propagation.- Specified by:
computeDerivatives
in interfaceAdditionalEquations
- Parameters:
s
- current state information: date, kinematics, attitude, and additional statepDot
- placeholder where the derivatives of the additional parameters should be put- Returns:
- cumulative effect of the equations on the main state (may be null if equations do not change main state at all)
-
-