Interface ForceModel
- All Superinterfaces:
EventDetectorsProvider,ParameterDriversProvider
- All Known Subinterfaces:
ForceModelModifier,RadiationForceModel
- All Known Implementing Classes:
AbstractBodyAttraction,AbstractDragForceModel,AbstractParametricAcceleration,AbstractRadiationForceModel,ConstantThrustManeuver,CR3BPForceModel,DeSitterRelativity,DragForce,ECOM2,HolmesFeatherstoneAttractionModel,InertialForces,J2OnlyPerturbation,KnockeRediffusedForceModel,LenseThirringRelativity,Maneuver,NewtonianAttraction,OceanTides,ParametricAcceleration,RadiationPressureModel,Relativity,SingleBodyAbsoluteAttraction,SingleBodyRelativeAttraction,SolarRadiationPressure,SolidTides,ThirdBodyAttraction,ThirdBodyAttractionEpoch,TimeSpanDragForce,TimeSpanParametricAcceleration
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 their getEventDetectors() 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, Melina Vanel
-
Field Summary
Fields inherited from interface org.orekit.propagation.events.EventDetectorsProvider
DATATION_ACCURACY -
Method Summary
Modifier and TypeMethodDescription<T extends CalculusFieldElement<T>>
FieldVector3D<T> acceleration(FieldSpacecraftState<T> s, T[] parameters) Compute acceleration.acceleration(SpacecraftState s, double[] parameters) Compute acceleration.default <T extends CalculusFieldElement<T>>
voidaddContribution(FieldSpacecraftState<T> s, FieldTimeDerivativesEquations<T> adder) Compute the contribution of the force model to the perturbing acceleration.default voidCompute the contribution of the force model to the perturbing acceleration.default booleanCheck if force model depends on attitude's rotation rate or acceleration at a given, fixed date.booleanCheck if force model depends on position only at a given, fixed date.default Stream<EventDetector> Get the discrete events related to the model.default <T extends CalculusFieldElement<T>>
Stream<FieldEventDetector<T>> getFieldEventDetectors(Field<T> field) Get the discrete events related to the model.default <T extends CalculusFieldElement<T>>
TgetMassDerivative(FieldSpacecraftState<T> state, T[] parameters) Compute the mass rate.default doublegetMassDerivative(SpacecraftState state, double[] parameters) Compute the mass rate.default <T extends CalculusFieldElement<T>>
voidinit(FieldSpacecraftState<T> initialState, FieldAbsoluteDate<T> target) Initialize the force model at the start of propagation.default voidinit(SpacecraftState initialState, AbsoluteDate target) Initialize the force model at the start of propagation.Methods inherited from interface org.orekit.propagation.events.EventDetectorsProvider
getDateDetector, getEventDetectors, getFieldDateDetector, getFieldEventDetectorsMethods inherited from interface org.orekit.utils.ParameterDriversProvider
getNbParametersDriversValue, getParameterDriver, getParameters, getParameters, getParameters, getParameters, getParametersAllValues, getParametersAllValues, getParametersDrivers, isSupported
-
Method Details
-
init
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, CalculusFieldElement[])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().
-
init
default <T extends CalculusFieldElement<T>> void init(FieldSpacecraftState<T> initialState, FieldAbsoluteDate<T> 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, CalculusFieldElement[])The default implementation of this method does nothing.
- Type Parameters:
T- type of the elements- Parameters:
initialState- spacecraft state at the start of propagation.target- date of propagation. Not equal toinitialState.getDate().
-
getEventDetectors
Get the discrete events related to the model.This method is not intended to be called several time, only once by a propagator, as it has the side effect of rebuilding the events detectors when called.
- Specified by:
getEventDetectorsin interfaceEventDetectorsProvider- Returns:
- stream of event detectors
-
getFieldEventDetectors
default <T extends CalculusFieldElement<T>> Stream<FieldEventDetector<T>> getFieldEventDetectors(Field<T> field) Get the discrete events related to the model.This method is not intended to be called several time, only once by a propagator, as it has the side effect of rebuilding the events detectors when called.
- Specified by:
getFieldEventDetectorsin interfaceEventDetectorsProvider- Type Parameters:
T- extends CalculusFieldElement<T>- Parameters:
field- field to which the state belongs- Returns:
- stream of event detectors
-
addContribution
Compute the contribution of the force model to the perturbing acceleration.The default implementation simply adds the
accelerationas a non-Keplerian acceleration.- Parameters:
s- current state information: date, kinematics, attitudeadder- object where the contribution should be added
-
addContribution
default <T extends CalculusFieldElement<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
-
getMassDerivative
Compute the mass rate. Zero by default.- Parameters:
state- current state information: date, kinematics, attitudeparameters- values of the force model parameters at state date- Returns:
- mass rate (kg/s)
- Since:
- 13.1
-
getMassDerivative
default <T extends CalculusFieldElement<T>> T getMassDerivative(FieldSpacecraftState<T> state, T[] parameters) Compute the mass rate. Zero by default.- Type Parameters:
T- field type- Parameters:
state- current state information: date, kinematics, attitudeparameters- values of the force model parameters at state date- Returns:
- mass rate (kg/s)
- Since:
- 13.1
-
dependsOnPositionOnly
boolean dependsOnPositionOnly()Check if force model depends on position only at a given, fixed date.- Returns:
- true if force model depends on position only, false if it depends on mass or velocity, either directly or due to a dependency on attitude
- Since:
- 9.0
-
dependsOnAttitudeRate
default boolean dependsOnAttitudeRate()Check if force model depends on attitude's rotation rate or acceleration at a given, fixed date. If false, it essentially means that at most the attitude's rotation is used when computing the acceleration vector. The default implementation returns false as common forces do not.- Returns:
- true if force model depends on attitude derivatives
- Since:
- 12.1
-
acceleration
Compute acceleration.- 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
- Since:
- 9.0
-
acceleration
<T extends CalculusFieldElement<T>> 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 at state date, only 1 value for each parameterDriver- Returns:
- acceleration in same frame as state
- Since:
- 9.0
-