org.vizzini.math.orbit
Class AbstractOrbit

java.lang.Object
  extended by org.vizzini.math.orbit.AbstractOrbit
All Implemented Interfaces:
IOrbit
Direct Known Subclasses:
EllipticOrbit, HyperbolicOrbit, ParabolicOrbit

public abstract class AbstractOrbit
extends Object
implements IOrbit

Provides base functionality for an orbit.

N = kg m sec^-2
a = F / m => N kg^-1 = m sec^-2
So define a kilo-Newton = 1000 N
a = F / m => kN kg^-1 = km sec^-2

Since:
v0.3
Version:
v0.3
Author:
Jeffrey M. Thompson

Constructor Summary
protected AbstractOrbit(double mu, double a, double ecc, double i, double omega, double w, double nu0)
          Construct this object using the given parameters.
protected AbstractOrbit(double mu, double a, double ecc, double i, double omega, double w, double nu0, double t0)
          Construct this object using the given parameters.
protected AbstractOrbit(double mu, Vector r, Vector v)
          Construct this object using the given parameters.
protected AbstractOrbit(double mu, Vector r0, Vector v0, double t0)
          Construct this object using the given parameters.
 
Method Summary
 double getA()
          Return the semi-major axis.
 Vector getE()
          Return the eccentricity vector.
 double getEcc()
          Return the eccentricity.
 double getEccentricAnomaly(double t)
          Return the eccentric anomaly.
 double getEccentricAnomaly0()
          Return the eccentric anomaly at epoch.
 Vector getH()
          Return the angular momentum vector.
 double getI()
          Return the inclination.
 double getMeanAnomaly(double t)
          Return the mean anomaly.
 double getMeanAnomaly0()
          Return the mean anomaly at epoch.
 double getMu()
          Return the gravitational parameter of central body.
 Vector getN()
          Return the node vector.
 double getOmega()
          Return the longitude of the ascending node.
 double getPeriod()
          Return the orbital period.
 Vector getR(double t)
          Return the position vector.
 Vector getR0()
          Return the position vector at epoch.
 double getRa()
          Return the apoapsis radius.
 double getRp()
          Return the periapsis radius.
 double getT0()
          Return the time of epoch.
 double getTrueAnomaly(double t)
          Return the true anomaly.
 double getTrueAnomaly0()
          Return the true anomaly at epoch.
 Vector getV(double t)
          Return the velocity vector.
 Vector getV0()
          Return the velocity vector at epoch.
 double getVa()
          Return the apoapsis speed.
 double getVp()
          Return the periapsis speed.
 double getW()
          Return the argument of periapsis.
 boolean isVectorBased()
          Return true if this orbit is vector based.
protected  void setA(double a)
           
protected  void setEcc(double ecc)
           
protected  void setI(double i)
           
protected  void setMu(double mu)
           
protected  void setOmega(double omega)
           
protected  void setR0(Vector r0)
           
protected  void setT0(double t0)
           
protected  void setTrueAnomaly0(double nu0)
           
protected  void setV0(Vector v0)
           
protected  void setW(double w)
           
 String toString()
          Return a string representation of this object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractOrbit

protected AbstractOrbit(double mu,
                        Vector r,
                        Vector v)
Construct this object using the given parameters.

Parameters:
mu - Gravitational parameter of central body. (km^3 sec^-2)
r - Position vector. (km)
v - Velocity vector. (km/sec)
Since:
v0.3

AbstractOrbit

protected AbstractOrbit(double mu,
                        Vector r0,
                        Vector v0,
                        double t0)
Construct this object using the given parameters.

Parameters:
mu - Gravitational parameter of central body. (km^3 sec^-2)
r0 - Position vector at epoch. (km)
v0 - Velocity vector at epoch. (km/sec)
t0 - Epoch time of parameters. (sec)
Since:
v0.3

AbstractOrbit

protected AbstractOrbit(double mu,
                        double a,
                        double ecc,
                        double i,
                        double omega,
                        double w,
                        double nu0)
Construct this object using the given parameters.

Parameters:
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)
nu0 - True anomaly at epoch. (radians)
Since:
v0.3

AbstractOrbit

protected AbstractOrbit(double mu,
                        double a,
                        double ecc,
                        double i,
                        double omega,
                        double w,
                        double nu0,
                        double t0)
Construct this object using the given parameters.

Parameters:
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)
nu0 - True anomaly at epoch. (radians)
t0 - Epoch time of parameters. (sec)
Since:
v0.3
Method Detail

getA

public double getA()
Return the semi-major axis. (km)

Specified by:
getA in interface IOrbit
Since:
v0.3

getE

public Vector getE()
Return the eccentricity vector.

Specified by:
getE in interface IOrbit
Since:
v0.3

getEcc

public double getEcc()
Return the eccentricity.

Specified by:
getEcc in interface IOrbit
Since:
v0.3

getEccentricAnomaly

public double getEccentricAnomaly(double t)
Return the eccentric anomaly.

Specified by:
getEccentricAnomaly in interface IOrbit
Parameters:
t - Time of interest. (sec)
Since:
v0.3

getEccentricAnomaly0

public double getEccentricAnomaly0()
Return the eccentric anomaly at epoch. (radians)

Specified by:
getEccentricAnomaly0 in interface IOrbit
Since:
v0.3

getH

public Vector getH()
Return the angular momentum vector.

Specified by:
getH in interface IOrbit
Since:
v0.3

getI

public double getI()
Return the inclination. (radians)

Specified by:
getI in interface IOrbit
Since:
v0.3

getMeanAnomaly

public double getMeanAnomaly(double t)
Return the mean anomaly. (radians)

Specified by:
getMeanAnomaly in interface IOrbit
Parameters:
t - Time of interest. (sec)
Since:
v0.3

getMeanAnomaly0

public double getMeanAnomaly0()
Return the mean anomaly at epoch. (radians)

Specified by:
getMeanAnomaly0 in interface IOrbit
Since:
v0.3

getMu

public double getMu()
Return the gravitational parameter of central body. (km^3 sec^-2)

Specified by:
getMu in interface IOrbit
Since:
v0.3

getN

public Vector getN()
Return the node vector.

Specified by:
getN in interface IOrbit
Since:
v0.3

getOmega

public double getOmega()
Return the longitude of the ascending node. (radians)

Specified by:
getOmega in interface IOrbit
Since:
v0.3

getPeriod

public double getPeriod()
Return the orbital period. (sec)

Specified by:
getPeriod in interface IOrbit
Since:
v0.3

getR

public Vector getR(double t)
Return the position vector. (km)

Specified by:
getR in interface IOrbit
Parameters:
t - Time of interest. (sec)
Since:
v0.3

getR0

public Vector getR0()
Return the position vector at epoch. (km)

Specified by:
getR0 in interface IOrbit
Since:
v0.3

getRa

public double getRa()
Return the apoapsis radius. (km)

Specified by:
getRa in interface IOrbit
Since:
v0.3

getRp

public double getRp()
Return the periapsis radius. (km)

Specified by:
getRp in interface IOrbit
Since:
v0.3

getT0

public double getT0()
Return the time of epoch. (sec)

Specified by:
getT0 in interface IOrbit
Since:
v0.3

getTrueAnomaly

public double getTrueAnomaly(double t)
Description copied from interface: IOrbit
Return the true anomaly. (radians)

Specified by:
getTrueAnomaly in interface IOrbit
Parameters:
t - Time of interest. (sec)
Returns:
Return nu0. (radians)
Since:
v0.3

getTrueAnomaly0

public double getTrueAnomaly0()
Description copied from interface: IOrbit
Return the true anomaly at epoch. (radians)

Specified by:
getTrueAnomaly0 in interface IOrbit
Returns:
Return true anomaly at epoch. (radians)
Since:
v0.3

getV

public Vector getV(double t)
Return the velocity vector. (km/sec)

Specified by:
getV in interface IOrbit
Parameters:
t - Time of interest. (sec)
Since:
v0.3

getV0

public Vector getV0()
Return the velocity vector at epoch. (km/sec)

Specified by:
getV0 in interface IOrbit
Since:
v0.3

getVa

public double getVa()
Return the apoapsis speed. (km/sec)

Specified by:
getVa in interface IOrbit
Since:
v0.3

getVp

public double getVp()
Return the periapsis speed. (km/sec)

Specified by:
getVp in interface IOrbit
Since:
v0.3

getW

public double getW()
Return the argument of periapsis. (radians)

Specified by:
getW in interface IOrbit
Since:
v0.3

isVectorBased

public boolean isVectorBased()
Return true if this orbit is vector based.

Specified by:
isVectorBased in interface IOrbit
Since:
v0.3

toString

public String toString()
Return a string representation of this object.

Overrides:
toString in class Object
Since:
v0.3

setA

protected void setA(double a)
Parameters:
a - The a to set. (km)
Since:
v0.3

setEcc

protected void setEcc(double ecc)
Parameters:
ecc - The ecc to set.
Since:
v0.3

setI

protected void setI(double i)
Parameters:
i - The i to set. (radians)
Since:
v0.3

setMu

protected void setMu(double mu)
Parameters:
mu - The mu to set. (km^3 sec^-2)
Since:
v0.3

setOmega

protected void setOmega(double omega)
Parameters:
omega - The omega to set. (radians)
Since:
v0.3

setR0

protected void setR0(Vector r0)
Parameters:
r0 - The r0 to set. (km)
Since:
v0.3

setT0

protected void setT0(double t0)
Parameters:
t0 - The t0 to set. (sec)
Since:
v0.3

setTrueAnomaly0

protected void setTrueAnomaly0(double nu0)
Parameters:
nu0 - The nu0 to set. (radians)
Since:
v0.3

setV0

protected void setV0(Vector v0)
Parameters:
v0 - The v0 to set. (km/sec)
Since:
v0.3

setW

protected void setW(double w)
Parameters:
w - The w to set. (radians)
Since:
v0.3


Copyright 2007 Vizzini.org. All Rights Reserved. 2007.12.25.03.00.02