Class OrbitComponent

java.lang.Object
gaiasky.scene.record.OrbitComponent

public class OrbitComponent extends Object
  • Field Details

    • logger

      protected static final Logger.Log logger
    • source

      public String source
      Source file
    • period

      public double period
      Orbital period in days
    • epoch

      public double epoch
      Base epoch in julian days
    • semiMajorAxis

      public double semiMajorAxis
      Semi major axis of the ellipse, in Km.
    • e

      public double e
      Eccentricity of the ellipse, in degrees.
    • i

      public double i
      Inclination, angle between the reference plane and the orbital plane, in degrees.
    • ascendingNode

      public double ascendingNode
      Longitude of the ascending node in degrees.
    • argOfPericenter

      public double argOfPericenter
      Argument of perihelion in degrees.
    • meanAnomaly

      public double meanAnomaly
      Mean anomaly at epoch, in degrees.
    • mu

      public double mu
      G*M of central body (gravitational constant). Defaults to the Sun's. In km^3/s^2.
  • Constructor Details

    • OrbitComponent

      public OrbitComponent()
  • Method Details

    • setSource

      public void setSource(String source)
    • setPeriod

      public void setPeriod(Double period)
    • setEpoch

      public void setEpoch(Double epoch)
    • setSemiMajorAxis

      public void setSemiMajorAxis(Double semiMajorAxis)
    • setSemimajoraxis

      public void setSemimajoraxis(Double setmiMajorAxis)
    • setEccentricity

      public void setEccentricity(Double e)
    • setInclination

      public void setInclination(Double i)
    • setAscendingNode

      public void setAscendingNode(Double ascendingNode)
    • setAscendingnode

      public void setAscendingnode(Double ascendingNode)
    • setArgOfPericenter

      public void setArgOfPericenter(Double argOfPericenter)
    • setArgofpericenter

      public void setArgofpericenter(Double argOfPericenter)
    • setMeanAnomaly

      public void setMeanAnomaly(Double meanAnomaly)
    • setMeananomaly

      public void setMeananomaly(Double meanAnomaly)
    • computeMu

      public void computeMu(boolean km3s2)
      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.
    • setMu

      public void setMu(Double mu)
    • loadDataPoint

      public void loadDataPoint(Vector3D out, Instant t)
      Load the point (cartesian position vector) in the orbit for the given time.
      Parameters:
      out - The vector to store the result.
      t - The time as a Instant.
    • loadDataPoint

      public void loadDataPoint(Vector3D out, double dtDays)
      Loads the orbit cartesian position vector for the given time.
      Parameters:
      out - The vector to store the result.
      dtDays - The time as Julian days from epoch.
    • getMeanAnomalyAt

      public double getMeanAnomalyAt(double dtDays)
      Gets the mean anomaly at the given delta time from epoch.
      Parameters:
      dtDays - The delta time in days.
      Returns:
      The mean anomaly in radians.
    • getTrueAnomaly

      public double getTrueAnomaly(double E)
      Gets the true anomaly for the given solution to Kepler's equation.
      Parameters:
      E - Solution to Kepler's equation.
      Returns:
      The true anomaly.
    • solveKepler

      public double solveKepler(double M, double e)
      Solves Kepler's equation: M = E - e * sin(E)
      Parameters:
      M - The mean anomaly at the time.
      e - The eccentricity.
      Returns:
      The solution to Kepler's equation, E.
    • trueAnomalyToTime

      public double trueAnomalyToTime(double nuRad)
      Convert a true anomaly (nu) in the current orbit to the Julian days since epoch.
      Parameters:
      nuRad - The true anomaly, in radians.
      Returns:
      The Julian days since epoch corresponding to the given true anomaly.
    • timeToTrueAnomaly

      public double timeToTrueAnomaly(double dtDays)
      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.
    • keplerianToCartesianTime

      public void keplerianToCartesianTime(Vector3D out, double dtDays)
      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.
    • keplerianToCartesianNu

      public void keplerianToCartesianNu(Vector3D out, double nu)
      Get the cartesian position vector for the given true anomaly (nu).
      Parameters:
      out - The vector to store the result.
      nu - The true anomaly.
    • loadDataPointNu

      public void loadDataPointNu(Vector3D out, double nu)
    • loadDataPointReneSchwarz

      @Deprecated public void loadDataPointReneSchwarz(Vector3D out, double dtDays)
      Deprecated.
    • toString

      public String toString()
      Overrides:
      toString in class Object