Interface DSSTForceModel

All Superinterfaces:
EventDetectorsProvider, ParameterDriversProvider
All Known Implementing Classes:
AbstractGaussianContribution, DSSTAtmosphericDrag, DSSTJ2SquaredClosedForm, DSSTNewtonianAttraction, DSSTSolarRadiationPressure, DSSTTesseral, DSSTThirdBody, DSSTZonal

public interface DSSTForceModel extends ParameterDriversProvider, EventDetectorsProvider
This interface represents a force modifying spacecraft motion for a DSSTPropagator.

Objects implementing this interface are intended to be added to a DSST propagator before the propagation is started.

The propagator will call at the very beginning of a propagation the initializeShortPeriodTerms(AuxiliaryElements, PropagationType, double[]) method allowing preliminary computation such as truncation if needed.

Then the propagator will call at each step:

  1. the getMeanElementRate(SpacecraftState, AuxiliaryElements, double[]) method. The force model instance will extract all the state data needed to compute the mean element rates that contribute to the mean state derivative.
  2. the updateShortPeriodTerms(double[], SpacecraftState...) method, if osculating parameters are desired, on a sample of points within the last step.
Author:
Romain Di Constanzo, Pascal Parraud
  • Method Details

    • init

      default void init(SpacecraftState initialState, AbsoluteDate target)
      Initialize the force model at the start of propagation.

      The default implementation of this method does nothing.

      Parameters:
      initialState - spacecraft state at the start of propagation.
      target - date of propagation. Not equal to initialState.getDate().
      Since:
      11.0
    • init

      default <T extends CalculusFieldElement<T>> void init(FieldSpacecraftState<T> initialState, FieldAbsoluteDate<T> target)
      Initialize the force model at the start of propagation.

      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 to initialState.getDate().
      Since:
      11.1
    • getEventDetectors

      default 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
      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:
      getFieldEventDetectors in interface EventDetectorsProvider
      Type Parameters:
      T - extends CalculusFieldElement<T>
      Parameters:
      field - field to which the state belongs
      Returns:
      stream of event detectors
    • initializeShortPeriodTerms

      List<ShortPeriodTerms> initializeShortPeriodTerms(AuxiliaryElements auxiliaryElements, PropagationType type, double[] parameters)
      Performs initialization prior to propagation for the current force model.

      This method aims at being called at the very beginning of a propagation.

      Parameters:
      auxiliaryElements - auxiliary elements related to the current orbit
      type - type of the elements used during the propagation
      parameters - values of the force model parameters for specific date (1 value only per parameter driver) obtained for example by calling ParameterDriversProvider.getParameters(AbsoluteDate) on force model.
      Returns:
      a list of objects that will hold short period terms (the objects are also retained by the force model, which will update them during propagation)
    • initializeShortPeriodTerms

      <T extends CalculusFieldElement<T>> List<FieldShortPeriodTerms<T>> initializeShortPeriodTerms(FieldAuxiliaryElements<T> auxiliaryElements, PropagationType type, T[] parameters)
      Performs initialization prior to propagation for the current force model.

      This method aims at being called at the very beginning of a propagation.

      Type Parameters:
      T - type of the elements
      Parameters:
      auxiliaryElements - auxiliary elements related to the current orbit
      type - type of the elements used during the propagation
      parameters - values of the force model parameters for specific date (1 value only per parameter driver) obtained for example by calling ParameterDriversProvider.getParameters(AbsoluteDate) on force model or AbstractGradientConverter.getParametersAtStateDate(FieldSpacecraftState, ParameterDriversProvider) on gradient converter.
      Returns:
      a list of objects that will hold short period terms (the objects are also retained by the force model, which will update them during propagation)
    • extractParameters

      default double[] extractParameters(double[] parameters, AbsoluteDate date)
      Extract the proper parameter drivers' values from the array in input of the updateShortPeriodTerms method. Parameters are filtered given an input date.
      Parameters:
      parameters - the input parameters array containing all span values of all drivers from which the parameter values at date date wants to be extracted
      date - the date
      Returns:
      the parameters given the date
    • extractParameters

      default <T extends CalculusFieldElement<T>> T[] extractParameters(T[] parameters, FieldAbsoluteDate<T> date)
      Extract the proper parameter drivers' values from the array in input of the updateShortPeriodTerms method. Parameters are filtered given an input date.
      Type Parameters:
      T - extends CalculusFieldElement
      Parameters:
      parameters - the input parameters array containing all span values of all drivers from which the parameter values at date date wants to be extracted
      date - the date
      Returns:
      the parameters given the date
    • getMeanElementRate

      double[] getMeanElementRate(SpacecraftState state, AuxiliaryElements auxiliaryElements, double[] parameters)
      Computes the mean equinoctial elements rates dai / dt.
      Parameters:
      state - current state information: date, kinematics, attitude
      auxiliaryElements - auxiliary elements related to the current orbit
      parameters - values of the force model parameters at state date (only 1 span for each parameter driver) obtained for example by calling ParameterDriversProvider.getParameters(AbsoluteDate) on force model.
      Returns:
      the mean element rates dai/dt
    • getMeanElementRate

      <T extends CalculusFieldElement<T>> T[] getMeanElementRate(FieldSpacecraftState<T> state, FieldAuxiliaryElements<T> auxiliaryElements, T[] parameters)
      Computes the mean equinoctial elements rates dai / dt.
      Type Parameters:
      T - type of the elements
      Parameters:
      state - current state information: date, kinematics, attitude
      auxiliaryElements - auxiliary elements related to the current orbit
      parameters - values of the force model parameters at state date (only 1 span for each parameter driver) obtained for example by calling ParameterDriversProvider.getParameters(Field, FieldAbsoluteDate) on force model or AbstractGradientConverter.getParametersAtStateDate(FieldSpacecraftState, ParameterDriversProvider) on gradient converter.
      Returns:
      the mean element rates dai/dt
    • registerAttitudeProvider

      void registerAttitudeProvider(AttitudeProvider provider)
      Register an attitude provider.

      Register an attitude provider that can be used by the force model.

      Parameters:
      provider - the AttitudeProvider
    • updateShortPeriodTerms

      void updateShortPeriodTerms(double[] parameters, SpacecraftState... meanStates)
      Update the short period terms.

      The short period terms that will be updated are the ones that were returned during the call to initializeShortPeriodTerms(AuxiliaryElements, PropagationType, double[]).

      Parameters:
      parameters - values of the force model parameters (all span values for each parameters) obtained for example by calling ParameterDriversProvider.getParametersAllValues() on force model. The extract parameter method extractParameters(double[], AbsoluteDate) is called in the method to select the right parameter corresponding to the mean state date.
      meanStates - mean states information: date, kinematics, attitude
    • updateShortPeriodTerms

      <T extends CalculusFieldElement<T>> void updateShortPeriodTerms(T[] parameters, FieldSpacecraftState<T>... meanStates)
      Update the short period terms.

      The short period terms that will be updated are the ones that were returned during the call to initializeShortPeriodTerms(AuxiliaryElements, PropagationType, double[]).

      Type Parameters:
      T - type of the elements
      Parameters:
      parameters - values of the force model parameters (all span values for each parameters) obtained for example by calling ParameterDriversProvider.getParametersAllValues(Field) on force model or AbstractGradientConverter.getParameters(FieldSpacecraftState, ParameterDriversProvider) on gradient converter. The extract parameter method extractParameters(CalculusFieldElement[], FieldAbsoluteDate) is called in the method to select the right parameter.
      meanStates - mean states information: date, kinematics, attitude