Class NewtonianAttraction

    • Field Detail

      • CENTRAL_ATTRACTION_COEFFICIENT

        public static final String CENTRAL_ATTRACTION_COEFFICIENT
        Name of the single parameter of this model: the central attraction coefficient.
        See Also:
        Constant Field Values
    • Constructor Detail

      • NewtonianAttraction

        public NewtonianAttraction​(double mu)
        Simple constructor.
        Parameters:
        mu - central attraction coefficient (m^3/s^2)
    • Method Detail

      • 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
      • getMu

        public double getMu​(AbsoluteDate date)
        Get the central attraction coefficient μ.
        Parameters:
        date - date at which the mu value wants to be known
        Returns:
        mu central attraction coefficient (m³/s²)
      • getMu

        public <T extends CalculusFieldElement<T>> T getMu​(Field<T> field,
                                                           FieldAbsoluteDate<T> date)
        Get the central attraction coefficient μ.
        Type Parameters:
        T - the type of the field element
        Parameters:
        field - field to which the state belongs
        date - date at which the mu value wants to be known
        Returns:
        mu central attraction coefficient (m³/s²)
      • addContribution

        public 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.

        Specified by:
        addContribution in interface ForceModel
        Parameters:
        s - current state information: date, kinematics, attitude
        adder - object where the contribution should be added
      • acceleration

        public Vector3D acceleration​(SpacecraftState s,
                                     double[] parameters)
        Compute acceleration.
        Specified by:
        acceleration in interface ForceModel
        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
      • acceleration

        public <T extends CalculusFieldElement<T>> FieldVector3D<T> acceleration​(FieldSpacecraftState<T> s,
                                                                                 T[] parameters)
        Compute acceleration.
        Specified by:
        acceleration in interface ForceModel
        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