Class KeplerianElements

java.lang.Object
gaiasky.util.coord.KeplerianElements

public class KeplerianElements extends Object
Contains utilities to convert cartesian positions to Keplerian elements and back.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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.
    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).
    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.
    static double
    timeToTrueAnomaly(double dtDays, double period, double meanAnomaly, double e)
    Convert the given time from epoch (in days) to the true anomaly angle.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • 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.