(The JPL DE406, DE422, and DE430 ephemerides produce identical results in these tests, within about .0001° and a few hundredths of a second in time.)

At 2013 Feb 17 19:00:00 UTC, 40°N 100°W, 500 meters above the ellipsoid, the observed distance between the near limbs of the Moon and Sun is 89.3264. Apparent altitudes are Moon upper limb 16.3704, Sun lower limb 38.0062. Temperature is 35C, altimeter setting 29.5 inches Hg. According to IERS Bulletin B, UT1 - UTC = +.22 s.

The synthetic observation was created with JPL HORIZONS. At that position and time, it says the Moon's azimuth is 78.9143, unrefracted altitude 16.0750, and topocentric diameter 1786.064 seconds, hence semidiameter is .2481°.

The corresponding values for the Sun are 181.8867, 38.2579, and .2697.

Now apply refraction to the altitudes. (HORIZONS can generate refracted altitudes, but has no provision for nonstandard conditions, so we shall do it by hand.) At 500 m height and altimeter setting 29.5 inches Hg (999.0 mb), station pressure = 941.1 mb. Temperature 35C. Add semidiameter and altitude of the Moon center to obtain 16.3231 for the unrefracted altitude of the upper limb. Refraction (Bennett formula with additional correction per Jean Meeus, "Astronomical Algorithms"), adjusted for temperature and pressure, adds .0474, for a total of 16.3704. For the Sun, subtract semidiameter from the altitude of the center, then apply refraction (.0180) to obtain refracted lower limb altitude 38.0062.

Also calculate the coordinates of the body centers. Moon refraction = .0481°. Sun refraction = .0178. Hence the refracted coordinates of the body centers are Moon (78.9143, 16.1231) and Sun (181.8867, 38.2757). Refracted separation angle, center to center, is 89.8438°.

Refracted position angle of Sun with respect to Moon is 310.1°. From Sun to Moon, 69.4.

Calculate the refracted semidiameter of the Moon at the position angle of
the Sun. HORIZONS says the Moon's topocentric *unrefracted diameter* is
1786.064 seconds, hence semidiameter is .2481°. Create a vector to (position
angle, -90° + semidiameter). In this case the vector is (310.1°, -90° +
.2481). Y-rotate the coordinate system by 90° + the unrefracted altitude of
the Moon center (16.0750) to obtain (-.1976, 16.2347).

Apply refraction (.0476) to that vector. Result (-.1976, 16.2823) is the refracted point on the limb that is on the great circle between the centers of the Moon and the Sun. Create a second vector to (0, refracted altitude of center), or in this case, (0, 16.1231), to represent the Moon center. The separation angle between the vectors is the refracted Moon semidiameter in the direction of the Sun: .2477°.

Compute the Sun's refracted semidiameter in the same way. Its topocentric unrefracted diameter is given by HORIZONS as 1942.037. Following the above procedure yields the refracted semidiameter in the direction of the Moon: .2696.

From the values calculated above, the near limb to near limb refracted lunar distance = 89.8438° - .2477°- .2696 = 89.3264.

Enter that lunar distance, as well as Moon upper limb altitude (16.3704) and Sun lower limb altitude (38.0062) already calculated into Lunar4. Set the correct position and atmosphere conditions (50% humidity) in the topocenter window. Set the correct time (UT1-UTC = .22 s) in the time window. Select "solve for time" in the main window.

In the pre-solution results, the Sun altitude residual (intercept) is
-0.0003° and the Moon altitude residual is -0.0008°. The lunar distance
residual (observed - calculated) is 0.0006°. The Lunar4 calculated azimuth and
*unrefracted* altitude for both bodies are within .0001 of HORIZONS, so
the nonzero residuals are due to differences in the refraction models.

The post-solution residuals (in altitude and lunar distance) are no greater than .0001, which was the requested accuracy. The solution is 19:00:05 UTC at +40.0003° -100.0201°, compared to the correct 19:00 UTC at N40 W100. This solution required only one iteration because the correct values were used as the initial estimates. For a more challenging problem, add one hour to time and 10 degrees to latitude and longitude. Then the result is identical but the program requires four iterations to reduce the residuals to .0001.

Lunar4 always displays a position fix when it solves a classic lunar (one in which the altitudes of both bodies are observed). It is a byproduct of the lunar distance algorithm. However, since the solution for time is relatively insensitive to the altitudes (regardless of the algorithm), they are not necessarily observed with great care. Also, the bodies may not be well placed in azimuth for a good position fix. Keep these factors in mind and do not simply believe the fix at the displayed accuracy.

At 2013 Feb 18 02:00:00.0 UTC, 40°N 100°W, 0 feet above the ellipsoid, a distance of 52.37040 from the Moon far limb to Pollux is observed. Temperature is 32 F, altimeter setting 30.5 inches Hg. Refracted altitudes are 63.75504 for the lower limb of the Moon, 56.34529 for Pollux.

The synthetic observation was created with the USNO MICA 2.0 program. At that time, IERS Bulletin B says UT1 - UTC = +.22s, hence the observation is at 02:00:00.22 UT1. Correct delta T = 32.184 + 35 - .22 = 66.964 s, but the MICA delta T is 2.116 s greater. The discrepancy must be subtracted from UT1 so MICA computes with the correct TT. The adjusted UT1, 01:59:58.10, puts the observer 2.116 s = 31.83 arcsec too far west. Therefore, adjust longitude to 99 59 28.2W. (Input precision of MICA is 0.1 second of time and arc.)

With the above UT1 and position, MICA says Moon azimuth = 222.42525, unrefracted altitude = 63.99683, and topocentric semidiameter = .25023. Pollux coordinates are (98.89308, 56.33381).

Apply refraction. Air pressure is 1032.8 mb and temperature 0 C. Subtract Moon semidiameter from altitude of center to get unrefracted altitude of lower limb, 63.74660. Add .00844 refraction, obtain 63.75504 for the refracted altitude of the lower limb. Refraction at the center of the Moon is .00835. The refracted center of the Moon is (222.42525, 64.00518).

Pollux has zero semidiameter, so we need only compute refraction of the body itself: .01148. Its refracted coordinates are (98.89308, 56.34529).

Refracted distance from Moon center to Pollux is 52.12025.

Calculate the refracted semidiameter of the Moon. The position angle from the Moon to Pollux is 35.8. However, the direction of sunlight is such that the far limb is used for the lunar distance observation, so the position angle of the observed point on the limb = 35.8 + 180 = 215.8. Create a vector to (215.8, -90 + unrefracted SD). Y-rotate the coordinate system 90 + Moon center unrefracted altitude. Result is (-.33164, 63.79356). Apply refraction (.00842) to that point to obtain (-.33164, 63.80198), which represents the refracted vector to the limb point. Create a second vector to (0, refracted altitude of center), or in this case, (0, 64.00518), to represent the Moon center. The separation angle between the vectors is the refracted semidiameter, .25014, which is .00009 less than the unrefracted SD.

The refracted lunar distance from the far limb to Pollux is 52.37040 (the refracted distance from the center, plus refracted semidiameter).

Starting with initial time and position one hour late and 10 degrees south and west of the correct values, Lunar4 produces a solution 0.48 second after the correct time.

I attribute the higher accuracy (compared to the Sun lunar) to the higher altitude of the Moon: 64° vs 16°. To increase realism, the synthetic observations were created with a different refraction model (the Bennett formula) than the one in Lunar4. Naturally, the higher the altitude the smaller the discrepancy between the models.

With the synthetic Pollux lunar we can test the determination of time at a known location from a lunar distance only. The error is +0.732 second if the accuracy setting is .00001° and the initial time estimate is one hour late. The program iterates three times.

We can solve a classic time sight with either altitude observation from the Pollux lunar . With the initial time one hour in error, from Pollux we get 02:00:00.024 UTC (+0.024 s error) and from the Moon, 02:00:00.000 UTC (perfect) with .00001° accuracy setting. To achieve this accuracy, Lunar4 iterates three or four times, respectively.

In The American Ephemeris and Nautical Almanac for the Year 1855 is a non-rigorous but precise lunar distance method, Chauvenet's Tables for Correcting Lunar Distances. However, my program has a 32 second discrepancy with respect to Chauvenet's Sun lunar example. It's mainly the ephemerides. The apparent geocentric lunar distances from the Almanac and the JPL DE406 ephemeris differ by 18 arc seconds, equivalent to 40 seconds of time.

For a better test, we should re-compute his Sun lunar with modern tools. From the JPL HORIZONS online calculator, here are the unrefracted azimuths and altitudes at 1855 September 7 08:09:01 UT1. Delta T = 7.48 seconds. Position N 35.5 W 30:

Target body name: Sun (10) {source: DE431mx} Center geodetic : 330.000000,35.5000000,-1.06E-12 {E-lon(deg),Lat(deg),Alt(km)} Date__(UT)__HR:MN:SC.fff Azi_(a-appr)_Elev Ang-diam TDB-UT ********************************************************************* 1855-Sep-07 08:09:01.000 *m 86.4713 5.8443 1905.482 7.477318 1855-Sep-07 08:09:02.000 *m 86.4737 5.8477 1905.482 7.477318 Target body name: Moon (301) {source: DE431mx} Center geodetic : 330.000000,35.5000000,-1.06E-12 {E-lon(deg),Lat(deg),Alt(km)} Date__(UT)__HR:MN:SC.fff Azi_(a-appr)_Elev Ang-diam TDB-UT ********************************************************************* 1855-Sep-07 08:09:01.000 *m 92.4261 50.0645 1795.520 7.477318 1855-Sep-07 08:09:02.000 *m 92.4286 50.0678 1795.521 7.477318

I shall construct a synthetic observation with height of eye 20 feet (6.1 m), temperature 75 F (23.9 C), and station pressure 29.1 inches Hg (985.4 mb).

Apply refraction with the Bennett formula, which yields refraction as a
function of *refracted* altitude. Therefore, iteration is necessary to
obtain refraction from unrefracted altitude.

Azimuth and refracted altitude:

86.4713° 5.97638° Sun 92.4261° 50.07720° Moon

Refraction also affects semidiameter, which decreases in every direction. The amount depends on position angle on the limb. From the refracted azimuths and altitudes, calculate the position angle from each body to the other. The angle is zero toward the zenith, and increases counterclockwise. I.e., in this case the Moon is almost directly above the Sun (a little to the right).

355 Sun to Moon 172 Moon to Sun

Divide angular diameter (arc seconds) from HORIZONS by 7200 to obtain unrefracted semidiameter in degrees:

0.26465 Sun 0.24938 Moon

William Chauvenet ("A Manual of Spherical and Practical Astronomy," 1863) gives a close approximation of the refracted semidiameter of a body at a given position angle. Begin with the Sun. The refracted altitude of its upper limb (upper, because that limb is nearest the point where lunar distance is measured) is the unrefracted altitude (5.8443 + 0.26465) plus refraction, or 6.23635. Subtract refracted altitude of the center (already computed: 5.97638). The difference is the refracted semidiameter to the upper limb: .25997. Subtract that from the unrefracted semidiameter to obtain the contraction due to refraction:.00468. Multiply by the squared cosine of the position angle to the other body (.9924) to obtain the contraction in that direction: .00464. Subtract contraction from unrefracted semidiameter to get the Sun semidiameter in the direction of the Moon: .26000.

With the same procedure, compute the refracted semidiameter of the Moon in the direction of the Sun: .24927°. We also need refracted lower limb semidiameters of both bodies in order to properly simulate the observed altitudes. I get .25964 for the Sun and .24927 for the Moon.

From the azimuth and refracted altitude of both bodies (already computed),
compute separation angle 44.38365. That's center to center. Subtract Sun
semidiameter in the direction of the Moon ( .26000) and Moon semidiameter in
the direction of the Sun (.24927) to obtain the **calculated lunar
distance, near limb to near limb: 43.87438**.

From the refracted altitudes of both bodies, subtract semidiameters at
position angle 180 to obtain Sun lower limb refacted altitude 5.71674 and Moon
lower limb altitude 49.82793. Add a correction for dip at 20 feet from the
Nautical Almanac formula: .07234. Therefore the **calculated lower limb
altitudes above the sea horizon are Sun 5.78908, Moon 49.90027**.

With the lunar distance and altitudes above, and the DE406 ephemeris,
**Lunar4 says the solution is 08:09:10 UT1, 9 seconds later than the
correct time**. It's difficult to precisely match the time of the
synthetic observation due to the low Sun altitude. Normally you wouldn't shoot
such a lunar because the solution is so sensitive to refraction. Note the
non-standard temperature and pressure. And, the Moon is almost exactly above
the Sun, so any error in the refraction correction has practically direct
effect on the lunar distance. I believe Chauvenet contrived this situation to
make his method look good compared to simpler ones.

In addition the preceding Sun lunar, Chauvenet includes a lunar example with Fomalhaut. Here is a re-computation of his synthetic observation with the USNO MICA program (version 2.2.2) and the Bennett refraction formula.

1855 Aug 30 05:42:02 UT1 (delta T = 7.277) at 55°20′ S 120°25′ W.

Height of eye 18 feet (5.5 meters), station pressure 31 inches Hg (1049.8 mb), temperature 20 F (-6.7 C).

71.80929 6.64596 6.78666 Moon az, unref alt, ref alt

64.63577 52.63480 52.64853 Fomalhaut az, unref alt, ref alt

6° Moon to Fomalhaut refracted position angle.

.27389 Moon unrefracted SD.

.26893 Moon to Fomalhaut SD at PA 186° (not 6° because lunar distance is measured from the far limb).

.26888 Moon to LL refracted SD.

46.36356 unrefracted separation angle, Moon center to Fomalhaut.

46.23716 refracted separation angle.

**46.50609 refracted distance, far limb to Fomalhaut.**

6.51778 Moon refracted LL altitude. Add dip correction .06871 from Almanac.

**6.58649 Moon LL altitude, with dip.**

**52.71724 Fomalhaut altitude, with dip.**

With that data, Lunar4 (with the DE406 ephemeris) converges on this solution
to .0001° precision: **05:41:51 , or 11 seconds before the time of the
synthetic observation**, a similar magnitude to the error to the
previous Sun lunar. My comments there about high sensitivity to refraction and
the non-standard air density apply to this example too.

In both 19th century examples the low body is at almost the same altitude. Lunar distance is decreasing in one, increasing in the other. Thus, the opposite signs in the time errors really imply the same refraction discrepancy between my software and Bennett formula in the synthetic observations. I used that formula to make the synthetic observations as independent as possible of my software, which does not use Bennett.

- Moon geocentric ecliptic latitude and longitude, right ascension, declination, true distance, horizontal parallax, and semidiameter are all correct to 0.1″ precision at 2016 January 0 0 h TT. (Unless noted, all comparisons to the Almanac are at that time.)
- BCRS Earth position and velocity (rectangular coordinates) match Almanac section B to the last digit.
- Mars apparent right ascension, declination, true geocentric distance are all perfect at the accuracy of The Astronomical Almanac section E.
- Sun apparent right ascension, declination, and true geocentric distance are all correct to 0.1″ precision with respect to The Astronomical Almanac section C.
- Moon right ascension, declination, and horizontal parallax in the example from The Astronomical Almanac Online lunar polynomials (PDF document) for 2016. All values are perfect at the accuracy of the example.
- Planetary reduction to geocentric apparent place, example in the 2016 Astronomical Almanac (page B68). Venus right ascension, declination, and geometric distance are correct within one digit in the last place of the Almanac values.
- Stellar reduction to apparent place, example in 2016 Almanac (page B73). Right ascension and declination errors are within 1 mas.
- Patrick Wallace, Example application of the IAU 2000 resolutions concerning Earth orientation and rotation. In this reduction to apparent place of a fictitious star, the topocentric horizontal unrefracted coordinates are less than 1 mas in error.

(last update 2016-09-10)