public class FieldKeplerianOrbit<T extends RealFieldElement<T>> extends FieldOrbit<T>
The parameters used internally are the classical Keplerian elements:
a e i ω Ω vwhere ω stands for the Perigee Argument, Ω stands for the Right Ascension of the Ascending Node and v stands for the true anomaly.
This class supports hyperbolic orbits, using the convention that semi major axis is negative for such orbits (and of course eccentricity is greater than 1).
When orbit is either equatorial or circular, some Keplerian elements
(more precisely ω and Ω) become ambiguous so this class should not
be used for such orbits. For this reason, equinoctial
orbits
is the recommended way to represent orbits.
The instance KeplerianOrbit
is guaranteed to be immutable.
Orbit
,
CircularOrbit
,
CartesianOrbit
,
EquinoctialOrbit
Constructor and Description |
---|
FieldKeplerianOrbit(FieldOrbit<T> op)
Constructor from any kind of orbital parameters.
|
FieldKeplerianOrbit(FieldPVCoordinates<T> FieldPVCoordinates,
Frame frame,
FieldAbsoluteDate<T> date,
T mu)
Constructor from Cartesian parameters.
|
FieldKeplerianOrbit(TimeStampedFieldPVCoordinates<T> pvCoordinates,
Frame frame,
T mu)
Constructor from Cartesian parameters.
|
FieldKeplerianOrbit(T a,
T e,
T i,
T pa,
T raan,
T anomaly,
PositionAngle type,
Frame frame,
FieldAbsoluteDate<T> date,
T mu)
Creates a new instance.
|
FieldKeplerianOrbit(T a,
T e,
T i,
T pa,
T raan,
T anomaly,
T aDot,
T eDot,
T iDot,
T paDot,
T raanDot,
T anomalyDot,
PositionAngle type,
Frame frame,
FieldAbsoluteDate<T> date,
T mu)
Creates a new instance.
|
Modifier and Type | Method and Description |
---|---|
void |
addKeplerContribution(PositionAngle type,
T gm,
T[] pDot)
Add the contribution of the Keplerian motion to parameters derivatives
|
protected T[][] |
computeJacobianEccentricWrtCartesian()
Compute the Jacobian of the orbital parameters with eccentric angle with respect to the Cartesian parameters.
|
protected T[][] |
computeJacobianMeanWrtCartesian()
Compute the Jacobian of the orbital parameters with mean angle with respect to the Cartesian parameters.
|
protected T[][] |
computeJacobianTrueWrtCartesian()
Compute the Jacobian of the orbital parameters with true angle with respect to the Cartesian parameters.
|
static <T extends RealFieldElement<T>> |
ellipticEccentricToMean(T E,
T e)
Computes the mean anomaly from the elliptic eccentric anomaly.
|
static <T extends RealFieldElement<T>> |
ellipticEccentricToTrue(T E,
T e)
Computes the true anomaly from the elliptic eccentric anomaly.
|
T |
getA()
Get the semi-major axis.
|
T |
getADot()
Get the semi-major axis derivative.
|
T |
getAnomaly(PositionAngle type)
Get the anomaly.
|
T |
getAnomalyDot(PositionAngle type)
Get the anomaly derivative.
|
T |
getE()
Get the eccentricity.
|
T |
getEccentricAnomaly()
Get the eccentric anomaly.
|
T |
getEccentricAnomalyDot()
Get the eccentric anomaly derivative.
|
T |
getEDot()
Get the eccentricity derivative.
|
T |
getEquinoctialEx()
Get the first component of the equinoctial eccentricity vector.
|
T |
getEquinoctialExDot()
Get the first component of the equinoctial eccentricity vector.
|
T |
getEquinoctialEy()
Get the second component of the equinoctial eccentricity vector.
|
T |
getEquinoctialEyDot()
Get the second component of the equinoctial eccentricity vector.
|
T |
getHx()
Get the first component of the inclination vector.
|
T |
getHxDot()
Get the first component of the inclination vector derivative.
|
T |
getHy()
Get the second component of the inclination vector.
|
T |
getHyDot()
Get the second component of the inclination vector derivative.
|
T |
getI()
Get the inclination.
|
T |
getIDot()
Get the inclination derivative.
|
T |
getLE()
Get the eccentric longitude argument.
|
T |
getLEDot()
Get the eccentric longitude argument derivative.
|
T |
getLM()
Get the mean longitude argument.
|
T |
getLMDot()
Get the mean longitude argument derivative.
|
T |
getLv()
Get the true longitude argument.
|
T |
getLvDot()
Get the true longitude argument derivative.
|
T |
getMeanAnomaly()
Get the mean anomaly.
|
T |
getMeanAnomalyDot()
Get the mean anomaly derivative.
|
T |
getPerigeeArgument()
Get the perigee argument.
|
T |
getPerigeeArgumentDot()
Get the perigee argument derivative.
|
T |
getRightAscensionOfAscendingNode()
Get the right ascension of the ascending node.
|
T |
getRightAscensionOfAscendingNodeDot()
Get the right ascension of the ascending node derivative.
|
T |
getTrueAnomaly()
Get the true anomaly.
|
T |
getTrueAnomalyDot()
Get the true anomaly derivative.
|
OrbitType |
getType()
Get the orbit type.
|
boolean |
hasDerivatives()
Check if orbit includes derivatives.
|
static <T extends RealFieldElement<T>> |
hyperbolicEccentricToMean(T H,
T e)
Computes the mean anomaly from the hyperbolic eccentric anomaly.
|
static <T extends RealFieldElement<T>> |
hyperbolicEccentricToTrue(T H,
T e)
Computes the true anomaly from the hyperbolic eccentric anomaly.
|
protected TimeStampedFieldPVCoordinates<T> |
initPVCoordinates()
Compute the position/velocity coordinates from the canonical parameters.
|
FieldKeplerianOrbit<T> |
interpolate(FieldAbsoluteDate<T> date,
Stream<FieldOrbit<T>> sample)
Get an interpolated instance.
|
static <T extends RealFieldElement<T>> |
meanToEllipticEccentric(T M,
T e)
Computes the elliptic eccentric anomaly from the mean anomaly.
|
static <T extends RealFieldElement<T>> |
meanToHyperbolicEccentric(T M,
T e)
Computes the hyperbolic eccentric anomaly from the mean anomaly.
|
static <T extends RealFieldElement<T>> |
normalizeAngle(T a,
T center)
Deprecated.
|
FieldKeplerianOrbit<T> |
shiftedBy(double dt)
Get a time-shifted instance.
|
FieldKeplerianOrbit<T> |
shiftedBy(T dt)
Get a time-shifted orbit.
|
KeplerianOrbit |
toOrbit()
Transforms the FieldOrbit instance into an Orbit instance.
|
String |
toString()
Returns a string representation of this Keplerian parameters object.
|
static <T extends RealFieldElement<T>> |
trueToEllipticEccentric(T v,
T e)
Computes the elliptic eccentric anomaly from the true anomaly.
|
static <T extends RealFieldElement<T>> |
trueToHyperbolicEccentric(T v,
T e)
Computes the hyperbolic eccentric anomaly from the true anomaly.
|
fillHalfRow, fillHalfRow, fillHalfRow, fillHalfRow, fillHalfRow, fillHalfRow, getDate, getFrame, getJacobianWrtCartesian, getJacobianWrtParameters, getKeplerianMeanMotion, getKeplerianPeriod, getMu, getPVCoordinates, getPVCoordinates, getPVCoordinates, hasNonKeplerianAcceleration
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
interpolate
public FieldKeplerianOrbit(T a, T e, T i, T pa, T raan, T anomaly, PositionAngle type, Frame frame, FieldAbsoluteDate<T> date, T mu) throws IllegalArgumentException
a
- semi-major axis (m), negative for hyperbolic orbitse
- eccentricity (positive or equal to 0)i
- inclination (rad)pa
- perigee argument (ω, rad)raan
- right ascension of ascending node (Ω, rad)anomaly
- mean, eccentric or true anomaly (rad)type
- type of anomalyframe
- the frame in which the parameters are defined
(must be a pseudo-inertial frame
)date
- date of the orbital parametersmu
- central attraction coefficient (m³/s²)IllegalArgumentException
- if frame is not a pseudo-inertial frame
or a and e don't match for hyperbolic orbits,
or v is out of range for hyperbolic orbitspublic FieldKeplerianOrbit(T a, T e, T i, T pa, T raan, T anomaly, T aDot, T eDot, T iDot, T paDot, T raanDot, T anomalyDot, PositionAngle type, Frame frame, FieldAbsoluteDate<T> date, T mu) throws IllegalArgumentException
a
- semi-major axis (m), negative for hyperbolic orbitse
- eccentricity (positive or equal to 0)i
- inclination (rad)pa
- perigee argument (ω, rad)raan
- right ascension of ascending node (Ω, rad)anomaly
- mean, eccentric or true anomaly (rad)aDot
- semi-major axis derivative, null if unknown (m/s)eDot
- eccentricity derivative, null if unknowniDot
- inclination derivative, null if unknown (rad/s)paDot
- perigee argument derivative, null if unknown (rad/s)raanDot
- right ascension of ascending node derivative, null if unknown (rad/s)anomalyDot
- mean, eccentric or true anomaly derivative, null if unknown (rad/s)type
- type of anomalyframe
- the frame in which the parameters are defined
(must be a pseudo-inertial frame
)date
- date of the orbital parametersmu
- central attraction coefficient (m³/s²)IllegalArgumentException
- if frame is not a pseudo-inertial frame
or a and e don't match for hyperbolic orbits,
or v is out of range for hyperbolic orbitspublic FieldKeplerianOrbit(TimeStampedFieldPVCoordinates<T> pvCoordinates, Frame frame, T mu) throws IllegalArgumentException
The acceleration provided in FieldPVCoordinates
is accessible using
FieldOrbit.getPVCoordinates()
and FieldOrbit.getPVCoordinates(Frame)
. All other methods
use mu
and the position to compute the acceleration, including
shiftedBy(RealFieldElement)
and FieldOrbit.getPVCoordinates(FieldAbsoluteDate, Frame)
.
pvCoordinates
- the PVCoordinates of the satelliteframe
- the frame in which are defined the FieldPVCoordinates
(must be a pseudo-inertial frame
)mu
- central attraction coefficient (m³/s²)IllegalArgumentException
- if frame is not a pseudo-inertial frame
public FieldKeplerianOrbit(FieldPVCoordinates<T> FieldPVCoordinates, Frame frame, FieldAbsoluteDate<T> date, T mu) throws IllegalArgumentException
The acceleration provided in FieldPVCoordinates
is accessible using
FieldOrbit.getPVCoordinates()
and FieldOrbit.getPVCoordinates(Frame)
. All other methods
use mu
and the position to compute the acceleration, including
shiftedBy(RealFieldElement)
and FieldOrbit.getPVCoordinates(FieldAbsoluteDate, Frame)
.
FieldPVCoordinates
- the PVCoordinates of the satelliteframe
- the frame in which are defined the FieldPVCoordinates
(must be a pseudo-inertial frame
)date
- date of the orbital parametersmu
- central attraction coefficient (m³/s²)IllegalArgumentException
- if frame is not a pseudo-inertial frame
public FieldKeplerianOrbit(FieldOrbit<T> op)
op
- orbital parameters to copypublic OrbitType getType()
getType
in class FieldOrbit<T extends RealFieldElement<T>>
public T getA()
Note that the semi-major axis is considered negative for hyperbolic orbits.
getA
in class FieldOrbit<T extends RealFieldElement<T>>
public T getADot()
Note that the semi-major axis is considered negative for hyperbolic orbits.
If the orbit was created without derivatives, the value returned is null.
getADot
in class FieldOrbit<T extends RealFieldElement<T>>
public T getE()
getE
in class FieldOrbit<T extends RealFieldElement<T>>
public T getEDot()
If the orbit was created without derivatives, the value returned is null.
getEDot
in class FieldOrbit<T extends RealFieldElement<T>>
public T getI()
If the orbit was created without derivatives, the value returned is null.
getI
in class FieldOrbit<T extends RealFieldElement<T>>
public T getIDot()
getIDot
in class FieldOrbit<T extends RealFieldElement<T>>
public T getPerigeeArgument()
public T getPerigeeArgumentDot()
If the orbit was created without derivatives, the value returned is null.
public T getRightAscensionOfAscendingNode()
public T getRightAscensionOfAscendingNodeDot()
If the orbit was created without derivatives, the value returned is null.
public T getTrueAnomaly()
public T getTrueAnomalyDot()
If the orbit was created without derivatives, the value returned is null.
public T getEccentricAnomaly()
public T getEccentricAnomalyDot()
If the orbit was created without derivatives, the value returned is null.
public T getMeanAnomaly()
public T getMeanAnomalyDot()
If the orbit was created without derivatives, the value returned is null.
public T getAnomaly(PositionAngle type)
type
- type of the anglepublic T getAnomalyDot(PositionAngle type)
If the orbit was created without derivatives, the value returned is null.
type
- type of the anglepublic boolean hasDerivatives()
hasDerivatives
in class FieldOrbit<T extends RealFieldElement<T>>
FieldOrbit.getADot()
,
FieldOrbit.getEquinoctialExDot()
,
FieldOrbit.getEquinoctialEyDot()
,
FieldOrbit.getHxDot()
,
FieldOrbit.getHyDot()
,
FieldOrbit.getLEDot()
,
FieldOrbit.getLvDot()
,
FieldOrbit.getLMDot()
,
FieldOrbit.getEDot()
,
FieldOrbit.getIDot()
public static <T extends RealFieldElement<T>> T ellipticEccentricToTrue(T E, T e)
T
- type of the field elementsE
- eccentric anomaly (rad)e
- eccentricitypublic static <T extends RealFieldElement<T>> T trueToEllipticEccentric(T v, T e)
T
- type of the field elementsv
- true anomaly (rad)e
- eccentricitypublic static <T extends RealFieldElement<T>> T hyperbolicEccentricToTrue(T H, T e)
T
- type of the field elementsH
- hyperbolic eccentric anomaly (rad)e
- eccentricitypublic static <T extends RealFieldElement<T>> T trueToHyperbolicEccentric(T v, T e)
T
- type of the field elementsv
- true anomaly (rad)e
- eccentricitypublic static <T extends RealFieldElement<T>> T hyperbolicEccentricToMean(T H, T e)
T
- type of the field elementsH
- hyperbolic eccentric anomaly (rad)e
- eccentricitypublic static <T extends RealFieldElement<T>> T meanToEllipticEccentric(T M, T e)
The algorithm used here for solving Kepler equation has been published in: "Procedures for solving Kepler's Equation", A. W. Odell and R. H. Gooding, Celestial Mechanics 38 (1986) 307-334
T
- type of the field elementsM
- mean anomaly (rad)e
- eccentricitypublic static <T extends RealFieldElement<T>> T meanToHyperbolicEccentric(T M, T e)
The algorithm used here for solving hyperbolic Kepler equation is Danby's iterative method (3rd order) with Vallado's initial guess.
T
- Type of the field elementsM
- mean anomaly (rad)e
- eccentricitypublic static <T extends RealFieldElement<T>> T ellipticEccentricToMean(T E, T e)
T
- type of the field elementsE
- eccentric anomaly (rad)e
- eccentricitypublic T getEquinoctialEx()
getEquinoctialEx
in class FieldOrbit<T extends RealFieldElement<T>>
public T getEquinoctialExDot()
If the orbit was created without derivatives, the value returned is null.
getEquinoctialExDot
in class FieldOrbit<T extends RealFieldElement<T>>
public T getEquinoctialEy()
getEquinoctialEy
in class FieldOrbit<T extends RealFieldElement<T>>
public T getEquinoctialEyDot()
If the orbit was created without derivatives, the value returned is null.
getEquinoctialEyDot
in class FieldOrbit<T extends RealFieldElement<T>>
public T getHx()
getHx
in class FieldOrbit<T extends RealFieldElement<T>>
public T getHxDot()
If the orbit was created without derivatives, the value returned is null.
getHxDot
in class FieldOrbit<T extends RealFieldElement<T>>
public T getHy()
getHy
in class FieldOrbit<T extends RealFieldElement<T>>
public T getHyDot()
getHyDot
in class FieldOrbit<T extends RealFieldElement<T>>
public T getLv()
getLv
in class FieldOrbit<T extends RealFieldElement<T>>
public T getLvDot()
If the orbit was created without derivatives, the value returned is null.
getLvDot
in class FieldOrbit<T extends RealFieldElement<T>>
public T getLE()
getLE
in class FieldOrbit<T extends RealFieldElement<T>>
public T getLEDot()
If the orbit was created without derivatives, the value returned is null.
getLEDot
in class FieldOrbit<T extends RealFieldElement<T>>
public T getLM()
getLM
in class FieldOrbit<T extends RealFieldElement<T>>
public T getLMDot()
If the orbit was created without derivatives, the value returned is null.
getLMDot
in class FieldOrbit<T extends RealFieldElement<T>>
protected TimeStampedFieldPVCoordinates<T> initPVCoordinates()
initPVCoordinates
in class FieldOrbit<T extends RealFieldElement<T>>
public FieldKeplerianOrbit<T> shiftedBy(double dt)
dt
- time shift in secondspublic FieldKeplerianOrbit<T> shiftedBy(T 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.
shiftedBy
in interface FieldTimeShiftable<FieldOrbit<T extends RealFieldElement<T>>,T extends RealFieldElement<T>>
shiftedBy
in class FieldOrbit<T extends RealFieldElement<T>>
dt
- time shift in secondspublic FieldKeplerianOrbit<T> interpolate(FieldAbsoluteDate<T> date, Stream<FieldOrbit<T>> sample)
Note that the state of the current instance may not be used in the interpolation process, only its type and non interpolable fields are used (for example central attraction coefficient or frame when interpolating orbits). The interpolable fields taken into account are taken only from the states of the sample points. So if the state of the instance must be used, the instance should be included in the sample points.
Note that this method is designed for small samples only (say up to about 10-20 points) so it can be implemented using polynomial interpolation (typically Hermite interpolation). Using too much points may induce Runge's phenomenon and numerical problems (including NaN appearing).
The interpolated instance is created by polynomial Hermite interpolation on Keplerian elements, without derivatives (which means the interpolation falls back to Lagrange interpolation only).
As this implementation of interpolation is polynomial, it should be used only with small samples (about 10-20 points) in order to avoid Runge's phenomenon and numerical problems (including NaN appearing).
If orbit interpolation on large samples is needed, using the Ephemeris
class is a better way than using this
low-level interpolation. The Ephemeris class automatically handles selection of
a neighboring sub-sample with a predefined number of point from a large global sample
in a thread-safe way.
date
- interpolation datesample
- sample points on which interpolation should be doneprotected T[][] 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.
computeJacobianMeanWrtCartesian
in class FieldOrbit<T extends RealFieldElement<T>>
FieldOrbit.computeJacobianEccentricWrtCartesian()
,
FieldOrbit.computeJacobianTrueWrtCartesian()
protected T[][] 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.
computeJacobianEccentricWrtCartesian
in class FieldOrbit<T extends RealFieldElement<T>>
FieldOrbit.computeJacobianMeanWrtCartesian()
,
FieldOrbit.computeJacobianTrueWrtCartesian()
protected T[][] 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.
computeJacobianTrueWrtCartesian
in class FieldOrbit<T extends RealFieldElement<T>>
FieldOrbit.computeJacobianMeanWrtCartesian()
,
FieldOrbit.computeJacobianEccentricWrtCartesian()
public void addKeplerContribution(PositionAngle type, T gm, T[] pDot)
This method is used by integration-based propagators to evaluate the part of Keplerian motion to evolution of the orbital state.
addKeplerContribution
in class FieldOrbit<T extends RealFieldElement<T>>
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 String toString()
@Deprecated public static <T extends RealFieldElement<T>> T normalizeAngle(T a, T center)
MathUtils.normalizeAngle(RealFieldElement, RealFieldElement)
This method has three main uses:
a = MathUtils.normalizeAngle(a, FastMath.PI);
a = MathUtils.normalizeAngle(a, 0.0);
angle = MathUtils.normalizeAngle(end, start) - start;
Note that due to numerical accuracy and since π cannot be represented exactly, the result interval is closed, it cannot be half-closed as would be more satisfactory in a purely mathematical view.
T
- the type of the field elementsa
- angle to normalizecenter
- center of the desired 2π interval for the resultpublic KeplerianOrbit toOrbit()
FieldOrbit
toOrbit
in class FieldOrbit<T extends RealFieldElement<T>>
Copyright © 2002-2020 CS GROUP. All rights reserved.