Interface ForceModel

    • Method Detail

      • 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
      • 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, attitude
        adder - 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, attitude
        adder - object where the contribution should be added
      • 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 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

        Vector3D acceleration​(SpacecraftState s,
                              double[] parameters)
        Compute acceleration.
        Parameters:
        s - 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
        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, attitude
        parameters - 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