|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.vizzini.math.orbit.OrbitMechanic
public class OrbitMechanic
Provides a helper class for orbit mechanics calculations.
Symbol | Description | Units |
---|---|---|
mu | gravitational parameter | km^3 sec^-2 |
a | semi-major axis | km |
ecc | eccentricity | N/A |
i | inclination | radians |
omega | longitude of the ascending node | radians |
w | argument of periapsis | radians |
nu | true anomaly | radians |
Symbol | Description | Units |
---|---|---|
P | period | sec |
n | mean motion | radians/sec |
M | mean anomaly | radians |
E | eccentric anomaly | radians |
t | time | sec |
tp | time of periapsis passage | sec |
Method Summary | |
---|---|
protected double |
acos(double numerator,
double denominator)
Compute the arc cosine using the given numerator and denominator. |
protected double |
checkAngleBounds(double angle)
Make the given angle in [0.0, 2*PI]. |
Vector |
computeE(double mu,
Vector r,
Vector v)
Compute the eccentricity vector E. |
double |
computeEcc(double mu,
Vector r,
Vector v)
Compute the eccentricity. |
double |
computeEccentricAnomalyFromEccM(double ecc,
double meanAnomaly)
Compute the eccentric anomaly from the given parameters. |
double |
computeEccentricAnomalyFromEccM(double ecc,
double meanAnomaly,
double delta)
Compute the eccentric anomaly from the given parameters. |
double |
computeEccentricAnomalyFromEccNu(double ecc,
double trueAnomaly)
Compute the eccentric anomaly from the given parameters. |
Vector |
computeH(Vector r,
Vector v)
Compute the angular momentum vector H. |
double |
computeMeanAnomalyFromEccE(double ecc,
double eccentricAnomaly)
Compute mean anomaly from the given parameters. |
double |
computeMeanAnomalyFromT(double mu,
double a,
double m0,
double t,
double t0)
Compute mean anomaly from the given parameters. |
double |
computeMeanMotion(double mu,
double a)
Compute mean motion from the given parameters. |
Vector |
computeN(Vector h)
Compute the node vector N. |
double |
computeOmega(Vector n)
Compute the longitude of the ascending node. |
double |
computePeriod(double mu,
double a)
Compute period of orbit from the given parameter. |
Vector |
computeR(double mu,
double a,
double ecc,
double i,
double omega,
double w,
double nu)
Compute the position vector for the given orbit elements. |
Vector[] |
computeRAndV(double mu,
double a,
double ecc,
double i,
double omega,
double w,
double nu)
Compute the position and velocity vectors for the given orbit elements. |
double |
computeSemiLatusRectum(double a,
double ecc)
Compute the semi-latus rectum. |
double |
computeSemiMajorAxis(double p,
double ecc)
Compute the semi-major axis. |
double |
computeT(double mu,
double a,
double meanAnomaly,
double meanAnomaly0,
double t0)
Compute time from the given paramters. |
double |
computeTimeOfPeriapsisPassage(double mu,
double a,
double ecc,
double meanAnomaly0,
double t0)
Return the time of periapsis passage. |
double |
computeTrueAnomaly(double ecc,
double eccentricAnomaly)
Compute the true anomaly from the given parameters. |
double |
computeTrueAnomaly(Vector e,
Vector n,
Vector r,
Vector v)
Compute the true anomaly from the given parameters. |
Vector |
computeV(double mu,
double a,
double ecc,
double i,
double omega,
double w,
double nu)
Compute the velocity vector for the given orbit elements. |
double |
computeW(Vector e,
Vector n)
Compute the argument of periapsis. |
static OrbitMechanic |
getInstance()
Return the singleton instance. |
boolean |
isCircularOrbit(double ecc)
Return true if the given eccentricity indicates a circular orbit. |
boolean |
isEllipticOrbit(double ecc)
Return true if the given eccentricity indicates an elliptic orbit. |
boolean |
isHyperbolicOrbit(double ecc)
Return true if the given eccentricity indicates a hyperbolic orbit. |
boolean |
isParabolicOrbit(double ecc)
Return true if the given eccentricity indicates a parabolic orbit. |
protected double |
quadrantCheck(double angle,
double factor)
Perform a quadrant check on the given angle. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static OrbitMechanic getInstance()
public Vector computeE(double mu, Vector r, Vector v)
mu
- Gravitational parameter of central body. (km^3 sec^-2)r
- Position vector. (km)v
- Velocity vector. (km/sec)public double computeEcc(double mu, Vector r, Vector v)
mu
- Gravitational parameter of central body. (km^3 sec^-2)r
- Position vector. (km)v
- Velocity vector. (km/sec)public double computeEccentricAnomalyFromEccM(double ecc, double meanAnomaly)
ecc
- Eccentricity.meanAnomaly
- Mean anomaly. (radians)public double computeEccentricAnomalyFromEccM(double ecc, double meanAnomaly, double delta)
ecc
- Eccentricity.meanAnomaly
- Mean anomaly. (radians)delta
- Allowable error in mean anomaly.public double computeEccentricAnomalyFromEccNu(double ecc, double trueAnomaly)
ecc
- Eccentricity.trueAnomaly
- True anomaly. (radians)public Vector computeH(Vector r, Vector v)
r
- Position vector. (km)v
- Velocity vector. (km/sec)public double computeMeanAnomalyFromEccE(double ecc, double eccentricAnomaly)
ecc
- Eccentricity.public double computeMeanAnomalyFromT(double mu, double a, double m0, double t, double t0)
mu
- Gravitational parameter of central body. (km^3 sec^-2)public double computeMeanMotion(double mu, double a)
mu
- Gravitational parameter of central body. (km^3 sec^-2)a
- public Vector computeN(Vector h)
h
- Angular momentum vector.public double computeOmega(Vector n)
public double computePeriod(double mu, double a)
mu
- Gravitational parameter of central body. (km^3 sec^-2)a
- Semi-major axis. (km)
public Vector computeR(double mu, double a, double ecc, double i, double omega, double w, double nu)
mu
- Gravitational parameter of central body. (km^3 sec^-2)a
- Semi-major axis. (km)ecc
- Eccentricity.i
- Inclination. (radians)omega
- Longitude of the ascending node. (radians)w
- Argument of periapsis. (radians)nu
- True anomaly at epoch. (radians)public Vector[] computeRAndV(double mu, double a, double ecc, double i, double omega, double w, double nu)
mu
- Gravitational parameter of central body. (km^3 sec^-2)a
- Semi-major axis. (km)ecc
- Eccentricity.i
- Inclination. (radians)omega
- Longitude of the ascending node. (radians)w
- Argument of periapsis. (radians)nu
- True anomaly at epoch. (radians)public double computeSemiLatusRectum(double a, double ecc)
ecc
- Eccentricity.public double computeSemiMajorAxis(double p, double ecc)
p
- Semi-latus rectum. (km)ecc
- Eccentricity.public double computeT(double mu, double a, double meanAnomaly, double meanAnomaly0, double t0)
mu
- Gravitational parameter of central body. (km^3
sec^-2)a
- Semi-major axis. (km)meanAnomaly
- Mean anomaly at desired time. (radians)meanAnomaly0
- Mean anomaly at t0. (radians)t0
- Time of epoch. (sec)public double computeTimeOfPeriapsisPassage(double mu, double a, double ecc, double meanAnomaly0, double t0)
mu
- Gravitational parameter of central body. (km^3
sec^-2)a
- Semi-major axis. (km)meanAnomaly0
- Mean anomaly at t0. (radians)t0
- Time of epoch. (sec)public double computeTrueAnomaly(double ecc, double eccentricAnomaly)
ecc
- Eccentricity.eccentricAnomaly
- Eccentric anomaly at time of interest.
(radians)public double computeTrueAnomaly(Vector e, Vector n, Vector r, Vector v)
e
- Eccentricity vector.n
- Normal vector.r
- Position vector. (km)v
- Velocity vector. (km/sec)public Vector computeV(double mu, double a, double ecc, double i, double omega, double w, double nu)
mu
- Gravitational parameter of central body. (km^3 sec^-2)a
- Semi-major axis. (km)ecc
- Eccentricity.i
- Inclination. (radians)omega
- Longitude of the ascending node. (radians)w
- Argument of periapsis. (radians)nu
- True anomaly at epoch. (radians)public double computeW(Vector e, Vector n)
e
- Eccentricity vector.n
- Normal vector.public boolean isCircularOrbit(double ecc)
ecc
- Eccentricity.public boolean isEllipticOrbit(double ecc)
ecc
- Eccentricity.public boolean isHyperbolicOrbit(double ecc)
ecc
- Eccentricity.public boolean isParabolicOrbit(double ecc)
ecc
- Eccentricity.protected double acos(double numerator, double denominator)
protected double checkAngleBounds(double angle)
angle
- Angle. (radians)protected double quadrantCheck(double angle, double factor)
angle
- Angle.factor
- Factor which determines if the angle should be less than
PI radians.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2007 Vizzini.org. All Rights Reserved. | 2007.12.25.03.00.02 |