Interface ForceModel
-
- All Known Implementing Classes:
AbstractForceModel
,AbstractParametricAcceleration
,ConstantThrustManeuver
,DragForce
,HarmonicParametricAcceleration
,HolmesFeatherstoneAttractionModel
,NewtonianAttraction
,OceanTides
,PolynomialParametricAcceleration
,Relativity
,SolarRadiationPressure
,SolidTides
,ThirdBodyAttraction
public interface ForceModel
This interface represents a force modifying spacecraft motion.Objects implementing this interface are intended to be added to a
numerical propagator
before the propagation is started.The propagator will call at each step the
addContribution(SpacecraftState, TimeDerivativesEquations)
method. The force model instance will extract all the state data it needs (date, position, velocity, frame, attitude, mass) from the first parameter. From these state data, it will compute the perturbing acceleration. It will then add this acceleration to the second parameter which will take thins contribution into account and will use the Gauss equations to evaluate its impact on the global state derivative.Force models which create discontinuous acceleration patterns (typically for maneuvers start/stop or solar eclipses entry/exit) must provide one or more
events detectors
to the propagator thanks to theirgetEventsDetectors()
method. This method is called once just before propagation starts. The events states will be checked by the propagator to ensure accurate propagation and proper events handling.- Author:
- Mathieu Roméro, Luc Maisonobe, Véronique Pommier-Maurussane
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default 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.default <T extends org.hipparchus.RealFieldElement<T>>
voidaddContribution(FieldSpacecraftState<T> s, FieldTimeDerivativesEquations<T> adder)
Compute the contribution of the force model to the perturbing acceleration.default 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.ParameterDriver
getParameterDriver(String name)
Get parameter value from its name.default double[]
getParameters()
Get force model parameters.default <T extends org.hipparchus.RealFieldElement<T>>
T[]getParameters(org.hipparchus.Field<T> field)
Get force model parameters.ParameterDriver[]
getParametersDrivers()
Get the drivers for force model parameters.default void
init(SpacecraftState initialState, AbsoluteDate target)
Initialize the force model at the start of propagation.boolean
isSupported(String name)
Check if a parameter is supported.
-
-
-
Method Detail
-
init
default void init(SpacecraftState initialState, AbsoluteDate target)
Initialize the force model at the start of propagation. This method will be called before any calls toaddContribution(SpacecraftState, TimeDerivativesEquations)
,addContribution(FieldSpacecraftState, FieldTimeDerivativesEquations)
,acceleration(SpacecraftState, double[])
oracceleration(FieldSpacecraftState, RealFieldElement[])
The default implementation of this method does nothing.
- Parameters:
initialState
- spacecraft state at the start of propagation.target
- date of propagation. Not equal toinitialState.getDate()
.
-
addContribution
default 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
default <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
-
getParameters
default double[] getParameters()
Get force model parameters.- Returns:
- force model parameters
- Since:
- 9.0
-
getParameters
default <T extends org.hipparchus.RealFieldElement<T>> T[] getParameters(org.hipparchus.Field<T> field)
Get force model parameters.- Type Parameters:
T
- type of the elements- Parameters:
field
- field to which the elements belong- Returns:
- force model parameters
- Since:
- 9.0
-
dependsOnPositionOnly
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
- Since:
- 9.0
-
acceleration
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
- Since:
- 9.0
-
acceleration
<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
- Since:
- 9.0
-
getEventsDetectors
Stream<EventDetector> getEventsDetectors()
Get the discrete events related to the model.- Returns:
- stream of events detectors
-
getFieldEventsDetectors
<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
ParameterDriver[] getParametersDrivers()
Get the drivers for force model parameters.- Returns:
- drivers for force model parameters
- Since:
- 8.0
-
getParameterDriver
ParameterDriver getParameterDriver(String name)
Get parameter value from its name.- Parameters:
name
- parameter name- Returns:
- parameter value
- Since:
- 8.0
-
isSupported
boolean isSupported(String name)
Check if a parameter is supported.Supported parameters are those listed by
getParametersDrivers()
.- Parameters:
name
- parameter name to check- Returns:
- true if the parameter is supported
- See Also:
getParametersDrivers()
-
-