|
mhuss utils 1.1.5ws | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.mhuss.AstroLib.LunarCalc
public class LunarCalc
LunarCalc is a class that does lunar calculations that do not directly depend on the lunar fundamentals (although some do need to call functions in Lunar).
The code in this class also uses other classes outside of Lunar (and some of these classes in turn use Lunar), so these functions are in a separate class, to avoid circular dependencies.
Based in part on C code by Bill Gray (www.projectpluto.com)
Field Summary | |
---|---|
static double |
SYNODIC_MONTH
Exact number of days from one new moon to the next new moon. |
Constructor Summary | |
---|---|
LunarCalc()
|
Method Summary | |
---|---|
static double |
ageOfMoonInDays()
Calculate the present age of the moon in days. |
static double |
ageOfMoonInDays(double jd)
Calculate the age of the moon in days for the given Julian day. |
static double |
ageOfMoonInDays(java.util.GregorianCalendar cal)
Calculate the age of the moon in days for the given Calendar instance. |
static int |
lunation()
Calculate the lunation at the present time. |
static int |
lunation(java.util.GregorianCalendar cal)
Calculate the lunation for specified GregorianCalendar instance. |
static int |
lunation(long jd)
Calculate the lunation for specified Julian day. |
static void |
main(java.lang.String[] args)
(for unit testing only) |
static double |
quarterChange(double jd,
ObsInfo loc)
Calculate the relatively exact time of the lunar quarter change (NM, 1Q, FM, or 3Q). |
static java.lang.String |
summary(ObsInfo oi)
Build a current lunar information summary String. |
static java.lang.String |
summaryPHL()
Build a current lunar information summary String for Phila, PA, USA (a shameless convenience function for dvaa.org). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final double SYNODIC_MONTH
Constructor Detail |
---|
public LunarCalc()
Method Detail |
---|
public static double ageOfMoonInDays(double jd)
jd
- - Julian day for which lunar age is required
public static double ageOfMoonInDays(java.util.GregorianCalendar cal)
cal
- - java.util.GregorianCalendar holding date for
which lunar age is required
public static double ageOfMoonInDays()
public static int lunation(long jd)
A "lunation" is E. W. Brown's numbered series of lunar cycles. Lunation 1 was on January 16, 1923.
jd
- Julian day
public static int lunation(java.util.GregorianCalendar cal)
A "lunation" is E. W. Brown's numbered series of lunar cycles. Lunation 1 was on January 16, 1923.
cal
- java.util.GregorianCalendar to use
public static int lunation()
A "lunation" is E. W. Brown's numbered series of lunar cycles. Lunation 1 was on January 16, 1923.
public static java.lang.String summary(ObsInfo oi)
The summary contains the lunation, age in days, rise, and set times.
oi
- - The observer's location
public static java.lang.String summaryPHL()
The default summary contains the lunation, age in days, rise, and set times for Philadelphia, PA, USA as the observer's location.
public static double quarterChange(double jd, ObsInfo loc)
Input must be less than one day before the exact change
jd
- Approximate Julian day number of changeloc
- Observer location
public static void main(java.lang.String[] args)
|
mhuss utils 1.1.5ws | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |