Package org.orekit.forces.gravity
Class NewtonianAttraction
- java.lang.Object
-
- org.orekit.forces.gravity.NewtonianAttraction
-
- All Implemented Interfaces:
ForceModel
,EventDetectorsProvider
,ParameterDriversProvider
public class NewtonianAttraction extends Object implements ForceModel
Force model for Newtonian central body attraction.- Author:
- Luc Maisonobe
-
-
Field Summary
Fields Modifier and Type Field Description static String
CENTRAL_ATTRACTION_COEFFICIENT
Name of the single parameter of this model: the central attraction coefficient.-
Fields inherited from interface org.orekit.propagation.events.EventDetectorsProvider
DATATION_ACCURACY
-
-
Constructor Summary
Constructors Constructor Description NewtonianAttraction(double mu)
Simple constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends CalculusFieldElement<T>>
FieldVector3D<T>acceleration(FieldSpacecraftState<T> s, T[] parameters)
Compute acceleration.Vector3D
acceleration(SpacecraftState s, double[] parameters)
Compute acceleration.<T extends CalculusFieldElement<T>>
voidaddContribution(FieldSpacecraftState<T> s, FieldTimeDerivativesEquations<T> adder)
Compute the contribution of the force model to the perturbing acceleration.void
addContribution(SpacecraftState s, TimeDerivativesEquations adder)
Compute the contribution of the force model to the perturbing acceleration.boolean
dependsOnPositionOnly()
Check if force model depends on position only at a given, fixed date.<T extends CalculusFieldElement<T>>
TgetMu(Field<T> field, FieldAbsoluteDate<T> date)
Get the central attraction coefficient μ.double
getMu(AbsoluteDate date)
Get the central attraction coefficient μ.List<ParameterDriver>
getParametersDrivers()
Get the drivers for parameters.-
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.events.EventDetectorsProvider
getDateDetector, getEventDetectors, getFieldDateDetector, getFieldEventDetectors
-
Methods inherited from interface org.orekit.forces.ForceModel
dependsOnAttitudeRate, getEventDetectors, getFieldEventDetectors, init, init
-
Methods inherited from interface org.orekit.utils.ParameterDriversProvider
getNbParametersDriversValue, getParameterDriver, getParameters, getParameters, getParameters, getParameters, getParametersAllValues, getParametersAllValues, isSupported
-
-
-
-
Field Detail
-
CENTRAL_ATTRACTION_COEFFICIENT
public static final String CENTRAL_ATTRACTION_COEFFICIENT
Name of the single parameter of this model: the central attraction coefficient.- See Also:
- Constant Field Values
-
-
Method Detail
-
dependsOnPositionOnly
public boolean dependsOnPositionOnly()
Check if force model depends on position only at a given, fixed date.- Specified by:
dependsOnPositionOnly
in interfaceForceModel
- Returns:
- true if force model depends on position only, false if it depends on velocity, either directly or due to a dependency on attitude
-
getMu
public double getMu(AbsoluteDate date)
Get the central attraction coefficient μ.- Parameters:
date
- date at which the mu value wants to be known- Returns:
- mu central attraction coefficient (m³/s²)
-
getMu
public <T extends CalculusFieldElement<T>> T getMu(Field<T> field, FieldAbsoluteDate<T> date)
Get the central attraction coefficient μ.- Type Parameters:
T
- the type of the field element- Parameters:
field
- field to which the state belongsdate
- date at which the mu value wants to be known- Returns:
- mu central attraction coefficient (m³/s²)
-
addContribution
public void addContribution(SpacecraftState s, TimeDerivativesEquations adder)
Compute the contribution of the force model to the perturbing acceleration.The default implementation simply adds the
acceleration
as a non-Keplerian acceleration.- Specified by:
addContribution
in interfaceForceModel
- Parameters:
s
- current state information: date, kinematics, attitudeadder
- object where the contribution should be added
-
addContribution
public <T extends CalculusFieldElement<T>> void addContribution(FieldSpacecraftState<T> s, FieldTimeDerivativesEquations<T> adder)
Compute the contribution of the force model to the perturbing acceleration.- Specified by:
addContribution
in interfaceForceModel
- Type Parameters:
T
- type of the elements- Parameters:
s
- current state information: date, kinematics, attitudeadder
- object where the contribution should be added
-
acceleration
public Vector3D acceleration(SpacecraftState s, double[] parameters)
Compute acceleration.- Specified by:
acceleration
in interfaceForceModel
- Parameters:
s
- current state information: date, kinematics, attitudeparameters
- values of the force model parameters at state date, only 1 value for each parameterDriver- Returns:
- acceleration in same frame as state
-
acceleration
public <T extends CalculusFieldElement<T>> FieldVector3D<T> acceleration(FieldSpacecraftState<T> s, T[] parameters)
Compute acceleration.- Specified by:
acceleration
in interfaceForceModel
- Type Parameters:
T
- type of the elements- Parameters:
s
- current state information: date, kinematics, attitudeparameters
- values of the force model parameters at state date, only 1 value for each parameterDriver- Returns:
- acceleration in same frame as state
-
getParametersDrivers
public List<ParameterDriver> getParametersDrivers()
Get the drivers for parameters.- Specified by:
getParametersDrivers
in interfaceParameterDriversProvider
- Returns:
- drivers for parameters
-
-