Class TimeSpanParametricAcceleration
- java.lang.Object
-
- org.orekit.forces.empirical.TimeSpanParametricAcceleration
-
- All Implemented Interfaces:
ForceModel
,EventDetectorsProvider
,ParameterDriversProvider
public class TimeSpanParametricAcceleration extends Object implements ForceModel
Time span parametric acceleration model.This class is closely related to
ParametricAcceleration
class.
The difference is that it has aTimeSpanMap
ofAccelerationModel
objects as attribute instead of a singleAccelerationModel
object.
The idea behind this model is to allow the user to design a parametric acceleration model that can see its physical parameters change with time, at dates chosen by the user.
This is a behavior that can be sought in precise orbit determination.
Usage:
Indeed for this type of application, the empirical parameters must be revalued at each new orbit.- Construction: constructor takes an acceleration direction, an attitude mode (or an inertial flag) and
an AccelerationModel model.
This last model will be your initial AccelerationModel model and it will be initially valid for the whole time line.
The real validity of this first entry will be truncated as other AccelerationModel models are added. - Time spans: AccelerationModel models are added using methods
addAccelerationModelValidAfter(AccelerationModel, AbsoluteDate)
oraddAccelerationModelValidBefore(AccelerationModel, AbsoluteDate)
.
Recommendations are the same than the ones inTimeSpanMap
, meaning:- As an entry is added, it truncates the validity of the neighboring entries already present in the map;
- The transition dates should be entered only once. Repeating a transition date will lead to unexpected result and is not supported;
- It is advised to order your AccelerationModel models chronologically when adding them to avoid any confusion.
- Naming the parameter drivers: It is strongly advised to give a custom name to the
ParameterDriver
(s) of each AccelerationModel model that is added to the object. This will allow you keeping track of the evolution of your models.
Different names are mandatory to differentiate the different drivers.
Since there is no default name for acceleration model parameters, you must handle the driver names to consider different names when adding a new acceleration model.
- Since:
- 10.3
- Author:
- Bryan Cazabonne
-
-
Field Summary
Fields Modifier and Type Field Description static String
DATE_AFTER
Prefix for dates after in the parameter drivers' name.static String
DATE_BEFORE
Prefix for dates before in the parameter drivers' name.-
Fields inherited from interface org.orekit.propagation.events.EventDetectorsProvider
DATATION_ACCURACY
-
-
Constructor Summary
Constructors Constructor Description TimeSpanParametricAcceleration(Vector3D direction, boolean isInertial, AccelerationModel accelerationModel)
Simple constructor.TimeSpanParametricAcceleration(Vector3D direction, AttitudeProvider attitudeOverride, AccelerationModel accelerationModel)
Simple constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T extends CalculusFieldElement<T>>
FieldVector3D<T>acceleration(FieldSpacecraftState<T> state, T[] parameters)
Compute acceleration.Vector3D
acceleration(SpacecraftState state, double[] parameters)
Compute acceleration.void
addAccelerationModelValidAfter(AccelerationModel accelerationModel, AbsoluteDate earliestValidityDate)
Add a AccelerationModel entry valid after a limit date.void
addAccelerationModelValidBefore(AccelerationModel accelerationModel, AbsoluteDate latestValidityDate)
Add an AccelerationModel entry valid before a limit date.boolean
dependsOnPositionOnly()
Check if force models depends on position only.TimeSpanMap<AccelerationModel>
extractAccelerationModelRange(AbsoluteDate start, AbsoluteDate end)
Extract a range of theAccelerationModel
map.double[]
extractParameters(double[] parameters, AbsoluteDate date)
Extract the proper parameter drivers' values from the array in input of theacceleration
method.<T extends CalculusFieldElement<T>>
T[]extractParameters(T[] parameters, FieldAbsoluteDate<T> date)
Extract the proper parameter drivers' values from the array in input of theacceleration
method.AccelerationModel
getAccelerationModel(AbsoluteDate date)
Get theAccelerationModel
model valid at a date.TimeSpanMap.Span<AccelerationModel>
getAccelerationModelSpan(AbsoluteDate date)
Get theAccelerationModel
TimeSpanMap.Span
containing a specified date.Stream<EventDetector>
getEventDetectors()
Get the discrete events related to the model.<T extends CalculusFieldElement<T>>
Stream<FieldEventDetector<T>>getFieldEventDetectors(Field<T> field)
Get the discrete events related to the model.TimeSpanMap.Span<AccelerationModel>
getFirstSpan()
Get the firsttime span
of the acceleration model time span map.List<ParameterDriver>
getParametersDrivers()
Get the drivers for parameters.void
init(SpacecraftState initialState, AbsoluteDate target)
Initialize the force model at the start of propagation.-
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
getEventDetectors, getFieldEventDetectors
-
Methods inherited from interface org.orekit.forces.ForceModel
addContribution, addContribution, init
-
Methods inherited from interface org.orekit.utils.ParameterDriversProvider
getNbParametersDriversValue, getParameterDriver, getParameters, getParameters, getParameters, getParameters, getParametersAllValues, getParametersAllValues, isSupported
-
-
-
-
Field Detail
-
DATE_BEFORE
public static final String DATE_BEFORE
Prefix for dates before in the parameter drivers' name.- See Also:
- Constant Field Values
-
DATE_AFTER
public static final String DATE_AFTER
Prefix for dates after in the parameter drivers' name.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
TimeSpanParametricAcceleration
public TimeSpanParametricAcceleration(Vector3D direction, boolean isInertial, AccelerationModel accelerationModel)
Simple constructor.- Parameters:
direction
- acceleration direction in overridden spacecraft frameisInertial
- if true, direction is defined in the same inertial frame used for propagation (i.e.SpacecraftState.getFrame()
), otherwise direction is defined in spacecraft frame (i.e. using the propagationattitude law
)accelerationModel
- acceleration model used to compute the contribution of the empirical acceleration
-
TimeSpanParametricAcceleration
public TimeSpanParametricAcceleration(Vector3D direction, AttitudeProvider attitudeOverride, AccelerationModel accelerationModel)
Simple constructor.- Parameters:
direction
- acceleration direction in overridden spacecraft frame frame used for propagation (i.e.SpacecraftState.getFrame()
), otherwise direction is defined in spacecraft frame (i.e. using the propagationattitude law
)attitudeOverride
- provider for attitude used to compute accelerationaccelerationModel
- acceleration model used to compute the contribution of the empirical acceleration
-
-
Method Detail
-
init
public void init(SpacecraftState initialState, AbsoluteDate target)
Initialize the force model at the start of propagation. This method will be called before any calls toForceModel.addContribution(SpacecraftState, TimeDerivativesEquations)
,ForceModel.addContribution(FieldSpacecraftState, FieldTimeDerivativesEquations)
,ForceModel.acceleration(SpacecraftState, double[])
orForceModel.acceleration(FieldSpacecraftState, CalculusFieldElement[])
The default implementation of this method does nothing.
- Specified by:
init
in interfaceForceModel
- Parameters:
initialState
- spacecraft state at the start of propagation.target
- date of propagation. Not equal toinitialState.getDate()
.
-
addAccelerationModelValidBefore
public void addAccelerationModelValidBefore(AccelerationModel accelerationModel, AbsoluteDate latestValidityDate)
Add an AccelerationModel entry valid before a limit date.
Using
addAccelerationModelValidBefore(entry, t)
will makeentry
valid in ]-∞, t[ (note the open bracket).WARNING: Since there is no default name for acceleration model parameters, the user must handle itself the driver names to consider different names (i.e. different parameters) when adding a new acceleration model.
- Parameters:
accelerationModel
- AccelerationModel entrylatestValidityDate
- date before which the entry is valid (must be different from all dates already used for transitions)
-
addAccelerationModelValidAfter
public void addAccelerationModelValidAfter(AccelerationModel accelerationModel, AbsoluteDate earliestValidityDate)
Add a AccelerationModel entry valid after a limit date.
Using
addAccelerationModelValidAfter(entry, t)
will makeentry
valid in [t, +∞[ (note the closed bracket).WARNING: Since there is no default name for acceleration model parameters, the user must handle itself the driver names to consider different names (i.e. different parameters) when adding a new acceleration model.
- Parameters:
accelerationModel
- AccelerationModel entryearliestValidityDate
- date after which the entry is valid (must be different from all dates already used for transitions)
-
getAccelerationModel
public AccelerationModel getAccelerationModel(AbsoluteDate date)
Get theAccelerationModel
model valid at a date.- Parameters:
date
- the date of validity- Returns:
- the AccelerationModel model valid at date
-
getAccelerationModelSpan
public TimeSpanMap.Span<AccelerationModel> getAccelerationModelSpan(AbsoluteDate date)
Get theAccelerationModel
TimeSpanMap.Span
containing a specified date.- Parameters:
date
- date belonging to the desired time span- Returns:
- the AccelerationModel time span containing the specified date
-
extractAccelerationModelRange
public TimeSpanMap<AccelerationModel> extractAccelerationModelRange(AbsoluteDate start, AbsoluteDate end)
Extract a range of theAccelerationModel
map.The object returned will be a new independent instance that will contain only the transitions that lie in the specified range.
See theTimeSpanMap.extractRange method
for more.- Parameters:
start
- earliest date at which a transition is included in the range (may be set toAbsoluteDate.PAST_INFINITY
to keep all early transitions)end
- latest date at which a transition is included in the r (may be set toAbsoluteDate.FUTURE_INFINITY
to keep all late transitions)- Returns:
- a new TimeSpanMap instance of AccelerationModel with all transitions restricted to the specified range
-
getFirstSpan
public TimeSpanMap.Span<AccelerationModel> getFirstSpan()
Get the firsttime span
of the acceleration model time span map.- Returns:
- the first
time span
of the acceleration model time span map - Since:
- 11.1
-
dependsOnPositionOnly
public boolean dependsOnPositionOnly()
Check if force models depends on position only.- 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
-
acceleration
public Vector3D acceleration(SpacecraftState state, double[] parameters)
Compute acceleration.- Specified by:
acceleration
in interfaceForceModel
- Parameters:
state
- 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> state, T[] parameters)
Compute acceleration.- Specified by:
acceleration
in interfaceForceModel
- Type Parameters:
T
- type of the elements- Parameters:
state
- 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
-
getEventDetectors
public Stream<EventDetector> 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:
getEventDetectors
in interfaceEventDetectorsProvider
- Specified by:
getEventDetectors
in interfaceForceModel
- Returns:
- stream of event detectors
-
getFieldEventDetectors
public <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:
getFieldEventDetectors
in interfaceEventDetectorsProvider
- Specified by:
getFieldEventDetectors
in interfaceForceModel
- Type Parameters:
T
- extends CalculusFieldElement<T>- Parameters:
field
- field to which the state belongs- Returns:
- stream of event detectors
-
getParametersDrivers
public List<ParameterDriver> getParametersDrivers()
Get the drivers for parameters.All the parameter drivers of all AccelerationModel models are returned in an array. Models are ordered chronologically.
- Specified by:
getParametersDrivers
in interfaceParameterDriversProvider
- Returns:
- drivers for parameters
-
extractParameters
public double[] extractParameters(double[] parameters, AbsoluteDate date)
Extract the proper parameter drivers' values from the array in input of theacceleration
method. Parameters are filtered given an input date.- Parameters:
parameters
- the input parameters arraydate
- the date- Returns:
- the parameters given the date
-
extractParameters
public <T extends CalculusFieldElement<T>> T[] extractParameters(T[] parameters, FieldAbsoluteDate<T> date)
Extract the proper parameter drivers' values from the array in input of theacceleration
method. Parameters are filtered given an input date.- Type Parameters:
T
- extends CalculusFieldElement- Parameters:
parameters
- the input parameters arraydate
- the date- Returns:
- the parameters given the date
-
-