public final class KozaiIzsakMeanElements extends Object implements ICloneWithContext
A set of Kozai-Izsak mean elements representing an elliptical orbit.
For more information see the paper, "The Motion of a Close Earth Satellite", Y.Kozai, 1959.
This class is meant to represent classical circular and elliptical orbits.
Constructor and Description |
---|
KozaiIzsakMeanElements(Cartesian position,
Cartesian velocity,
double gravitationalParameter,
double j2UnnormalizedValue,
double referenceDistance)
Initialize a set of Kozai-Izsak mean elements from a
Cartesian position and velocity. |
KozaiIzsakMeanElements(double radius,
double radiusDot,
double parameter,
double argumentOfLatitude,
double inclination,
double rightAscensionOfAscendingNode,
double gravitationalParameter,
double j2UnnormalizedValue,
double referenceDistance)
Initialize a set of Kozai-Izsak mean orbital elements.
|
KozaiIzsakMeanElements(KeplerianElements elements,
boolean inputIsMean,
double j2UnnormalizedValue,
double referenceDistance)
Initialize a set of Kozai-Izsak mean elements from a set of osculating or mean
KeplerianElements . |
KozaiIzsakMeanElements(ModifiedKeplerianElements elements,
boolean inputIsMean,
double j2UnnormalizedValue,
double referenceDistance)
Initialize a set of Kozai-Izsak mean elements from a set of osculating or mean
ModifiedKeplerianElements . |
KozaiIzsakMeanElements(Motion1<Cartesian> motion,
double gravitationalParameter,
double j2UnnormalizedValue,
double referenceDistance)
Initializes a set of Kozai-Izsak mean elements from the specified
Cartesian motion. |
Modifier and Type | Method and Description |
---|---|
Object |
clone(CopyContext context)
Clones this object using the specified context.
|
double |
computeEccentricAnomaly()
Computes the mean eccentric anomaly.
|
double |
computeEccentricity()
Computes the mean eccentricity of the orbit.
|
double |
computeMeanAnomaly()
Computes the mean mean anomaly.
|
double |
computeOsculatingRadiusOfApoapsis()
Computes the osculating radius of apoapsis.
|
double |
computeOsculatingRadiusOfPeriapsis()
Computes the osculating radius of periapsis.
|
double |
computeSemimajorAxis()
Computes the mean semi-major axis length of the orbit.
|
double |
computeTrueAnomaly()
Computes the mean true anomaly.
|
double |
getArgumentOfLatitude()
Gets the argument of latitude of the orbit (radians).
|
double |
getGravitationalParameter()
Gets the gravitational parameter used for this element set (distance cubed per time squared).
|
double |
getInclination()
Gets the inclination of the orbit, in radians.
|
double |
getJ2ZonalHarmonicCoefficient()
Gets the unnormalized J2 zonal harmonic coefficient used for this element set.
|
OrbitType |
getOrbitType()
Gets the type of orbit represented by these elements.
|
double |
getRadialVelocity()
Gets the rate of change of the magnitude of the position vector (distance/time).
|
double |
getRadius()
Gets the magnitude of the position vector (distance).
|
double |
getReferenceDistance()
Gets the reference distance (equatorial radius) associated with the J2 zonal harmonic coefficient.
|
double |
getRightAscensionOfAscendingNode()
Gets the right ascension of the ascending node of the orbit, in radians.
|
double |
getSemilatusRectum()
Gets the semi-latus rectum of the orbit (distance).
|
Motion1<Cartesian> |
toCartesian()
Returns an osculating
Cartesian representation of these mean orbital elements. |
KeplerianElements |
toMeanKeplerianElements()
Returns a mean Keplerian orbit element representation of these mean orbital elements.
|
ModifiedKeplerianElements |
toMeanModifiedKeplerianElements()
Returns a mean modified orbit element representation of these mean orbital elements.
|
KeplerianElements |
toOsculatingKeplerianElements()
Returns an osculating Keplerian orbit element representation of these mean orbital elements.
|
ModifiedKeplerianElements |
toOsculatingModifiedKeplerianElements()
Returns an osculating modified orbit element representation of these mean orbital elements.
|
public KozaiIzsakMeanElements(double radius, double radiusDot, double parameter, double argumentOfLatitude, double inclination, double rightAscensionOfAscendingNode, double gravitationalParameter, double j2UnnormalizedValue, double referenceDistance)
radius
- Mean magnitude of position vector.radiusDot
- Mean rate of change of magnitude of position vector.parameter
- Mean semi-latus rectum.argumentOfLatitude
- Mean argument of latitude.inclination
- Mean inclination (radians).rightAscensionOfAscendingNode
- Mean right ascension of the ascending node.gravitationalParameter
- The gravitational parameter.j2UnnormalizedValue
- The non-normalized J2 zonal harmonic coefficient.referenceDistance
- The reference distance (equatorial radius) associated with the J2 coefficient.ArgumentException
- The given elements must represent a closed orbit. The exception
is thrown if the eccentricity is not below unity or if the semimajor axis is not finitely positive.ArgumentException
- The semimajor axis cannot be zero or nearly zero. Thrown if
the computed semimajor axis is less than Constants.Epsilon8
.public KozaiIzsakMeanElements(@Nonnull Cartesian position, @Nonnull Cartesian velocity, double gravitationalParameter, double j2UnnormalizedValue, double referenceDistance)
Cartesian
position and velocity. Please note that there must be a
correspondence between the inertial and fixed frames used for the input position and velocity.
Specifically, the XY plane of the input motion should correspond to the equatorial plane.position
- The Cartesian
position.velocity
- The Cartesian
velocity.gravitationalParameter
- The gravitational parameter to use to create this set.j2UnnormalizedValue
- The non-normalized J2 zonal harmonic coefficient.referenceDistance
- The reference distance (equatorial radius) associated with the J2 coefficient.ArgumentException
- The given elements must represent a closed orbit. The exception
is thrown if the eccentricity is negative or not below unity or if the semimajor axis is not finitely positive.public KozaiIzsakMeanElements(@Nonnull Motion1<Cartesian> motion, double gravitationalParameter, double j2UnnormalizedValue, double referenceDistance)
Cartesian
motion. Please note that there must be a
correspondence between the inertial and fixed frames used for the input motion.
Specifically, the XY plane of the input motion should correspond to the equatorial plane.motion
- The Cartesian
position and velocity.gravitationalParameter
- The gravitational parameter for the central body
(distance cubed per time squared).j2UnnormalizedValue
- The non-normalized J2 zonal harmonic coefficient.referenceDistance
- The reference distance (equatorial radius) associated with the J2 coefficient.ArgumentException
- The given elements must represent a closed orbit. The exception
is thrown if the eccentricity is negative or not below unity or if the semimajor axis is not finitely positive.
For other orbit types, use ModifiedKeplerianElements
.public KozaiIzsakMeanElements(ModifiedKeplerianElements elements, boolean inputIsMean, double j2UnnormalizedValue, double referenceDistance)
ModifiedKeplerianElements
.elements
- The modified Keplerian elements.inputIsMean
- True if input elements are mean elements, false if input elements are osculating.j2UnnormalizedValue
- The non-normalized J2 zonal harmonic coefficient of the central body around which to propagate.referenceDistance
- The reference distance (equatorial radius) associated with the J2 coefficient.ArgumentNullException
- Thrown when the parameter elements
is null.ArgumentException
- The given elements must represent a closed orbit. The exception
is thrown if the eccentricity is negative or not below unity or if the semimajor axis is not finitely positive.
For other orbit types, use ModifiedKeplerianElements
.public KozaiIzsakMeanElements(KeplerianElements elements, boolean inputIsMean, double j2UnnormalizedValue, double referenceDistance)
KeplerianElements
.elements
- The Keplerian elements.inputIsMean
- True if input elements are mean elements, false if input elements are osculating.j2UnnormalizedValue
- The non-normalized J2 zonal harmonic coefficient of the central body around which to propagate.referenceDistance
- The reference distance (equatorial radius) associated with the J2 coefficient.ArgumentNullException
- Thrown when the parameter elements
is null.ArgumentException
- The given elements must represent a closed orbit. The exception
is thrown if the eccentricity is negative or not below unity or if the semimajor axis is not finitely positive.
For other orbit types, use ModifiedKeplerianElements
.public final Object clone(CopyContext context)
This method should be implemented to call a copy constructor on the class of the
object being cloned. The copy constructor should take the CopyContext
as a parameter
in addition to the existing instance to copy. The copy constructor should first call
CopyContext.addObjectMapping(T, T)
to identify the newly constructed instance
as a copy of the existing instance. It should then copy all fields, using
CopyContext.updateReference(T)
to copy any reference fields.
A typical implementation of ICloneWithContext
:
public static class MyClass implements ICloneWithContext {
public MyClass(MyClass existingInstance, CopyContext context) {
context.addObjectMapping(existingInstance, this);
someReference = context.updateReference(existingInstance.someReference);
}
@Override
public final Object clone(CopyContext context) {
return new MyClass(this, context);
}
private Object someReference;
}
In general, all fields that are reference types should be copied with a call to
CopyContext.updateReference(T)
. There are a couple of exceptions:
If one of these exceptions applies, the CopyContext
should be given an opportunity
to update the reference before the reference is copied explicitly. Use
CopyContext.updateReference(T)
to update the reference. If CopyContext.updateReference(T)
returns
the original object, indicating that the context does not have a replacement registered,
then copy the object manually by invoking a Clone method, a copy constructor, or by manually
constructing a new instance and copying the values.
alwaysCopy = context.updateReference(existingInstance.alwaysCopy);
if (existingInstance.alwaysCopy != null && alwaysCopy == existingInstance.alwaysCopy) {
alwaysCopy = (AlwaysCopy) existingInstance.alwaysCopy.clone(context);
}
If you are implementing an evaluator (a class that implements IEvaluator
), the
IEvaluator.updateEvaluatorReferences(agi.foundation.infrastructure.CopyContext)
method shares some responsibilities with the
copy context constructor. Code duplication can be avoided by doing the following:
CopyContext.updateReference(T)
. You should still call CopyContext.updateReference(T)
on any references to
non-evaluators.
IEvaluator.updateEvaluatorReferences(agi.foundation.infrastructure.CopyContext)
as the last line in the constructor and pass it the
same CopyContext
passed to the constructor.
IEvaluator.updateEvaluatorReferences(agi.foundation.infrastructure.CopyContext)
as normal. See the reference documentation for
IEvaluator.updateEvaluatorReferences(agi.foundation.infrastructure.CopyContext)
for more information on implementing that method.
public MyClass(MyClass existingInstance, CopyContext context) {
super(existingInstance, context);
someReference = context.updateReference(existingInstance.someReference);
evaluatorReference = existingInstance.evaluatorReference;
updateEvaluatorReferences(context);
}
@Override
public void updateEvaluatorReferences(CopyContext context) {
evaluatorReference = context.updateReference(evaluatorReference);
}
@Override
public Object clone(CopyContext context) {
return new MyClass(this, context);
}
private Object someReference;
private IEvaluator evaluatorReference;
clone
in interface ICloneWithContext
context
- The context to use to perform the copy.@Nonnull public final Motion1<Cartesian> toCartesian()
Cartesian
representation of these mean orbital elements.Cartesian
elements that are equivalent to these KozaiIzsakMeanElements
.public final ModifiedKeplerianElements toOsculatingModifiedKeplerianElements()
KozaiIzsakMeanElements
.public final ModifiedKeplerianElements toMeanModifiedKeplerianElements()
KozaiIzsakMeanElements
.public final KeplerianElements toOsculatingKeplerianElements()
KozaiIzsakMeanElements
.public final KeplerianElements toMeanKeplerianElements()
KozaiIzsakMeanElements
.public final double computeSemimajorAxis()
public final double computeEccentricity()
public final double computeTrueAnomaly()
public final double computeMeanAnomaly()
IllegalStateException
- Thrown if the OrbitType
(get
) does not represent
either a circular or elliptical orbit.OrbitalElements.tryConvertTrueAnomalyToMeanAnomaly(double, double, double[])
public final double computeEccentricAnomaly()
IllegalStateException
- Thrown if the OrbitType
(get
) does not represent
either a circular or elliptical orbit.OrbitalElements.tryConvertTrueAnomalyToEccentricAnomaly(double, double, double[])
public final double computeOsculatingRadiusOfPeriapsis()
public final double computeOsculatingRadiusOfApoapsis()
public final double getRadius()
public final double getRadialVelocity()
public final double getInclination()
The inclination of the orbit is its tilt with reference to the Equatorial plane, or, in the diagram below, the angle i between the central body's spin (Z) axis and the orbit's angular momentum vector.
In the above diagram, ω is the argument of periapsis, θ is the true anomaly, and Ω is the right ascension of the ascending node (RAAN).
public final double getArgumentOfLatitude()
The argument of latitude, u, is the sum of the argument of periapsis and the true anomaly.
public final double getRightAscensionOfAscendingNode()
The ascending node is the point where the satellite crosses the equator moving south to north. In the diagram below, this point is referenced from the +X direction, which points in the Vernal Equinox direction. The angle between the X axis and the ascending node is called the right ascension of the ascending node (RAAN), represented here by Ω.
In the above diagram, ω is the argument of periapsis, θ is the true anomaly, and i is the inclination.
public final double getSemilatusRectum()
The semi-latus rectum represents the orbit radius at a true anomaly of 90 degrees.
public final double getGravitationalParameter()
public final double getJ2ZonalHarmonicCoefficient()
public final double getReferenceDistance()