mhuss AstroLib 1.1.4a

com.mhuss.AstroLib
Class PlanetData

java.lang.Object
  |
  +--com.mhuss.AstroLib.PlanetData

public class PlanetData
extends java.lang.Object

This class handles planetary motion calculations and conversions.


Constructor Summary
PlanetData()
          Default constructor.
PlanetData(int planet, double jd, ObsInfo oi)
          Explicit (all parameters) constructor.
 
Method Summary
 void calc(int planet, double jd, ObsInfo oi)
          Calculate the data for a given planet, julian day, and location.
 double calcLon(int planet, double jd, ObsInfo oi)
          This calculates all LocationElements, then returns the longitude.
 double getAltAzLat()
          Get the Alt-Az latitude.
 double getAltAzLon()
          Get the Alt-Az longitude.
 double getAltAzRadius()
          Get the Alt-Az radius.
 double getDeclination()
          Get the declination.
 double getEclipticLat()
          Get the ecliptic latitude.
 double getEclipticLon()
          Get the ecliptic longitude.
 double getEclipticRadius()
          Get the ecliptic radius.
 double getEquatorialLat()
          Get the equatorial latitude.
 double getEquatorialLon()
          Get the equatorial longitude.
 double getEquatorialRadius()
          Get the equatorial radius.
 double getHeliocentricLat()
          Get the heliocentric latitude.
 double getHeliocentricLon()
          Get the heliocentric longitude.
 double getHeliocentricRadius()
          Get the heliocentric radius.
 double getRightAscension()
          Get the right ascension.
 double hourAngle()
          Get the hour angle.
 double jd()
          Get the Julian day number.
 int planet()
          Get the Planets number.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PlanetData

public PlanetData()
Default constructor.


PlanetData

public PlanetData(int planet,
                  double jd,
                  ObsInfo oi)
Explicit (all parameters) constructor.

Parameters:
planet - Planet number (from Planets class)
jd - Julian day number
oi - Observer location
Method Detail

calcLon

public double calcLon(int planet,
                      double jd,
                      ObsInfo oi)
This calculates all LocationElements, then returns the longitude.
Longitude is split out because it gets used most often.

Parameters:
planet - Planet number (from Planets class)
jd - Julian day number
oi - Observer location

calc

public void calc(int planet,
                 double jd,
                 ObsInfo oi)
Calculate the data for a given planet, julian day, and location.
This function must be called (directly or via constructor) before calling any of the other functions in this class.

Parameters:
planet - Planet number (from Planets class)
jd - Julian day number
oi - Observer location

planet

public int planet()
Get the Planets number. Example: Planets.MERCURY


jd

public double jd()
          throws NoInitException
Get the Julian day number.

NoInitException

hourAngle

public double hourAngle()
                 throws NoInitException
Get the hour angle.

NoInitException

getHeliocentricLat

public double getHeliocentricLat()
                          throws NoInitException
Get the heliocentric latitude.

NoInitException

getHeliocentricLon

public double getHeliocentricLon()
                          throws NoInitException
Get the heliocentric longitude.

NoInitException

getHeliocentricRadius

public double getHeliocentricRadius()
                             throws NoInitException
Get the heliocentric radius.

NoInitException

getEclipticLat

public double getEclipticLat()
                      throws NoInitException
Get the ecliptic latitude.

NoInitException

getEclipticLon

public double getEclipticLon()
                      throws NoInitException
Get the ecliptic longitude.

NoInitException

getEclipticRadius

public double getEclipticRadius()
                         throws NoInitException
Get the ecliptic radius.

NoInitException

getEquatorialLat

public double getEquatorialLat()
                        throws NoInitException
Get the equatorial latitude.

NoInitException

getEquatorialLon

public double getEquatorialLon()
                        throws NoInitException
Get the equatorial longitude.

NoInitException

getEquatorialRadius

public double getEquatorialRadius()
                           throws NoInitException
Get the equatorial radius.

NoInitException

getAltAzLat

public double getAltAzLat()
                   throws NoInitException
Get the Alt-Az latitude.

NoInitException

getAltAzLon

public double getAltAzLon()
                   throws NoInitException
Get the Alt-Az longitude.

NoInitException

getAltAzRadius

public double getAltAzRadius()
                      throws NoInitException
Get the Alt-Az radius.

NoInitException

getRightAscension

public double getRightAscension()
                         throws NoInitException
Get the right ascension.

NoInitException

getDeclination

public double getDeclination()
                      throws NoInitException
Get the declination.

NoInitException

mhuss AstroLib 1.1.4a

bottom text