Package gaiasky.scene.record
Class OrbitComponent
java.lang.Object
gaiasky.scene.record.OrbitComponent
-
Field Summary
FieldsModifier and TypeFieldDescriptiondouble
Argument of perihelion in degrees.double
Longitude of the ascending node in degrees.double
Eccentricity of the ellipse, in degrees.double
Base epoch in julian daysdouble
Inclination, angle between the reference plane and the orbital plane, in degrees.protected static final Logger.Log
double
Mean anomaly at epoch, in degrees.double
G*M of central body (gravitational constant).double
Orbital period in daysdouble
Semi major axis of the ellipse, in Km.Source file -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
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.double
getMeanAnomalyAt
(double dtDays) Gets the mean anomaly at the given delta time from epoch.double
getTrueAnomaly
(double E) Gets the true anomaly for the given solution to Kepler's equation.void
keplerianToCartesianNu
(Vector3D out, double nu) Get the cartesian position vector for the given true anomaly (nu).void
keplerianToCartesianTime
(Vector3D out, double dtDays) Get the cartesian position vector for the given delta time from epoch.void
loadDataPoint
(Vector3D out, double dtDays) Loads the orbit cartesian position vector for the given time.void
loadDataPoint
(Vector3D out, Instant t) Load the point (cartesian position vector) in the orbit for the given time.void
loadDataPointNu
(Vector3D out, double nu) void
loadDataPointReneSchwarz
(Vector3D out, double dtDays) Deprecated.void
setArgofpericenter
(Double argOfPericenter) void
setArgOfPericenter
(Double argOfPericenter) void
setAscendingnode
(Double ascendingNode) void
setAscendingNode
(Double ascendingNode) void
void
void
void
setMeananomaly
(Double meanAnomaly) void
setMeanAnomaly
(Double meanAnomaly) void
void
void
setSemimajoraxis
(Double setmiMajorAxis) void
setSemiMajorAxis
(Double semiMajorAxis) void
double
solveKepler
(double M, double e) Solves Kepler's equation: M = E - e * sin(E)double
timeToTrueAnomaly
(double dtDays) Convert the given time from epoch (in days) to the true anomaly angle.toString()
double
trueAnomalyToTime
(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
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 aInstant
.
-
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
-