Class 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 a TimeSpanMap of AccelerationModel objects as attribute instead of a single AccelerationModel 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.
    Indeed for this type of application, the empirical parameters must be revalued at each new orbit.

    Usage:
    • 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) or addAccelerationModelValidBefore(AccelerationModel, AbsoluteDate).
      Recommendations are the same than the ones in TimeSpanMap, 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 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 frame
        isInertial - 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 propagation attitude 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 propagation attitude law)
        attitudeOverride - provider for attitude used to compute acceleration
        accelerationModel - acceleration model used to compute the contribution of the empirical acceleration
    • Method Detail

      • addAccelerationModelValidBefore

        public void addAccelerationModelValidBefore​(AccelerationModel accelerationModel,
                                                    AbsoluteDate latestValidityDate)
        Add an AccelerationModel entry valid before a limit date.

        Using addAccelerationModelValidBefore(entry, t) will make entry 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 entry
        latestValidityDate - 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 make entry 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 entry
        earliestValidityDate - date after which the entry is valid (must be different from all dates already used for transitions)
      • getAccelerationModel

        public AccelerationModel getAccelerationModel​(AbsoluteDate date)
        Get the AccelerationModel model valid at a date.
        Parameters:
        date - the date of validity
        Returns:
        the AccelerationModel model valid at date
      • dependsOnPositionOnly

        public boolean dependsOnPositionOnly()
        Check if force models depends on position only.
        Specified by:
        dependsOnPositionOnly in interface ForceModel
        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 interface ForceModel
        Parameters:
        state - current state information: date, kinematics, attitude
        parameters - 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 interface ForceModel
        Type Parameters:
        T - type of the elements
        Parameters:
        state - current state information: date, kinematics, attitude
        parameters - 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 interface EventDetectorsProvider
        Specified by:
        getEventDetectors in interface ForceModel
        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 interface ParameterDriversProvider
        Returns:
        drivers for parameters
      • extractParameters

        public double[] extractParameters​(double[] parameters,
                                          AbsoluteDate date)
        Extract the proper parameter drivers' values from the array in input of the acceleration method. Parameters are filtered given an input date.
        Parameters:
        parameters - the input parameters array
        date - 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 the acceleration method. Parameters are filtered given an input date.
        Type Parameters:
        T - extends CalculusFieldElement
        Parameters:
        parameters - the input parameters array
        date - the date
        Returns:
        the parameters given the date