|
|
|
|
|
|
|
These routines were prepared by using two separate theories. For the Moon, the ELP-2000/82 theory of Chapront was my primary reference. For the Sun, the VSOP87 theory of Bretagnon and Francou was my primary reference. Jean Meeus' Astronomical Formulae for Calculators (1979) and Astronomical Algorithms (1991) are highly recommended sources for quality control when attempting to convert theory to code. |
|
|
|
|
|
|
|
|
A relatively simple formula exists for calculating the mean lunar phase in terms of Julian Ephemeris Days (JDE), which is in terms of Dynamic Time. This formula sums the Julian Day number of the chosen epoch (the new moon on 6 January 2000), the lunation number, and three time terms involving elapsed time in Julian centuries since the epoch. The expression is simply a fourth-order function of time that predicts mean lunar phase and introduces some corrections to account for some known time-dependent variations. |
|
|
|
|
|
|
|
|
The flmoon () function, which is an example program in Numerical Recipes in C (second edition, 1992, pp. 12), is an abbreviated version of the general idea. The epoch of 1900 is used rather than 2000, so the values for the epoch and the coefficients used for the time equation are different from those used in this work. The phase corrections are much simpler in form. The function is introduced to illustrate the form of functions in that work, much as estimated_delivery_date () is used in this work. |
|
|
|
|
|
|
|
|
The lunation number is an integer which identifies the Nth lunation since the epoch. Negative values of N describe new moons before the epoch. |
|
|
|
|
|
|
|
|
Given the lunation number, the date of a desired lunar phase can be obtained by calculating the mean lunar phase and applying a series of corrections for major perturbations. |
|
|
|
|
|
|
|
|
The new_moon () function is defined in the test program DTLT_168.C, along with two utility functions, normalize_deg_angle () and deg_to_rad () for dealing with angles. The delta_t () function is defined to supply a measure of the difference between TD and UT, which must be applied to the result to obtain civil date and time. An additional function, estimate_lunation_number (), is supplied to provide an estimate of N from a given year and month. |
|
|
|
|
|
|
|
|
The test program DTLT_169.C tests new_moon () against published almanac values. |
|
|
|
|
|
|
|
|
The estimation of N for a given year and month involves certain difficulties, since solar years may contain 13 lunations. Hence, certain months may not contain a new moon, and certain months may contain two. This problem is addressed in test program DTLT_170.C. |
|
|
|
|
|
|
|
|
Test program DTLT_171.C tests full_moon () against published almanac values. The test program DTLT_172.C performs the same task for first_quarter (), and last_quarter () is tested in program DTLT_173.C. |
|
|
|
|
|