atEphemeris
Ephemeris routines based on Jeff Munn's IRAF routines
DESCRIPTION:
Compute the phase of the moon (0.0 = new, 1.0 = full)
formula from Jean Meeus's Astronomical Formula for Calculators,
3rd Edition, pp. 155).
This routine was originally called illuminated_fraction
SIGNATURE:
double atMoonPhase(
double moon_long, /* Moon's ecliptic longitude (degrees) */
double moon_lat, /* Moon's ecliptic latitude (degrees) */
double sun_long) /* Sun's longitude (degrees) */
DESCRIPTION:
Returns the local time of rise or set for an object with the
specified ra and dec, at a site with the specified latitide and longitude
and time zone, for the given Julian epoch. Rising and setting are defined
with respect to the specified zenith distance. Returns -1 if object
doesn't rise or set (formula from Astronomical Formulae
for Calculators, 3rd edition, Jean Meeus, p. 47 and
Astronomical Almanac 1989, p. A12).
SIGNATURE:
double atRiseSet (
double ra, /* Right ascension (degrees) */
double dec, /* declination (degrees) */
double longitude, /* Earth west longitude (degrees) */
double latitude, /* Earth latitude (degrees) */
double epoch, /* Julian epoch */
int time_zone, /* Time zone */
double zd, /* Zenith distance defining rising and setting */
int which) /* Which phenomenom (RISE or SET) */
DESCRIPTION:
Returns the local time of rise or set for an object with the
specified ra and dec, at a site with the specified latitide and longitude
and time zone, for the given MJD. Rising and setting are defined
with respect to the specified zenith distance. Returns -1 if object
doesn't rise or set (formula from Astronomical Formulae
for Calculators, 3rd edition, Jean Meeus, p. 47 and
Astronomical Almanac 1989, p. A12). Default is to return time in
MJD at Greenwich for night of int(mjd given).
SIGNATURE:
double atMjdRiseSet (
double ra, /* Right ascension (degrees) */
double dec, /* declination (degrees) */
double longitude, /* Earth west longitude (degrees) */
double latitude, /* Earth latitude (degrees) */
double mjd, /* Modified Julian Date */
int time_zone, /* Time zone (always pos. */
double zd, /* Zenith distance defining rising and setting */
int which) /* Which phenomenom (RISE or SET) */
DESCRIPTION:
Returns the hour angle (in degrees) for the specified
declination, earth latitide, and zenith distance. Returns -1 if
no solution (object never reaches that hour angle).
Formula from Astronomical Formulae for Calculators, 3rd edition,
Jean Meeus, p. 47.
SIGNATURE:
double atHourAngle (
double zd, /* Zenith distance (degrees from pole) */
double dec, /* declination (degrees) */
double latitude) /* Earth latitude (degrees) */
DESCRIPTION:
atDateToEpoch -- Convert Gregorian date and solar mean time to
a Julian epoch. A Julian epoch has 365.25 days per year and 24
hours per day.
SIGNATURE:
void atDateToEpoch (
int year, /* Year */
int month, /* Month (1-12) */
int day, /* Day of month */
double ut, /* Universal time for date (mean solar day) */
double* epoch) /* Julian epoch */
DESCRIPTION:
Convert a Julian epoch to year, month, day, and time.
SIGNATURE:
void atEpochToDate (
double epoch, /* Julian epoch */
int* year, /* Year */
int* month, /* Month (1-12) */
int* day, /* Day of month */
double* ut) /* Universal time for date */
DESCRIPTION:
atDayOfYear -- The day number for the given year is returned.
SIGNATURE:
int atDayOfYear (
int year, /* Year */
int month, /* Month (1-12) */
int day) /* Day of month */
DESCRIPTION:
atJulday -- Convert epoch to Julian day.
SIGNATURE:
double atJulday (double epoch)
DESCRIPTION:
Mean sidereal time (hours) of the epoch at the given longitude.
This procedure may be used to optain Greenwich Mean Sidereal Time (GMST)
by setting the longitude to 0.
SIGNATURE:
double atMst (
double epoch, /* Epoch */
double longitude) /* Longitude in degrees */
DESCRIPTION: Return a time stamp of the next new moon
Start at the time given by beginTime and step by deltaHours.
The returned TSTAMP is the time of
the first minimum of the separation between the moon and Sun.
deltaHours defaults to 1 hour.
SIGNATURE:
TSTAMP *atNextNewMoon(
TSTAMP *beginTime,
float deltaHours
)
DESCRIPTION: Return a time stamp of the next full moon
Start at the time given by beginTime and step by deltaHours.
The returned TSTAMP is the time of
the first minimum of the separation between the moon and Sun.
deltaHours defaults to 1 hour.
SIGNATURE:
TSTAMP *atNextFullMoon(
TSTAMP *beginTime,
float deltaHours
)