Package gaiasky.util.elements
Class Anomalies
java.lang.Object
gaiasky.util.elements.Anomalies
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic double
mean2ecc
(KeplerSolver kepler, double mA, double ecc) /** Compute eccentric anomaly from eccentricity and mean anomaly (solving Kepler Equation).static double
reduce
(double x) Reduce the given angle to the interval [0 2pi[.static double
true2ecc
(double v, double ecc) Compute eccentric anomaly from eccentricity and true anomaly.static double
true2eccConstrained
(double v, double ecc) Compute eccentric anomaly from eccentricity and true anomaly which is assumed to be between 0 and 2pi.
Note that, in this version, no consistency checks are performed on the input.
-
Field Details
-
TWO_PI
public static final double TWO_PIThe Constant TWO_PI.- See Also:
-
-
Constructor Details
-
Anomalies
public Anomalies()
-
-
Method Details
-
reduce
public static double reduce(double x) Reduce the given angle to the interval [0 2pi[.- Parameters:
x
- Angle (units:rad
).- Returns:
- the angle in the range of 0 through 2pi.
-
true2ecc
public static double true2ecc(double v, double ecc) Compute eccentric anomaly from eccentricity and true anomaly.- Parameters:
v
- eccentric anomaly.ecc
- eccentricity.- Returns:
- the eccentric anomaly.
- Throws:
IllegalArgumentException
- ifecc
is not in the interval [0 1[.
-
true2eccConstrained
public static double true2eccConstrained(double v, double ecc) Compute eccentric anomaly from eccentricity and true anomaly which is assumed to be between 0 and 2pi.
Note that, in this version, no consistency checks are performed on the input.- Parameters:
v
- eccentric anomaly.ecc
- eccentricity.- Returns:
- the eccentric anomaly in the range of 0 through 2pi.
-
mean2ecc
/** Compute eccentric anomaly from eccentricity and mean anomaly (solving Kepler Equation). It will use the values for error tolerance and number of iterations currently set in thekepler
object.- Parameters:
kepler
- Solver.mA
- Mean anomaly.ecc
- eccentricity.- Returns:
- the eccentric anomaly.
- Throws:
IllegalArgumentException
- ifecc
is not in the interval [0 1[.
-