Package org.orekit.forces.gravity
Class NewtonianAttraction
- java.lang.Object
-
- org.orekit.forces.AbstractForceModel
-
- org.orekit.forces.gravity.NewtonianAttraction
-
- All Implemented Interfaces:
ForceModel
public class NewtonianAttraction extends AbstractForceModel
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.
-
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 org.hipparchus.RealFieldElement<T>>
org.hipparchus.geometry.euclidean.threed.FieldVector3D<T>acceleration(FieldSpacecraftState<T> s, T[] parameters)
Compute acceleration.org.hipparchus.geometry.euclidean.threed.Vector3D
acceleration(SpacecraftState s, double[] parameters)
Compute acceleration.<T extends org.hipparchus.RealFieldElement<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 models depends on position only.Stream<EventDetector>
getEventsDetectors()
Get the discrete events related to the model.<T extends org.hipparchus.RealFieldElement<T>>
Stream<FieldEventDetector<T>>getFieldEventsDetectors(org.hipparchus.Field<T> field)
Get the discrete events related to the model.double
getMu()
Get the central attraction coefficient μ.ParameterDriver[]
getParametersDrivers()
Get the drivers for force model parameters.-
Methods inherited from class org.orekit.forces.AbstractForceModel
complainIfNotSupported, getParameterDriver, isSupported
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.orekit.forces.ForceModel
getParameters, getParameters, init
-
-
-
-
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 models depends on position only.- 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()
Get the central attraction coefficient μ.- 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.- Parameters:
s
- current state information: date, kinematics, attitudeadder
- object where the contribution should be added
-
addContribution
public <T extends org.hipparchus.RealFieldElement<T>> void addContribution(FieldSpacecraftState<T> s, FieldTimeDerivativesEquations<T> adder)
Compute the contribution of the force model to the perturbing acceleration.- Type Parameters:
T
- type of the elements- Parameters:
s
- current state information: date, kinematics, attitudeadder
- object where the contribution should be added
-
acceleration
public org.hipparchus.geometry.euclidean.threed.Vector3D acceleration(SpacecraftState s, double[] parameters)
Compute acceleration.- Parameters:
s
- current state information: date, kinematics, attitudeparameters
- values of the force model parameters- Returns:
- acceleration in same frame as state
-
acceleration
public <T extends org.hipparchus.RealFieldElement<T>> org.hipparchus.geometry.euclidean.threed.FieldVector3D<T> acceleration(FieldSpacecraftState<T> s, T[] parameters)
Compute acceleration.- Type Parameters:
T
- type of the elements- Parameters:
s
- current state information: date, kinematics, attitudeparameters
- values of the force model parameters- Returns:
- acceleration in same frame as state
-
getEventsDetectors
public Stream<EventDetector> getEventsDetectors()
Get the discrete events related to the model.- Returns:
- stream of events detectors
-
getFieldEventsDetectors
public <T extends org.hipparchus.RealFieldElement<T>> Stream<FieldEventDetector<T>> getFieldEventsDetectors(org.hipparchus.Field<T> field)
Get the discrete events related to the model.- Type Parameters:
T
- extends RealFieldElement- Parameters:
field
- field to which the state belongs- Returns:
- stream of events detectors
-
getParametersDrivers
public ParameterDriver[] getParametersDrivers()
Get the drivers for force model parameters.- Returns:
- drivers for force model parameters
-
-