|
mhuss AstroLib 1.1.4a | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--com.mhuss.AstroLib.Lunar
A class that can calculate lunar fundmentals for any reasonable time.
Based on C code by Bill Gray (www.projectpluto.com)
This class calculates Lunar fundamentals, and also contains some functions which depend on these fundimentals, including latitude, longitude & distance, phase angle and illuminated fraction.
The lunar fundamentals must be calculated before calling most of the functions in this class.
| Field Summary | |
static int |
FULL
phase constant |
static int |
NEW
phase constant |
static int |
Q1
phase constant |
static int |
Q3
phase constant |
| Constructor Summary | |
Lunar()
Default constructor |
|
Lunar(double t)
Date/time constructor. |
|
| Method Summary | |
void |
calcAllLEs(LocationElements locs,
double t)
Calculate the fundamentals and then all three location elements for the given time. |
void |
calcFundamentals(double t)
Calculates the lunar fundamanentals for a given time. |
double |
getLatitude()
Calculate the latitude in degrees. |
double |
getLatitudeRadians()
Calculate the lunar latitude in radians. |
double |
getLongitude()
Calculate the lunar longitude in degrees. |
double |
getLongitudeRadians()
Calculate the lunar longitude in radians. |
static double |
getPhase(long jd,
int quarter)
Calculate the time of the quarter nearest the given Julian day. |
static double |
getPhase(long jd,
int quarter,
java.util.Calendar cal)
Calculate the time of the quarter nearest the given Julian day. |
double |
getRadius()
Calculate the lunar radius (distance). |
double |
illuminatedFraction()
Calculate the illuminated fraction. |
static void |
main(java.lang.String[] args)
(for unit testing only) |
double |
phaseAngle()
Calculate the phase angle in radians. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int NEW
public static final int Q1
public static final int FULL
public static final int Q3
| Constructor Detail |
public Lunar()
public Lunar(double t)
t - Time in Julian centuries ref J2000| Method Detail |
public void calcFundamentals(double t)
t - Time in Julian centuries referenced to J2000
public double phaseAngle()
throws NoInitException
NOTE: The lunar fundamentals must be calculated before calling
this function or a NoInitException will
be thrown.
NoInitException
public double illuminatedFraction()
throws NoInitException
NOTE: The lunar fundamentals must be calculated before calling
this function or a NoInitException will
be thrown.
NoInitException
public static double getPhase(long jd,
int quarter,
java.util.Calendar cal)
jd - A Julian day close to the expected datequarter - (Lunar.NEW, Q1, FULL,
or Q3)cal - Calendar to use for time zone adjustment; if null no
time zone adjustment is performed
public static double getPhase(long jd,
int quarter)
jd - A Julian day close to the expected datequarter - (Lunar.NEW, Q1, FULL,
or Q3)
public double getLatitude()
throws NoInitException
NOTE: The lunar fundamentals must be calculated before calling
this function or a NoInitException will
be thrown.
NoInitException
public double getLatitudeRadians()
throws NoInitException
NOTE: The lunar fundamentals must be calculated before calling
this function or a NoInitException will
be thrown.
NoInitException
public double getLongitude()
throws NoInitException
NOTE: The lunar fundamentals must be calculated before calling
this function or a NoInitException will
be thrown.
NoInitException
public double getLongitudeRadians()
throws NoInitException
NOTE: The lunar fundamentals must be calculated before calling
this function or a NoInitException will
be thrown.
NoInitException
public double getRadius()
throws NoInitException
NOTE: The lunar fundamentals must be calculated before calling
this function or a NoInitException will
be thrown.
NoInitException
public void calcAllLEs(LocationElements locs,
double t)
throws NoInitException
locs - Where the calculated LEs got - time in decimal centuries
NoInitExceptionpublic static void main(java.lang.String[] args)
|
mhuss AstroLib 1.1.4a | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||