public class EmpiricalForce extends JacobiansParameterizable implements ForceModel, GradientModel
Given an orbit and a local frame (usually a LOF frame), and three vectors A, B and C defined in this frame, the
acceleration due to a generic empirical force is the following:
aloc = Acos(nωt) + Bsin(nωt) + C,
where n is the harmonic factor and ω is the orbital period.
As ω is usually unknown, cos(nωt) and sin(nωt) are computed from the orbital position of the spacecraft:
The implementation of this class enables the computation of partial derivatives with respect to the X, Y and Z-components of the A, B and C coefficients.
Modifier and Type | Field and Description |
---|---|
static String |
AX_COEFFICIENT
X-component of the A coefficient.
|
static String |
AY_COEFFICIENT
Y-component of the A coefficient.
|
static String |
AZ_COEFFICIENT
Z-component of the A coefficient.
|
static String |
BX_COEFFICIENT
X-component of the B coefficient.
|
static String |
BY_COEFFICIENT
Y-component of the B coefficient.
|
static String |
BZ_COEFFICIENT
Z-component of the B coefficient.
|
static String |
CX_COEFFICIENT
X-component of the C coefficient.
|
static String |
CY_COEFFICIENT
Y-component of the C coefficient.
|
static String |
CZ_COEFFICIENT
Z-component of the C coefficient.
|
Constructor and Description |
---|
EmpiricalForce(int harmonicFactor,
Vector3D vectorS,
IParamDiffFunction ax,
IParamDiffFunction ay,
IParamDiffFunction az,
IParamDiffFunction bx,
IParamDiffFunction by,
IParamDiffFunction bz,
IParamDiffFunction cx,
IParamDiffFunction cy,
IParamDiffFunction cz,
Frame coeffsFrame)
Simple constructor for an empiric force using parameterizable functions for A; B and C coef
with a given frame.
|
EmpiricalForce(int harmonicFactor,
Vector3D vectorS,
IParamDiffFunction ax,
IParamDiffFunction ay,
IParamDiffFunction az,
IParamDiffFunction bx,
IParamDiffFunction by,
IParamDiffFunction bz,
IParamDiffFunction cx,
IParamDiffFunction cy,
IParamDiffFunction cz,
LOFType coeffsFrameLOFType)
Simple constructor for an empiric force using parameterizable functions for A; B and C coef
with a given LOF frame.
|
EmpiricalForce(int harmonicFactor,
Vector3D vectorS,
Parameter ax,
Parameter ay,
Parameter az,
Parameter bx,
Parameter by,
Parameter bz,
Parameter cx,
Parameter cy,
Parameter cz,
Frame coeffsFrame)
Simple constructor for an empiric force using
Parameter for A; B and C coef
with a given frame. |
EmpiricalForce(int harmonicFactor,
Vector3D vectorS,
Parameter ax,
Parameter ay,
Parameter az,
Parameter bx,
Parameter by,
Parameter bz,
Parameter cx,
Parameter cy,
Parameter cz,
LOFType coeffsFrameLOFType)
Simple constructor for an empiric force using
Parameter for A; B and C coef
with a given LOF frame. |
EmpiricalForce(int harmonicFactor,
Vector3D vectorS,
Vector3D a,
Vector3D b,
Vector3D c,
Frame coeffsFrame)
Simple constructor for an empiric force, assigning a generic frame to the A, B, C coefficients
frame.
|
EmpiricalForce(int harmonicFactor,
Vector3D vectorS,
Vector3D a,
Vector3D b,
Vector3D c,
LOFType coeffsFrameLOFType)
Simple constructor for an empiric force.
|
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,
LocalOrbitalFrame localFrameValidation,
Vector3D vectorS,
Frame frame,
SpacecraftState state)
Method to compute the acceleration.
|
Vector3D |
computeAcceleration(SpacecraftState state)
Compute the acceleration due to the force.
|
double[] |
computeCosSin(PVCoordinates pv,
Vector3D vectorS)
Private method to compute the cos(nwt) and sin(nwt) values.
|
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.
|
IParamDiffFunction |
getAx()
Get the parametereziable function for the Ax coefficient.
|
IParamDiffFunction |
getAy()
Get the parametereziable function for the Ay coefficient.
|
IParamDiffFunction |
getAz()
Get the parametereziable function for the Az coefficient.
|
IParamDiffFunction |
getBx()
Get the parametereziable function for the Bx coefficient.
|
IParamDiffFunction |
getBy()
Get the parametereziable function for the By coefficient.
|
IParamDiffFunction |
getBz()
Get the parametereziable function for the Bz coefficient.
|
IParamDiffFunction |
getCx()
Get the parametereziable function for the Ax coefficient.
|
IParamDiffFunction |
getCy()
Get the parametereziable function for the Cy coefficient.
|
IParamDiffFunction |
getCz()
Get the parametereziable function for the Cz coefficient.
|
EventDetector[] |
getEventsDetectors()
Get the discrete events related to the model.
|
Frame |
getLocalFrame() |
Vector3D |
getVectorS() |
addJacobiansParameter, addJacobiansParameter, addJacobiansParameter, supportsJacobianParameter
addParameter, getParameters, supportsParameter
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getParameters, supportsParameter
public static final String AX_COEFFICIENT
public static final String AY_COEFFICIENT
public static final String AZ_COEFFICIENT
public static final String BX_COEFFICIENT
public static final String BY_COEFFICIENT
public static final String BZ_COEFFICIENT
public static final String CX_COEFFICIENT
public static final String CY_COEFFICIENT
public static final String CZ_COEFFICIENT
public EmpiricalForce(int harmonicFactor, Vector3D vectorS, Vector3D a, Vector3D b, Vector3D c, Frame coeffsFrame)
EmpiricalForce(int, Vector3D, Vector3D, Vector3D, Vector3D, LOFType)
constructor
should be used instead to avoid problems during propagation.harmonicFactor
- the harmonic factor n.vectorS
- the direction whose cross product with ω is used as a reference direction to
compute the cos(nωt) and sin(nωt) terms.a
- the vector representing the A coefficient (expressed in the local frame).b
- the vector representing the B coefficient (expressed in the local frame).c
- the vector representing the C coefficient (expressed in the local frame).coeffsFrame
- the frame of definition of vectors A, B and C.public EmpiricalForce(int harmonicFactor, Vector3D vectorS, Vector3D a, Vector3D b, Vector3D c, LOFType coeffsFrameLOFType)
harmonicFactor
- the harmonic factor n.vectorS
- the direction whose cross product with ω is used as a reference direction to
compute the cos(nωt) and sin(nωt) terms.a
- the vector representing the A coefficient (expressed in the local frame).b
- the vector representing the B coefficient (expressed in the local frame).c
- the vector representing the C coefficient (expressed in the local frame).coeffsFrameLOFType
- the frame of definition of vectors A, B and C.public EmpiricalForce(int harmonicFactor, Vector3D vectorS, Parameter ax, Parameter ay, Parameter az, Parameter bx, Parameter by, Parameter bz, Parameter cx, Parameter cy, Parameter cz, LOFType coeffsFrameLOFType)
Parameter
for A; B and C coef
with a given LOF frame.harmonicFactor
- the harmonic factorvectorS
- the direction vector whose cross product with ω is used as a reference direction
to compute the cos(nωt) and sin(nωt) terms.ax
- Parameter for A coefficient along x (ax)ay
- Parameter for A coefficient along Y (ay)az
- Parameter for A coefficient along Z (az)bx
- Parameter for B coefficient along x (bx)by
- Parameter for B coefficient along Y (by)bz
- Parameter for B coefficient along Z (bz)cx
- Parameter for C coefficient along x (cx)cy
- Parameter for C coefficient along Y (cy)cz
- Parameter for C coefficient along Z (cz)coeffsFrameLOFType
- the frame of definition of vectors A, B and Cpublic EmpiricalForce(int harmonicFactor, Vector3D vectorS, Parameter ax, Parameter ay, Parameter az, Parameter bx, Parameter by, Parameter bz, Parameter cx, Parameter cy, Parameter cz, Frame coeffsFrame)
Parameter
for A; B and C coef
with a given frame.
WARNING : If the frame of definition of vectors A,B and C is a local orbital frame (LOF),
this constructor must NOT be used, acceleration computation would fail.harmonicFactor
- the harmonic factor n.vectorS
- the direction whose cross product with ω is used as a reference direction to
compute the cos(nωt) and sin(nωt) terms.ax
- Parameter for A coefficient along x.ay
- Parameter for A coefficient along Y.az
- Parameter for A coefficient along Z.bx
- Parameter for B coefficient along x.by
- Parameter for B coefficient along Y.bz
- Parameter for B coefficient along Z.cx
- Parameter for C coefficient along x.cy
- Parameter for C coefficient along Y.cz
- Parameter for C coefficient along Z.coeffsFrame
- the frame of vectors A, B and C.public EmpiricalForce(int harmonicFactor, Vector3D vectorS, IParamDiffFunction ax, IParamDiffFunction ay, IParamDiffFunction az, IParamDiffFunction bx, IParamDiffFunction by, IParamDiffFunction bz, IParamDiffFunction cx, IParamDiffFunction cy, IParamDiffFunction cz, LOFType coeffsFrameLOFType)
harmonicFactor
- the harmonic factor n.vectorS
- the direction whose cross product with ω is used as a reference direction to
compute the cos(nωt) and sin(nωt) terms.ax
- Parameterizable function for A coefficient along x (ax)ay
- Parameterizable function for A coefficient along Y (ay)az
- Parameterizable function for A coefficient along Z (az)bx
- Parameterizable function for B coefficient along x (bx)by
- Parameterizable function for B coefficient along Y (by)bz
- Parameterizable function for B coefficient along Z (bz)cx
- Parameterizable function for C coefficient along x (cx)cy
- Parameterizable function for C coefficient along Y (cy)cz
- Parameterizable function for C coefficient along Z (cz)coeffsFrameLOFType
- the frame of definition of vectors A, B and C.public EmpiricalForce(int harmonicFactor, Vector3D vectorS, IParamDiffFunction ax, IParamDiffFunction ay, IParamDiffFunction az, IParamDiffFunction bx, IParamDiffFunction by, IParamDiffFunction bz, IParamDiffFunction cx, IParamDiffFunction cy, IParamDiffFunction cz, Frame coeffsFrame)
harmonicFactor
- the harmonic factor n.vectorS
- the direction whose cross product with ω is used as a reference direction to
compute the cos(nωt) and sin(nωt) terms.ax
- Parameterizable function for A coefficient along x.ay
- Parameterizable function for A coefficient along Y.az
- Parameterizable function for A coefficient along Z.bx
- Parameterizable function for B coefficient along x.by
- Parameterizable function for B coefficient along Y.bz
- Parameterizable function for B coefficient along Z.cx
- Parameterizable function for C coefficient along x.cy
- Parameterizable function for C coefficient along Y.cz
- Parameterizable function for C coefficient along Z.coeffsFrame
- the frame of vectors A, B and C.public 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 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, LocalOrbitalFrame localFrameValidation, Vector3D vectorS, Frame frame, SpacecraftState state) throws PatriusException
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 want to pass to this method some specific values for the local frame and the direction, which depends on external variables (the PV reference ephemeris).
Out of the validation context, one must use the method Vector3D computeAcceleration(final SpacecraftState s)pv
- PV coordinates of the spacecraft for the validation.localFrameValidation
- the local frame to use for the validation.vectorS
- the vector S.frame
- the frame in which the PV coordinates are given.state
- the spacecraft state.PatriusException
- if an Orekit error occurspublic double[] computeCosSin(PVCoordinates pv, Vector3D vectorS)
pv
- the pv coordinates.vectorS
- the vector S.public final Frame getLocalFrame()
public final Vector3D getVectorS()
public EventDetector[] getEventsDetectors()
getEventsDetectors
in interface ForceModel
public 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
AX_COEFFICIENT
--> derivatives with respect to the X-component of the A coefficient AY_COEFFICIENT
--> derivatives with respect to the Y-component of the A coefficient AZ_COEFFICIENT
--> derivatives with respect to the Z-component of the A coefficient BX_COEFFICIENT
--> derivatives with respect to the X-component of the B coefficient BY_COEFFICIENT
--> derivatives with respect to the Y-component of the B coefficient BZ_COEFFICIENT
--> derivatives with respect to the Z-component of the B coefficient CX_COEFFICIENT
--> derivatives with respect to the X-component of the C coefficient CY_COEFFICIENT
--> derivatives with respect to the Y-component of the C coefficient CZ_COEFFICIENT
--> derivatives with respect to the Z-component of the C coefficient 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 IParamDiffFunction getAx()
public IParamDiffFunction getAy()
public IParamDiffFunction getAz()
public IParamDiffFunction getBx()
public IParamDiffFunction getBy()
public IParamDiffFunction getBz()
public IParamDiffFunction getCx()
public IParamDiffFunction getCy()
public IParamDiffFunction getCz()
public boolean computeGradientPosition()
computeGradientPosition
in interface GradientModel
public boolean computeGradientVelocity()
computeGradientVelocity
in interface GradientModel
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.