Class NewtonianAttraction

java.lang.Object
org.orekit.forces.gravity.NewtonianAttraction
All Implemented Interfaces:
ForceModel, EventDetectorsProvider, ParameterDriversProvider

public class NewtonianAttraction extends Object implements ForceModel
Force model for Newtonian central body attraction.
Author:
Luc Maisonobe
  • Field Details

    • CENTRAL_ATTRACTION_COEFFICIENT

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

    • NewtonianAttraction

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

    • dependsOnPositionOnly

      public boolean dependsOnPositionOnly()
      Check if force model depends on position only at a given, fixed date.
      Specified by:
      dependsOnPositionOnly in interface ForceModel
      Returns:
      true if force model depends on position only, false if it depends on mass or 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
    • addContribution

      public <T extends CalculusFieldElement<T>> void addContribution(FieldSpacecraftState<T> s, FieldTimeDerivativesEquations<T> adder)
      Compute the contribution of the force model to the perturbing acceleration.
      Specified by:
      addContribution in interface ForceModel
      Type Parameters:
      T - type of the elements
      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
    • getParametersDrivers

      public List<ParameterDriver> getParametersDrivers()
      Get the drivers for parameters.
      Specified by:
      getParametersDrivers in interface ParameterDriversProvider
      Returns:
      drivers for parameters