Class OrbitComponent
java.lang.Object
gaiasky.scene.record.OrbitComponent
-
Field Summary
FieldsModifier and TypeFieldDescriptiondoubleArgument of perihelion in degrees.doubleLongitude of the ascending node in degrees.doubleEccentricity of the ellipse, in degrees.doubleBase epoch in julian daysdoubleInclination, angle between the reference plane and the orbital plane, in degrees.protected static final Logger.LogdoubleMean anomaly at epoch, in degrees.doubleG*M of central body (gravitational constant).doubleOrbital period in daysdoubleSemi major axis of the ellipse, in Km.Source file -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidcomputeMu(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.doublegetMeanAnomalyAt(double dtDays) Gets the mean anomaly at the given delta time from epoch.doublegetTrueAnomaly(double E) Gets the true anomaly for the given solution to Kepler's equation.voidkeplerianToCartesianNu(Vector3D out, double nu) Get the cartesian position vector for the given true anomaly (nu).voidkeplerianToCartesianTime(Vector3D out, double dtDays) Get the cartesian position vector for the given delta time from epoch.voidloadDataPoint(Vector3D out, double dtDays) Loads the orbit cartesian position vector for the given time.voidloadDataPoint(Vector3D out, Instant t) Load the point (cartesian position vector) in the orbit for the given time.voidloadDataPointNu(Vector3D out, double nu) voidloadDataPointReneSchwarz(Vector3D out, double dtDays) Deprecated.voidsetArgofpericenter(Double argOfPericenter) voidsetArgOfPericenter(Double argOfPericenter) voidsetAscendingnode(Double ascendingNode) voidsetAscendingNode(Double ascendingNode) voidvoidvoidvoidsetMeananomaly(Double meanAnomaly) voidsetMeanAnomaly(Double meanAnomaly) voidvoidvoidsetSemimajoraxis(Double setmiMajorAxis) voidsetSemiMajorAxis(Double semiMajorAxis) voiddoublesolveKepler(double M, double e) Solves Kepler's equation: M = E - e * sin(E)doubletimeToTrueAnomaly(double dtDays) Convert the given time from epoch (in days) to the true anomaly angle.toString()doubletrueAnomalyToTime(double nuRad) Convert a true anomaly (nu) in the current orbit to the Julian days since epoch.
-
Field Details
-
logger
-
source
Source file -
period
public double periodOrbital period in days -
epoch
public double epochBase epoch in julian days -
semiMajorAxis
public double semiMajorAxisSemi major axis of the ellipse, in Km. -
e
public double eEccentricity of the ellipse, in degrees. -
i
public double iInclination, angle between the reference plane and the orbital plane, in degrees. -
ascendingNode
public double ascendingNodeLongitude of the ascending node in degrees. -
argOfPericenter
public double argOfPericenterArgument of perihelion in degrees. -
meanAnomaly
public double meanAnomalyMean anomaly at epoch, in degrees. -
mu
public double muG*M of central body (gravitational constant). Defaults to the Sun's. In km^3/s^2.
-
-
Constructor Details
-
OrbitComponent
public OrbitComponent()
-
-
Method Details
-
setSource
-
setPeriod
-
setEpoch
-
setSemiMajorAxis
-
setSemimajoraxis
-
setEccentricity
-
setInclination
-
setAscendingNode
-
setAscendingnode
-
setArgOfPericenter
-
setArgofpericenter
-
setMeanAnomaly
-
setMeananomaly
-
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
-
loadDataPoint
-
loadDataPoint
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
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
Get the cartesian position vector for the given true anomaly (nu).- Parameters:
out- The vector to store the result.nu- The true anomaly.
-
loadDataPointNu
-
loadDataPointReneSchwarz
Deprecated. -
toString
-