Class KeplerianElements
java.lang.Object
gaiasky.util.coord.KeplerianElements
Contains utilities to convert cartesian positions to Keplerian elements and back.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic doublecomputeMu(boolean km3s2, double period, double semiMajorAxis) This method automatically computes the standard gravitational parameter (mu) of the orbit if the period and the semi-major axis are set as mu=4 pi^2 a^3 / T^2.static voidkeplerianToCartesianNu(Vector3D out, double nu, double i, double e, double ascendingNode, double argOfPericenter, double semiMajorAxis) Get the cartesian position vector for the given true anomaly (nu).static voidkeplerianToCartesianTime(Vector3D out, double dtDays, double period, double i, double e, double ascendingNode, double argOfPericenter, double semiMajorAxis, double meanAnomaly) Get the cartesian position vector for the given delta time from epoch.static doubletimeToTrueAnomaly(double dtDays, double period, double meanAnomaly, double e) Convert the given time from epoch (in days) to the true anomaly angle.
-
Constructor Details
-
KeplerianElements
public KeplerianElements()
-
-
Method Details
-
computeMu
public static double computeMu(boolean km3s2, double period, double semiMajorAxis) This method automatically computes the standard gravitational parameter (mu) of the orbit if the period and the semi-major axis are set as mu=4 pi^2 a^3 / T^2. -
keplerianToCartesianNu
public static void keplerianToCartesianNu(Vector3D out, double nu, double i, double e, double ascendingNode, double argOfPericenter, double semiMajorAxis) Get the cartesian position vector for the given true anomaly (nu).- Parameters:
out- The vector to store the result.nu- The true anomaly.
-
keplerianToCartesianTime
public static void keplerianToCartesianTime(Vector3D out, double dtDays, double period, double i, double e, double ascendingNode, double argOfPericenter, double semiMajorAxis, double meanAnomaly) Get the cartesian position vector for the given delta time from epoch.- Parameters:
out- The vector to store the result.dtDays- The Julian days from epoch.
-
timeToTrueAnomaly
public static double timeToTrueAnomaly(double dtDays, double period, double meanAnomaly, double e) Convert the given time from epoch (in days) to the true anomaly angle.- Parameters:
dtDays- The time from epoch, in days.- Returns:
- The true anomaly, in radians.
-