org.orekit.orbits
Class Orbit

java.lang.Object
  extended by org.orekit.orbits.Orbit
All Implemented Interfaces:
Serializable, TimeInterpolable<Orbit>, TimeShiftable<Orbit>, TimeStamped, PVCoordinatesProvider
Direct Known Subclasses:
ApsisOrbit, CartesianOrbit, CircularOrbit, EquatorialOrbit, EquinoctialOrbit, KeplerianOrbit, StelaEquinoctialOrbit

public abstract class Orbit
extends Object
implements TimeStamped, TimeShiftable<Orbit>, TimeInterpolable<Orbit>, Serializable, PVCoordinatesProvider

This class handles orbital parameters.

For user convenience, both the Cartesian and the equinoctial elements are provided by this class, regardless of the canonical representation implemented in the derived class (which may be classical keplerian elements for example).

The parameters are defined in a frame specified by the user. It is important to make sure this frame is consistent: it probably is inertial and centered on the central body. This information is used for example by some force models.

The object OrbitalParameters is guaranteed to be immutable.

Author:
Luc Maisonobe, Guylaine Prat, Fabien Maussion, Véronique Pommier-Maurussane
See Also:
Serialized Form

Constructor Summary
protected Orbit(Frame frame, AbsoluteDate date, double mu)
          Default constructor.
protected Orbit(PVCoordinates pvCoordinates, Frame frame, AbsoluteDate date, double mu)
          Set the orbit from Cartesian parameters.
 
Method Summary
 void addKeplerContribution(PositionAngle type, double gm, double[] pDot)
          Call the method orbitAddKeplerContribution(PositionAngle, double, double[]) implemented in inherited classes of Orbit.
protected abstract  double[][] computeJacobianEccentricWrtCartesian()
          Compute the Jacobian of the orbital parameters with eccentric angle with respect to the Cartesian parameters.
protected abstract  double[][] computeJacobianMeanWrtCartesian()
          Compute the Jacobian of the orbital parameters with mean angle with respect to the Cartesian parameters.
protected abstract  double[][] computeJacobianTrueWrtCartesian()
          Compute the Jacobian of the orbital parameters with true angle with respect to the Cartesian parameters.
protected  double[][] createInverseJacobian(PositionAngle type)
          Create an inverse Jacobian.
protected static void fillHalfRow(double a, Vector3D v, double[] row, int j)
          Fill a Jacobian half row with a single vector.
protected static void fillHalfRow(double a1, Vector3D v1, double a2, Vector3D v2, double[] row, int j)
          Fill a Jacobian half row with a linear combination of vectors.
protected static void fillHalfRow(double a1, Vector3D v1, double a2, Vector3D v2, double a3, Vector3D v3, double[] row, int j)
          Fill a Jacobian half row with a linear combination of vectors.
protected static void fillHalfRow(double a1, Vector3D v1, double a2, Vector3D v2, double a3, Vector3D v3, double a4, Vector3D v4, double[] row, int j)
          Fill a Jacobian half row with a linear combination of vectors.
protected static void fillHalfRow(double a1, Vector3D v1, double a2, Vector3D v2, double a3, Vector3D v3, double a4, Vector3D v4, double a5, Vector3D v5, double[] row, int j)
          Fill a Jacobian half row with a linear combination of vectors.
protected static void fillHalfRow(double a1, Vector3D v1, double a2, Vector3D v2, double a3, Vector3D v3, double a4, Vector3D v4, double a5, Vector3D v5, double a6, Vector3D v6, double[] row, int j)
          Fill a Jacobian half row with a linear combination of vectors.
abstract  double getA()
          Get the semi-major axis.
 AbsoluteDate getDate()
          Get the date of orbital parameters.
abstract  double getE()
          Get the eccentricity.
abstract  double getEquinoctialEx()
          Get the first component of the equinoctial eccentricity vector.
abstract  double getEquinoctialEy()
          Get the second component of the equinoctial eccentricity vector.
 Frame getFrame()
          Get the frame in which the orbital parameters are defined.
abstract  double getHx()
          Get the first component of the inclination vector.
abstract  double getHy()
          Get the second component of the inclination vector.
abstract  double getI()
          Get the inclination.
 RealMatrix getJacobian(OrbitType numerator, OrbitType denominator)
          Get coordinate conversion jacobian.
 void getJacobianWrtCartesian(PositionAngle type, double[][] jacobian)
          Compute the Jacobian of the orbital parameters with respect to the Cartesian parameters.
 void getJacobianWrtParameters(PositionAngle type, double[][] jacobian)
          Compute the Jacobian of the Cartesian parameters with respect to the orbital parameters.
protected  double[][] getJacobianWrtParametersEccentric()
           
protected  double[][] getJacobianWrtParametersMean()
           
protected  double[][] getJacobianWrtParametersTrue()
           
 double getKeplerianMeanMotion()
          Get the keplerian mean motion.
 double getKeplerianPeriod()
          Get the keplerian period.
 RealMatrix getKeplerianTransitionMatrix(double dt)
          Get keplerian transition matrix.
abstract  double getLE()
          Get the eccentric latitude argument.
abstract  double getLM()
          Get the mean latitude argument.
abstract  double getLv()
          Get the true latitude argument.
 double getMu()
          Get the central acceleration constant.
abstract  IOrbitalParameters getParameters()
          Get underlying orbital parameters.
 PVCoordinates getPVCoordinates()
          Get the PVCoordinates in definition frame.
 PVCoordinates getPVCoordinates(AbsoluteDate otherDate, Frame otherFrame)
          Get the PVCoordinates of the body in the selected frame.
 PVCoordinates getPVCoordinates(Frame outputFrame)
          Get the PVCoordinates in a specified frame.
abstract  OrbitType getType()
          Get the orbit type.
protected abstract  PVCoordinates initPVCoordinates()
          Compute the position/velocity coordinates from the canonical parameters.
static boolean isPositiveDefinite(RealMatrix matrix, double small)
          Test the positivity of a matrix.
protected abstract  void orbitAddKeplerContribution(PositionAngle type, double gm, double[] pDot)
          Add the contribution of the Keplerian motion to parameters derivatives
protected abstract  Orbit orbitShiftedBy(double dt)
          Get a time-shifted orbit.
protected  void setJacobianWrtParametersEccentric(double[][] jacobianWrtParametersEccentric)
           
protected  void setJacobianWrtParametersMean(double[][] jacobianWrtParametersMean)
           
protected  void setJacobianWrtParametersTrue(double[][] jacobianWrtParametersTrue)
           
 Orbit shiftedBy(double dt)
          Call the method orbitShiftedBy(double) implemented in inherited classes of Orbit.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.orekit.time.TimeInterpolable
interpolate
 

Constructor Detail

Orbit

protected Orbit(Frame frame,
                AbsoluteDate date,
                double mu)
Default constructor. Build a new instance with arbitrary default elements.

Parameters:
frame - the frame in which the parameters are defined (must be a pseudo-inertial frame)
date - date of the orbital parameters
mu - central attraction coefficient (m^3/s^2)

Orbit

protected Orbit(PVCoordinates pvCoordinates,
                Frame frame,
                AbsoluteDate date,
                double mu)
Set the orbit from Cartesian parameters.

Parameters:
pvCoordinates - the position and velocity in the inertial frame
frame - the frame in which the PVCoordinates are defined
date - date of the orbital parameters
mu - central attraction coefficient (m^3/s^2)
Method Detail

getParameters

public abstract IOrbitalParameters getParameters()
Get underlying orbital parameters.

Returns:
orbital parameters

getType

public abstract OrbitType getType()
Get the orbit type.

Returns:
orbit type

getFrame

public Frame getFrame()
Get the frame in which the orbital parameters are defined.

Returns:
frame in which the orbital parameters are defined

getA

public abstract double getA()
Get the semi-major axis.

Note that the semi-major axis is considered negative for hyperbolic orbits.

Returns:
semi-major axis (m)

getEquinoctialEx

public abstract double getEquinoctialEx()
Get the first component of the equinoctial eccentricity vector.

Returns:
first component of the equinoctial eccentricity vector

getEquinoctialEy

public abstract double getEquinoctialEy()
Get the second component of the equinoctial eccentricity vector.

Returns:
second component of the equinoctial eccentricity vector

getHx

public abstract double getHx()
Get the first component of the inclination vector.

Returns:
first component of the inclination vector

getHy

public abstract double getHy()
Get the second component of the inclination vector.

Returns:
second component of the inclination vector

getLE

public abstract double getLE()
Get the eccentric latitude argument.

Returns:
eccentric latitude argument (rad)

getLv

public abstract double getLv()
Get the true latitude argument.

Returns:
true latitude argument (rad)

getLM

public abstract double getLM()
Get the mean latitude argument.

Returns:
mean latitude argument (rad)

getE

public abstract double getE()
Get the eccentricity.

Returns:
eccentricity

getI

public abstract double getI()
Get the inclination.

Returns:
inclination (rad)

getMu

public double getMu()
Get the central acceleration constant.

Returns:
central acceleration constant

getKeplerianPeriod

public double getKeplerianPeriod()
Get the keplerian period.

The keplerian period is computed directly from semi major axis and central acceleration constant.

Returns:
keplerian period in seconds, or positive infinity for hyperbolic orbits

getKeplerianMeanMotion

public double getKeplerianMeanMotion()
Get the keplerian mean motion.

The keplerian mean motion is computed directly from semi major axis and central acceleration constant.

Returns:
keplerian mean motion in radians per second

getDate

public AbsoluteDate getDate()
Get the date of orbital parameters.

Specified by:
getDate in interface TimeStamped
Returns:
date of the orbital parameters

getPVCoordinates

public PVCoordinates getPVCoordinates(Frame outputFrame)
                               throws OrekitException
Get the PVCoordinates in a specified frame.

Parameters:
outputFrame - frame in which the position/velocity coordinates shall be computed
Returns:
pvCoordinates in the specified output frame
Throws:
OrekitException - if transformation between frames cannot be computed
See Also:
getPVCoordinates()

getPVCoordinates

public PVCoordinates getPVCoordinates(AbsoluteDate otherDate,
                                      Frame otherFrame)
                               throws OrekitException
Get the PVCoordinates of the body in the selected frame.

Specified by:
getPVCoordinates in interface PVCoordinatesProvider
Parameters:
otherDate - current date
otherFrame - the frame where to define the position
Returns:
position/velocity of the body (m and m/s)
Throws:
OrekitException - if position cannot be computed in given frame

getPVCoordinates

public PVCoordinates getPVCoordinates()
Get the PVCoordinates in definition frame.

Returns:
pvCoordinates in the definition frame
See Also:
getPVCoordinates(Frame)

initPVCoordinates

protected abstract PVCoordinates initPVCoordinates()
Compute the position/velocity coordinates from the canonical parameters.

Returns:
computed position/velocity coordinates

orbitShiftedBy

protected abstract Orbit orbitShiftedBy(double dt)
Get a time-shifted orbit.

The orbit can be slightly shifted to close dates. This shift is based on a simple keplerian model. It is not intended as a replacement for proper orbit and attitude propagation but should be sufficient for small time shifts or coarse accuracy.

Parameters:
dt - time shift in seconds
Returns:
a new orbit, shifted with respect to the instance (which is immutable)

shiftedBy

public Orbit shiftedBy(double dt)
Call the method orbitShiftedBy(double) implemented in inherited classes of Orbit.

Specified by:
shiftedBy in interface TimeShiftable<Orbit>
Parameters:
dt - time shift in seconds
Returns:
a new orbit, shifted with respect to the instance (which is immutable)

getJacobianWrtCartesian

public void getJacobianWrtCartesian(PositionAngle type,
                                    double[][] jacobian)
Compute the Jacobian of the orbital parameters with respect to the Cartesian parameters.

Element jacobian[i][j] is the derivative of parameter i of the orbit with respect to Cartesian coordinate j. This means each row correspond to one orbital parameter whereas columns 0 to 5 correspond to the Cartesian coordinates x, y, z, xDot, yDot and zDot.

Parameters:
type - type of the position angle to use
jacobian - placeholder 6x6 (or larger) matrix to be filled with the Jacobian, if matrix is larger than 6x6, only the 6x6 upper left corner will be modified

getJacobianWrtParameters

public void getJacobianWrtParameters(PositionAngle type,
                                     double[][] jacobian)
Compute the Jacobian of the Cartesian parameters with respect to the orbital parameters.

Element jacobian[i][j] is the derivative of parameter i of the orbit with respect to Cartesian coordinate j. This means each row correspond to one orbital parameter whereas columns 0 to 5 correspond to the Cartesian coordinates x, y, z, xDot, yDot and zDot.

Parameters:
type - type of the position angle to use
jacobian - placeholder 6x6 (or larger) matrix to be filled with the Jacobian, if matrix is larger than 6x6, only the 6x6 upper left corner will be modified

createInverseJacobian

protected double[][] createInverseJacobian(PositionAngle type)
Create an inverse Jacobian.

Parameters:
type - type of the position angle to use
Returns:
inverse Jacobian

computeJacobianMeanWrtCartesian

protected abstract double[][] computeJacobianMeanWrtCartesian()
Compute the Jacobian of the orbital parameters with mean angle with respect to the Cartesian parameters.

Element jacobian[i][j] is the derivative of parameter i of the orbit with respect to Cartesian coordinate j. This means each row correspond to one orbital parameter whereas columns 0 to 5 correspond to the Cartesian coordinates x, y, z, xDot, yDot and zDot.

Returns:
6x6 Jacobian matrix
See Also:
computeJacobianEccentricWrtCartesian(), computeJacobianTrueWrtCartesian()

computeJacobianEccentricWrtCartesian

protected abstract double[][] computeJacobianEccentricWrtCartesian()
Compute the Jacobian of the orbital parameters with eccentric angle with respect to the Cartesian parameters.

Element jacobian[i][j] is the derivative of parameter i of the orbit with respect to Cartesian coordinate j. This means each row correspond to one orbital parameter whereas columns 0 to 5 correspond to the Cartesian coordinates x, y, z, xDot, yDot and zDot.

Returns:
6x6 Jacobian matrix
See Also:
computeJacobianMeanWrtCartesian(), computeJacobianTrueWrtCartesian()

computeJacobianTrueWrtCartesian

protected abstract double[][] computeJacobianTrueWrtCartesian()
Compute the Jacobian of the orbital parameters with true angle with respect to the Cartesian parameters.

Element jacobian[i][j] is the derivative of parameter i of the orbit with respect to Cartesian coordinate j. This means each row correspond to one orbital parameter whereas columns 0 to 5 correspond to the Cartesian coordinates x, y, z, xDot, yDot and zDot.

Returns:
6x6 Jacobian matrix
See Also:
computeJacobianMeanWrtCartesian(), computeJacobianEccentricWrtCartesian()

orbitAddKeplerContribution

protected abstract void orbitAddKeplerContribution(PositionAngle type,
                                                   double gm,
                                                   double[] pDot)
Add the contribution of the Keplerian motion to parameters derivatives

This method is used by numerical propagators to evaluate the part of Keplerrian motion to evolution of the orbital state.

Parameters:
type - type of the position angle in the state
gm - attraction coefficient to use
pDot - array containing orbital state derivatives to update (the Keplerian part must be added to the array components, as the array may already contain some non-zero elements corresponding to non-Keplerian parts)

addKeplerContribution

public void addKeplerContribution(PositionAngle type,
                                  double gm,
                                  double[] pDot)
Call the method orbitAddKeplerContribution(PositionAngle, double, double[]) implemented in inherited classes of Orbit.

Parameters:
type - type of the position angle in the state
gm - attraction coefficient to use
pDot - array containing orbital state derivatives to update (the Keplerian part must be added to the array components, as the array may already contain some non-zero elements corresponding to non-Keplerian parts)

fillHalfRow

protected static void fillHalfRow(double a,
                                  Vector3D v,
                                  double[] row,
                                  int j)
Fill a Jacobian half row with a single vector.

Parameters:
a - coefficient of the vector
v - vector
row - Jacobian matrix row
j - index of the first element to set (row[j], row[j+1] and row[j+2] will all be set)

fillHalfRow

protected static void fillHalfRow(double a1,
                                  Vector3D v1,
                                  double a2,
                                  Vector3D v2,
                                  double[] row,
                                  int j)
Fill a Jacobian half row with a linear combination of vectors.

Parameters:
a1 - coefficient of the first vector
v1 - first vector
a2 - coefficient of the second vector
v2 - second vector
row - Jacobian matrix row
j - index of the first element to set (row[j], row[j+1] and row[j+2] will all be set)

fillHalfRow

protected static void fillHalfRow(double a1,
                                  Vector3D v1,
                                  double a2,
                                  Vector3D v2,
                                  double a3,
                                  Vector3D v3,
                                  double[] row,
                                  int j)
Fill a Jacobian half row with a linear combination of vectors.

Parameters:
a1 - coefficient of the first vector
v1 - first vector
a2 - coefficient of the second vector
v2 - second vector
a3 - coefficient of the third vector
v3 - third vector
row - Jacobian matrix row
j - index of the first element to set (row[j], row[j+1] and row[j+2] will all be set)

fillHalfRow

protected static void fillHalfRow(double a1,
                                  Vector3D v1,
                                  double a2,
                                  Vector3D v2,
                                  double a3,
                                  Vector3D v3,
                                  double a4,
                                  Vector3D v4,
                                  double[] row,
                                  int j)
Fill a Jacobian half row with a linear combination of vectors.

Parameters:
a1 - coefficient of the first vector
v1 - first vector
a2 - coefficient of the second vector
v2 - second vector
a3 - coefficient of the third vector
v3 - third vector
a4 - coefficient of the fourth vector
v4 - fourth vector
row - Jacobian matrix row
j - index of the first element to set (row[j], row[j+1] and row[j+2] will all be set)

fillHalfRow

protected static void fillHalfRow(double a1,
                                  Vector3D v1,
                                  double a2,
                                  Vector3D v2,
                                  double a3,
                                  Vector3D v3,
                                  double a4,
                                  Vector3D v4,
                                  double a5,
                                  Vector3D v5,
                                  double[] row,
                                  int j)
Fill a Jacobian half row with a linear combination of vectors.

Parameters:
a1 - coefficient of the first vector
v1 - first vector
a2 - coefficient of the second vector
v2 - second vector
a3 - coefficient of the third vector
v3 - third vector
a4 - coefficient of the fourth vector
v4 - fourth vector
a5 - coefficient of the fifth vector
v5 - fifth vector
row - Jacobian matrix row
j - index of the first element to set (row[j], row[j+1] and row[j+2] will all be set)

fillHalfRow

protected static void fillHalfRow(double a1,
                                  Vector3D v1,
                                  double a2,
                                  Vector3D v2,
                                  double a3,
                                  Vector3D v3,
                                  double a4,
                                  Vector3D v4,
                                  double a5,
                                  Vector3D v5,
                                  double a6,
                                  Vector3D v6,
                                  double[] row,
                                  int j)
Fill a Jacobian half row with a linear combination of vectors.

Parameters:
a1 - coefficient of the first vector
v1 - first vector
a2 - coefficient of the second vector
v2 - second vector
a3 - coefficient of the third vector
v3 - third vector
a4 - coefficient of the fourth vector
v4 - fourth vector
a5 - coefficient of the fifth vector
v5 - fifth vector
a6 - coefficient of the sixth vector
v6 - sixth vector
row - Jacobian matrix row
j - index of the first element to set (row[j], row[j+1] and row[j+2] will all be set)

setJacobianWrtParametersMean

protected void setJacobianWrtParametersMean(double[][] jacobianWrtParametersMean)
Parameters:
jacobianWrtParametersMean - the jacobianWrtParametersMean to set

getJacobianWrtParametersMean

protected double[][] getJacobianWrtParametersMean()
Returns:
the jacobianWrtParametersMean

setJacobianWrtParametersEccentric

protected void setJacobianWrtParametersEccentric(double[][] jacobianWrtParametersEccentric)
Parameters:
jacobianWrtParametersEccentric - the jacobianWrtParametersEccentric to set

getJacobianWrtParametersEccentric

protected double[][] getJacobianWrtParametersEccentric()
Returns:
the jacobianWrtParametersEccentric

setJacobianWrtParametersTrue

protected void setJacobianWrtParametersTrue(double[][] jacobianWrtParametersTrue)
Parameters:
jacobianWrtParametersTrue - the jacobianWrtParametersTrue to set

getJacobianWrtParametersTrue

protected double[][] getJacobianWrtParametersTrue()
Returns:
the jacobianWrtParametersTrue

getJacobian

public RealMatrix getJacobian(OrbitType numerator,
                              OrbitType denominator)
Get coordinate conversion jacobian.

Parameters:
numerator - Numerator parameters.
denominator - Denominator parameters.
Returns:
Jacobian matrix numerator / denominator.

getKeplerianTransitionMatrix

public RealMatrix getKeplerianTransitionMatrix(double dt)
Get keplerian transition matrix.

Parameters:
dt - Propagation interval.
Returns:
Transition matrix given in the coordinates type of the input orbit.

isPositiveDefinite

public static boolean isPositiveDefinite(RealMatrix matrix,
                                         double small)
Test the positivity of a matrix.

Parameters:
matrix - Symmetric positive semidefinite matrix
small - Diagonal elements threshold under which columns are considered to be dependent on previous ones and are discarded
Returns:
true if the matrix is positive definite false otherwise


Copyright © 2017 CNES. All Rights Reserved.