public class CunninghamAttractionModel extends JacobiansParameterizable implements ForceModel, GradientModel, AttractionModel
The algorithm implemented in this class has been designed by Leland E. Cunningham (Lockheed Missiles and Space Company, Sunnyvale and Astronomy Department University of California, Berkeley) in his 1969 paper: On the computation of the spherical harmonic terms needed during the numerical integration of the orbital motion of an artificial satellite (Celestial Mechanics 2, 1970).
The implementation of this class enables the computation of partial derivatives by finite differences with respect to the central attraction coefficient.
Warning: using a 0x0 Earth potential model is equivalent to a simple Newtonian attraction. However computation times will be much slower since this case is not particularized and hence conversion from body frame (often ITRF) to integration frame is necessary.
Modifier and Type | Field and Description |
---|---|
static String |
RADIUS
Parameter name for equatorial radius.
|
MU
Constructor and Description |
---|
CunninghamAttractionModel(Frame centralBodyFrame,
double equatorialRadius,
double mu,
double[][] cIn,
double[][] sIn)
Creates a new instance.
|
CunninghamAttractionModel(Frame centralBodyFrame,
double equatorialRadius,
double mu,
double[][] cIn,
double[][] sIn,
int degreePD,
int orderPD)
Creates a new instance.
|
CunninghamAttractionModel(Frame centralBodyFrame,
Parameter equatorialRadius,
Parameter mu,
double[][] cIn,
double[][] sIn)
Creates a new instance using
Parameter . |
CunninghamAttractionModel(Frame centralBodyFrame,
Parameter equatorialRadius,
Parameter mu,
double[][] cIn,
double[][] sIn,
int degreePD,
int orderPD)
Creates a new instance using
Parameter . |
Modifier and Type | Method and Description |
---|---|
void |
addContribution(SpacecraftState state,
TimeDerivativesEquations adder)
Compute the contribution of the force model to the perturbing
acceleration.
|
void |
addDAccDParam(SpacecraftState state,
Parameter param,
double[] dAccdParam)
Compute acceleration derivatives with respect to additional parameters.
|
void |
addDAccDState(SpacecraftState state,
double[][] dAccdPos,
double[][] dAccdVel)
Compute acceleration derivatives with respect to state parameters.
|
void |
checkData(AbsoluteDate start,
AbsoluteDate end)
This methods throws an exception if the user did not provide all the required data to perform model call on
provided range [start; end].
|
Vector3D |
computeAcceleration(PVCoordinates pv,
AbsoluteDate date)
Method to compute the acceleration.
|
Vector3D |
computeAcceleration(SpacecraftState state)
Compute the acceleration due to the force.
|
boolean |
computeGradientPosition()
This method returns true if the acceleration partial derivatives with
respect to position have to be computed.
|
boolean |
computeGradientVelocity()
This method returns true if the acceleration partial derivatives with
respect to velocity have to be computed.
|
Frame |
getBodyFrame()
Get the central body frame
|
double[][] |
getC() |
EventDetector[] |
getEventsDetectors()
Get the discrete events related to the model.
|
double |
getMu()
Get the central attraction coefficient &mu.
|
double[][] |
getS() |
addJacobiansParameter, addJacobiansParameter, addJacobiansParameter, supportsJacobianParameter
addParameter, getParameters, supportsParameter
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getParameters, supportsParameter
public static final String RADIUS
public CunninghamAttractionModel(Frame centralBodyFrame, double equatorialRadius, double mu, double[][] cIn, double[][] sIn)
centralBodyFrame
- rotating body frameequatorialRadius
- reference equatorial radius of the potentialmu
- central body attraction coefficient (m3/s2)cIn
- un-normalized coefficients array (cosine part)sIn
- un-normalized coefficients array (sine part)IllegalArgumentException
- if coefficients array do not matchpublic CunninghamAttractionModel(Frame centralBodyFrame, double equatorialRadius, double mu, double[][] cIn, double[][] sIn, int degreePD, int orderPD)
centralBodyFrame
- rotating body frameequatorialRadius
- reference equatorial radius of the potentialmu
- central body attraction coefficient (m3/s2)cIn
- un-normalized coefficients array (cosine part)sIn
- un-normalized coefficients array (sine part)degreePD
- degree for partial derivativesorderPD
- order for partial derivativesIllegalArgumentException
- if coefficients array do not match or degree and/or order
for partial derivatives is higher than degree and/or order for accelerationpublic CunninghamAttractionModel(Frame centralBodyFrame, Parameter equatorialRadius, Parameter mu, double[][] cIn, double[][] sIn)
Parameter
.centralBodyFrame
- rotating body frameequatorialRadius
- reference equatorial radius of the potentialmu
- parameter representing central body attraction coefficient
(m3/s2)cIn
- parameter representing un-normalized coefficients array (cosine part)sIn
- un-normalized coefficients array (sine part)IllegalArgumentException
- if coefficients array do not matchpublic CunninghamAttractionModel(Frame centralBodyFrame, Parameter equatorialRadius, Parameter mu, double[][] cIn, double[][] sIn, int degreePD, int orderPD)
Parameter
.centralBodyFrame
- rotating body frameequatorialRadius
- reference equatorial radius of the potentialmu
- parameter representing central body attraction coefficient
(m3/s2)cIn
- parameter representing un-normalized coefficients array (cosine part)sIn
- un-normalized coefficients array (sine part)degreePD
- degree for partial derivativesorderPD
- order for partial derivativesIllegalArgumentException
- if coefficients array do not match or degree and/or order
for partial derivatives is higher than degree and/or order for accelerationpublic void addContribution(SpacecraftState state, TimeDerivativesEquations adder) throws PatriusException
addContribution
in interface ForceModel
state
- current state information: date, kinematics, attitudeadder
- object where the contribution should be addedPatriusException
- if some specific error occurspublic final EventDetector[] getEventsDetectors()
getEventsDetectors
in interface ForceModel
public boolean computeGradientPosition()
computeGradientPosition
in interface GradientModel
public boolean computeGradientVelocity()
computeGradientVelocity
in interface GradientModel
public Vector3D computeAcceleration(SpacecraftState state) throws PatriusException
computeAcceleration
in interface ForceModel
state
- current state information: date, kinematics, attitudeSpacecraftState frame
PatriusException
- if some specific error occurspublic Vector3D computeAcceleration(PVCoordinates pv, AbsoluteDate date)
Method to compute the acceleration. This method has been implemented in order to validate the force model only. The reason is that for the validation context, we do not want to set up an instance of the SpacecraftState object to avoid the inertial frame of the spacecraft orbit.
(see Story #V82 and Feature #34 on https://www.orekit.org/forge/issues/34)
Out of the validation context, one must use the method Vector3D computeAcceleration(final SpacecraftState s)
Fixes bug #97: Numerical stability errors for high order gravity field. (see https://www.orekit.org/forge/issues/97) The error and was due to the acceleration being computed as r^n * (cn * gradC + sn * gradS). As order n increased r^n increased up to exceed floating point limits whereas the gradient decreased. In fact r^n * grad was always a normal floating point number despite both terms were not. The fix involved changing the loops so the gradients did include the r^n part.
pv
- PV coordinates of the spacecraftdate
- datepublic final void addDAccDState(SpacecraftState state, double[][] dAccdPos, double[][] dAccdVel) throws PatriusException
addDAccDState
in interface IJacobiansParameterizable
state
- spacecraft statedAccdPos
- acceleration derivatives with respect to positiondAccdVel
- acceleration derivatives with respect to velocityPatriusException
- if derivatives cannot be computedpublic void addDAccDParam(SpacecraftState state, Parameter param, double[] dAccdParam) throws PatriusException
addDAccDParam
in interface IJacobiansParameterizable
state
- spacecraft stateparam
- the parameter with respect to which derivatives are requireddAccdParam
- acceleration derivatives with respect to specified parametersPatriusException
- if derivatives cannot be computedpublic double getMu()
getMu
in interface AttractionModel
public double[][] getC()
public double[][] getS()
public Frame getBodyFrame()
public void checkData(AbsoluteDate start, AbsoluteDate end) throws PatriusException
checkData
in interface ForceModel
start
- range start dateend
- range end datePatriusException
- thrown if some data is missingCopyright © 2020 CNES. All rights reserved.