org.orekit.forces.gravity
Class NewtonianAttraction

java.lang.Object
  extended by org.orekit.parameter.Parameterizable
      extended by org.orekit.parameter.JacobiansParameterizable
          extended by org.orekit.forces.gravity.NewtonianAttraction
All Implemented Interfaces:
Serializable, ForceModel, GradientModel, AttractionModel, IJacobiansParameterizable, IParameterizable

public class NewtonianAttraction
extends JacobiansParameterizable
implements ForceModel, GradientModel, AttractionModel

Force model for Newtonian central body attraction.

The implementation of this class enables the computation of partial derivatives with respect to the central attraction coefficient.

Author:
Luc Maisonobe
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.orekit.forces.gravity.AttractionModel
MU
 
Constructor Summary
NewtonianAttraction(double mu)
          Simple constructor.
NewtonianAttraction(double mu, boolean computePD)
          Simple constructor.
NewtonianAttraction(Parameter mu)
          Simple constructor using Parameter.
NewtonianAttraction(Parameter mu, boolean computePD)
          Simple constructor using Parameter.
 
Method Summary
 void addContribution(SpacecraftState s, TimeDerivativesEquations adder)
          Compute the contribution of the force model to the perturbing acceleration.
 void addDAccDParam(SpacecraftState s, Parameter param, double[] dAccdParam)
          Compute acceleration derivatives with respect to additional parameters.
 void addDAccDState(SpacecraftState s, double[][] dAccdPos, double[][] dAccdVel)
          Compute acceleration derivatives with respect to state parameters.
 Vector3D computeAcceleration(PVCoordinates pv, Frame frame, AbsoluteDate date)
           Method to compute the acceleration.
 Vector3D computeAcceleration(SpacecraftState s)
          Compute the acceleration due to the force.
 boolean computeGradientPosition()
          This method returns true if the acceleration partial derivatives with respect to position have to be computed.
 boolean computeGradientVelocity()
          This method returns true if the acceleration partial derivatives with respect to velocity have to be computed.
 EventDetector[] getEventsDetectors()
          Get the discrete events related to the model.
 double getMu()
          Get the central attraction coefficient &mu.
 
Methods inherited from class org.orekit.parameter.JacobiansParameterizable
addJacobiansParameter, addJacobiansParameter, addJacobiansParameter, supportsJacobianParameter
 
Methods inherited from class org.orekit.parameter.Parameterizable
addParameter, getParameters, supportsParameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.orekit.parameter.IParameterizable
getParameters, supportsParameter
 

Constructor Detail

NewtonianAttraction

public NewtonianAttraction(double mu)
Simple constructor.

Parameters:
mu - central attraction coefficient (m^3/s^2)

NewtonianAttraction

public NewtonianAttraction(double mu,
                           boolean computePD)
Simple constructor.

Parameters:
mu - central attraction coefficient (m^3/s^2)
computePD - true if partial derivatives wrt position have to be computed

NewtonianAttraction

public NewtonianAttraction(Parameter mu)
Simple constructor using Parameter.

Parameters:
mu - parameter representing central attraction coefficient (m^3/s^2)

NewtonianAttraction

public NewtonianAttraction(Parameter mu,
                           boolean computePD)
Simple constructor using Parameter.

Parameters:
mu - parameter representing central attraction coefficient (m^3/s^2)
computePD - true if partial derivatives wrt position have to be computed
Method Detail

addContribution

public void addContribution(SpacecraftState s,
                            TimeDerivativesEquations adder)
                     throws OrekitException
Compute the contribution of the force model to the perturbing acceleration.

Specified by:
addContribution in interface ForceModel
Parameters:
s - current state information: date, kinematics, attitude
adder - object where the contribution should be added
Throws:
OrekitException - if some specific error occurs

getEventsDetectors

public EventDetector[] getEventsDetectors()
Get the discrete events related to the model.

Specified by:
getEventsDetectors in interface ForceModel
Returns:
array of events detectors or null if the model is not related to any discrete events

getMu

public double getMu()
Get the central attraction coefficient &mu.

Specified by:
getMu in interface AttractionModel
Returns:
mu central attraction coefficient (m3/s2)

computeGradientPosition

public boolean computeGradientPosition()
This method returns true if the acceleration partial derivatives with respect to position have to be computed.

Specified by:
computeGradientPosition in interface GradientModel
Returns:
true if the derivatives have to be computed, false otherwise

computeGradientVelocity

public boolean computeGradientVelocity()
This method returns true if the acceleration partial derivatives with respect to velocity have to be computed.

Specified by:
computeGradientVelocity in interface GradientModel
Returns:
true if the derivatives have to be computed, false otherwise

computeAcceleration

public Vector3D computeAcceleration(SpacecraftState s)
                             throws OrekitException
Compute the acceleration due to the force.

Specified by:
computeAcceleration in interface ForceModel
Parameters:
s - current state information: date, kinematics, attitude
Returns:
acceleration in the SpacecraftState frame
Throws:
OrekitException - if some specific error occurs

computeAcceleration

public Vector3D computeAcceleration(PVCoordinates pv,
                                    Frame frame,
                                    AbsoluteDate date)
                             throws OrekitException

Method to compute the acceleration. This method has been implemented in order to validate the force model only. The reason is that for the validation context, we do not want to set up an instance of the SpacecraftState object to avoid the inertial frame of the spacecraft orbit.

(see Story #V82 and Feature #34 on https://www.orekit.org/forge/issues/34)

Out of the validation context, one must use the method Vector3D computeAcceleration(final SpacecraftState s)

Parameters:
pv - PV coordinates of the spacecraft
frame - frame in which the acceleration is computed
date - date
Returns:
acceleration vector
Throws:
OrekitException - if an Orekit error occurs

addDAccDState

public void addDAccDState(SpacecraftState s,
                          double[][] dAccdPos,
                          double[][] dAccdVel)
                   throws OrekitException
Compute acceleration derivatives with respect to state parameters.

Specified by:
addDAccDState in interface IJacobiansParameterizable
Parameters:
s - spacecraft state
dAccdPos - acceleration derivatives with respect to position
dAccdVel - acceleration derivatives with respect to velocity
Throws:
OrekitException - if derivatives cannot be computed

addDAccDParam

public void addDAccDParam(SpacecraftState s,
                          Parameter param,
                          double[] dAccdParam)
                   throws OrekitException
Compute acceleration derivatives with respect to additional parameters.. AttractionModel.MU --> derivatives with respect to the central attraction coefficient

Specified by:
addDAccDParam in interface IJacobiansParameterizable
Parameters:
s - spacecraft state
param - the parameter with respect to which derivatives are required
dAccdParam - acceleration derivatives with respect to specified parameters
Throws:
OrekitException - if derivatives cannot be computed


Copyright © 2016 CNES. All Rights Reserved.