public abstract class Orbit extends Object implements TimeStamped, TimeShiftable<Orbit>, TimeInterpolable<Orbit>, Serializable, PVCoordinatesProvider
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.
Modifier | Constructor and Description |
---|---|
protected |
Orbit(Frame frameIn,
AbsoluteDate dateIn,
double muIn)
Default constructor.
|
protected |
Orbit(PVCoordinates pvCoordinatesIn,
Frame frameIn,
AbsoluteDate dateIn,
double muIn)
Set the orbit from Cartesian parameters.
|
Modifier and Type | Method and Description |
---|---|
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 hx = ix / (2 * cos(i/2)), where ix is the first component of the inclination vector.
|
abstract double |
getHy()
Get hy = iy / (2 * cos(i/2)), where iy is the second component of the inclination vector.
|
abstract double |
getI()
Get the inclination.
|
RealMatrix |
getJacobian(OrbitType numerator,
OrbitType denominator)
Get coordinate conversion jacobian.
|
RealMatrix |
getJacobian(OrbitType numerator,
OrbitType denominator,
PositionAngle positionAngle)
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 longitude argument.
|
abstract double |
getLM()
Get the mean longitude argument.
|
abstract double |
getLv()
Get the true longitude argument.
|
double |
getMu()
Get the central acceleration constant.
|
abstract double |
getN()
Get the mean motion.
|
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
This method is used by numerical propagators to evaluate the part of Keplerrian motion to evolution of the
orbital state.
|
protected abstract Orbit |
orbitShiftedBy(double dt)
Get a time-shifted orbit.
|
protected void |
setJacobianWrtParametersEccentric(double[][] jacobianWrtParametersEccentricIn) |
protected void |
setJacobianWrtParametersMean(double[][] jacobianWrtParametersMeanIn) |
protected void |
setJacobianWrtParametersTrue(double[][] jacobianWrtParametersTrueIn) |
Orbit |
shiftedBy(double dt)
Call the method
orbitShiftedBy(double) implemented in inherited classes of Orbit. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
interpolate
protected Orbit(Frame frameIn, AbsoluteDate dateIn, double muIn)
frameIn
- the frame in which the parameters are defined
(must be a pseudo-inertial frame
)dateIn
- date of the orbital parametersmuIn
- central attraction coefficient (m^3/s^2)protected Orbit(PVCoordinates pvCoordinatesIn, Frame frameIn, AbsoluteDate dateIn, double muIn)
pvCoordinatesIn
- the position and velocity in the inertial frameframeIn
- the frame in which the PVCoordinates
are defineddateIn
- date of the orbital parametersmuIn
- central attraction coefficient (m^3/s^2)public abstract IOrbitalParameters getParameters()
public abstract OrbitType getType()
public Frame getFrame()
public abstract double getA()
Note that the semi-major axis is considered negative for hyperbolic orbits.
public abstract double getN()
public abstract double getEquinoctialEx()
public abstract double getEquinoctialEy()
public abstract double getHx()
public abstract double getHy()
public abstract double getLE()
public abstract double getLv()
public abstract double getLM()
public abstract double getE()
public abstract double getI()
public double getMu()
public double getKeplerianPeriod()
The keplerian period is computed directly from semi major axis and central acceleration constant.
public double getKeplerianMeanMotion()
The keplerian mean motion is computed directly from semi major axis and central acceleration constant.
public AbsoluteDate getDate()
getDate
in interface TimeStamped
public PVCoordinates getPVCoordinates(Frame outputFrame) throws PatriusException
PVCoordinates
in a specified frame.outputFrame
- frame in which the position/velocity coordinates shall be computedPatriusException
- if transformation between frames cannot be computedgetPVCoordinates()
public PVCoordinates getPVCoordinates(AbsoluteDate otherDate, Frame otherFrame) throws PatriusException
PVCoordinates
of the body in the selected frame.getPVCoordinates
in interface PVCoordinatesProvider
otherDate
- current dateotherFrame
- the frame where to define the positionPatriusException
- if position cannot be computed in given framepublic PVCoordinates getPVCoordinates()
PVCoordinates
in definition frame.getPVCoordinates(Frame)
protected abstract PVCoordinates initPVCoordinates()
protected abstract Orbit orbitShiftedBy(double dt)
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.
dt
- time shift in secondspublic Orbit shiftedBy(double dt)
orbitShiftedBy(double)
implemented in inherited classes of Orbit.shiftedBy
in interface TimeShiftable<Orbit>
dt
- time shift in secondspublic void getJacobianWrtCartesian(PositionAngle type, double[][] jacobian)
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.
type
- type of the position angle to usejacobian
- 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 modifiedpublic void getJacobianWrtParameters(PositionAngle type, double[][] jacobian)
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.
type
- type of the position angle to usejacobian
- 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 modifiedprotected double[][] createInverseJacobian(PositionAngle type)
type
- type of the position angle to useprotected abstract double[][] computeJacobianMeanWrtCartesian()
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.
computeJacobianEccentricWrtCartesian()
,
computeJacobianTrueWrtCartesian()
protected abstract double[][] computeJacobianEccentricWrtCartesian()
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.
computeJacobianMeanWrtCartesian()
,
computeJacobianTrueWrtCartesian()
protected abstract double[][] computeJacobianTrueWrtCartesian()
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.
computeJacobianMeanWrtCartesian()
,
computeJacobianEccentricWrtCartesian()
protected abstract void orbitAddKeplerContribution(PositionAngle type, double gm, double[] pDot)
This method is used by numerical propagators to evaluate the part of Keplerrian motion to evolution of the orbital state.
type
- type of the position angle in the stategm
- attraction coefficient to usepDot
- 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)public void addKeplerContribution(PositionAngle type, double gm, double[] pDot)
orbitAddKeplerContribution(PositionAngle, double, double[])
implemented in inherited
classes of Orbit.type
- type of the position angle in the stategm
- attraction coefficient to usepDot
- 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)protected static void fillHalfRow(double a, Vector3D v, double[] row, int j)
a
- coefficient of the vectorv
- vectorrow
- Jacobian matrix rowj
- index of the first element to set (row[j], row[j+1] and row[j+2] will all be set)protected static void fillHalfRow(double a1, Vector3D v1, double a2, Vector3D v2, double[] row, int j)
a1
- coefficient of the first vectorv1
- first vectora2
- coefficient of the second vectorv2
- second vectorrow
- Jacobian matrix rowj
- index of the first element to set (row[j], row[j+1] and row[j+2] will all be set)protected static void fillHalfRow(double a1, Vector3D v1, double a2, Vector3D v2, double a3, Vector3D v3, double[] row, int j)
a1
- coefficient of the first vectorv1
- first vectora2
- coefficient of the second vectorv2
- second vectora3
- coefficient of the third vectorv3
- third vectorrow
- Jacobian matrix rowj
- index of the first element to set (row[j], row[j+1] and row[j+2] will all be set)protected static void fillHalfRow(double a1, Vector3D v1, double a2, Vector3D v2, double a3, Vector3D v3, double a4, Vector3D v4, double[] row, int j)
a1
- coefficient of the first vectorv1
- first vectora2
- coefficient of the second vectorv2
- second vectora3
- coefficient of the third vectorv3
- third vectora4
- coefficient of the fourth vectorv4
- fourth vectorrow
- Jacobian matrix rowj
- index of the first element to set (row[j], row[j+1] and row[j+2] will all be set)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)
a1
- coefficient of the first vectorv1
- first vectora2
- coefficient of the second vectorv2
- second vectora3
- coefficient of the third vectorv3
- third vectora4
- coefficient of the fourth vectorv4
- fourth vectora5
- coefficient of the fifth vectorv5
- fifth vectorrow
- Jacobian matrix rowj
- index of the first element to set (row[j], row[j+1] and row[j+2] will all be set)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)
a1
- coefficient of the first vectorv1
- first vectora2
- coefficient of the second vectorv2
- second vectora3
- coefficient of the third vectorv3
- third vectora4
- coefficient of the fourth vectorv4
- fourth vectora5
- coefficient of the fifth vectorv5
- fifth vectora6
- coefficient of the sixth vectorv6
- sixth vectorrow
- Jacobian matrix rowj
- index of the first element to set (row[j], row[j+1] and row[j+2] will all be set)protected void setJacobianWrtParametersMean(double[][] jacobianWrtParametersMeanIn)
jacobianWrtParametersMeanIn
- the jacobianWrtParametersMean to setprotected double[][] getJacobianWrtParametersMean()
protected void setJacobianWrtParametersEccentric(double[][] jacobianWrtParametersEccentricIn)
jacobianWrtParametersEccentricIn
- the jacobianWrtParametersEccentric to setprotected double[][] getJacobianWrtParametersEccentric()
protected void setJacobianWrtParametersTrue(double[][] jacobianWrtParametersTrueIn)
jacobianWrtParametersTrueIn
- the jacobianWrtParametersTrue to setprotected double[][] getJacobianWrtParametersTrue()
public RealMatrix getJacobian(OrbitType numerator, OrbitType denominator)
numerator
- Numerator parameters.denominator
- Denominator parameters.public RealMatrix getJacobian(OrbitType numerator, OrbitType denominator, PositionAngle positionAngle)
numerator
- Numerator parameters.denominator
- Denominator parameters.positionAngle
- Position Angle.public RealMatrix getKeplerianTransitionMatrix(double dt)
dt
- Propagation interval.public static boolean isPositiveDefinite(RealMatrix matrix, double small)
matrix
- Symmetric positive semidefinite matrixsmall
- Diagonal elements threshold under which columns are
considered to be dependent on previous ones and are discardedCopyright © 2019 CNES. All rights reserved.