public class ThirdBodyAttraction extends JacobiansParameterizable implements ForceModel, GradientModel
The implementation of this class enables the computation of partial derivatives by finite differences with respect to the central attraction coefficient.
Constructor and Description |
---|
ThirdBodyAttraction(CelestialBody bodyIn)
Simple constructor.
|
ThirdBodyAttraction(CelestialBody bodyIn,
boolean computePD)
Simple constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
addContribution(SpacecraftState s,
TimeDerivativesEquations adder)
Compute the contribution of the force model to the perturbing
acceleration.
|
void |
addDAccDParam(SpacecraftState s,
Parameter param,
double[] dAccdParam)
Compute acceleration derivatives with respect to additional parameters.
|
void |
addDAccDState(SpacecraftState s,
double[][] dAccdPos,
double[][] dAccdVel)
Compute acceleration derivatives with respect to state parameters.
|
Vector3D |
computeAcceleration(PVCoordinates pv,
Frame frame,
AbsoluteDate date)
Method to compute the acceleration.
|
Vector3D |
computeAcceleration(SpacecraftState s)
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.
|
CelestialBody |
getCelestialBody()
Return the celestial body.
|
EventDetector[] |
getEventsDetectors()
Get the discrete events related to the model.
|
addJacobiansParameter, addJacobiansParameter, addJacobiansParameter, supportsJacobianParameter
addParameter, getParameters, supportsParameter
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getParameters, supportsParameter
public ThirdBodyAttraction(CelestialBody bodyIn)
bodyIn
- the third body to consider (ex: CelestialBodyFactory.getSun()
or
CelestialBodyFactory.getMoon()
)public ThirdBodyAttraction(CelestialBody bodyIn, boolean computePD)
bodyIn
- the third body to consider (ex: CelestialBodyFactory.getSun()
or
CelestialBodyFactory.getMoon()
)computePD
- true if partial derivatives have to be computedpublic void addContribution(SpacecraftState s, TimeDerivativesEquations adder) throws PatriusException
addContribution
in interface ForceModel
s
- current state information: date, kinematics, attitudeadder
- object where the contribution should be addedPatriusException
- if some specific error occurspublic EventDetector[] getEventsDetectors()
getEventsDetectors
in interface ForceModel
public boolean computeGradientPosition()
computeGradientPosition
in interface GradientModel
public boolean computeGradientVelocity()
computeGradientVelocity
in interface GradientModel
public Vector3D computeAcceleration(SpacecraftState s) throws PatriusException
computeAcceleration
in interface ForceModel
s
- current state information: date, kinematics, attitudeSpacecraftState frame
PatriusException
- if some specific error occurspublic Vector3D computeAcceleration(PVCoordinates pv, Frame frame, AbsoluteDate date) 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 do not want to set up an instance of the SpacecraftState object to avoid the inertial frame of the spacecraft orbit.
(see Story #V85 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)
pv
- PV coordinates of the spacecraftframe
- frame in which the acceleration is computeddate
- datePatriusException
- if an Orekit error occurspublic final void addDAccDState(SpacecraftState s, double[][] dAccdPos, double[][] dAccdVel) throws PatriusException
addDAccDState
in interface IJacobiansParameterizable
s
- spacecraft statedAccdPos
- acceleration derivatives with respect to positiondAccdVel
- acceleration derivatives with respect to velocityPatriusException
- if derivatives cannot be computedpublic final void addDAccDParam(SpacecraftState s, Parameter param, double[] dAccdParam) throws PatriusException
addDAccDParam
in interface IJacobiansParameterizable
s
- spacecraft stateparam
- the parameter with respect to which derivatives are requireddAccdParam
- acceleration derivatives with respect to specified parametersPatriusException
- if derivatives cannot be computedpublic CelestialBody getCelestialBody()
Copyright © 2019 CNES. All rights reserved.