MOONPOS
Name
MOONPOS
Purpose
To compute the RA and Dec of the Moon at specified Julian date(s).
Calling Sequence
MOONPOS, jd, ra, dec, dis, geolong, geolat, [/RADIAN ]
Inputs
JD - Julian ephemeris date, scalar or vector, double precision suggested
Outputs
Ra - Apparent right ascension of the moon in DEGREES, referred to the
true equator of the specified date(s)
Dec - The declination of the moon in DEGREES
Dis - The Earth-moon distance in kilometers (between the center of the
Earth and the center of the Moon).
Geolong - Apparent longitude of the moon in DEGREES, referred to the
ecliptic of the specified date(s)
Geolat - Apparent longitude of the moon in DEGREES, referred to the
ecliptic of the specified date(s)
The output variables will all have the same number of elements as the
input Julian date vector, JD. If JD is a scalar then the output
variables will be also.
Optional Input Keyword
/RADIAN - If this keyword is set and non-zero, then all output variables
are given in Radians rather than Degrees
Examples
(1) Find the position of the moon on April 12, 1992
IDL> jdcnv,1992,4,12,0,jd ;Get Julian date
IDL> moonpos, jd, ra ,dec ;Get RA and Dec of moon
IDL> print,adstring(ra,dec,1)
==> 08 58 45.23 +13 46 6.1
This is within 1" from the position given in the Astronomical Almanac
(2) Plot the Earth-moon distance for every day at 0 TD in July, 1996
IDL> jdcnv,1996,7,1,0,jd ;Get Julian date of July 1
IDL> moonpos,jd+dindgen(31), ra, dec, dis ;Position at all 31 days
IDL> plot,indgen(31),dis, /YNOZ
Method
Derived from the Chapront ELP2000/82 Lunar Theory (Chapront-Touze' and
Chapront, 1983, 124, 50), as described by Jean Meeus in Chapter 47 of
``Astronomical Algorithms'' (Willmann-Bell, Richmond), 2nd edition,
1998. Meeus quotes an approximate accuracy of 10" in longitude and
4" in latitude, but he does not give the time range for this accuracy.
Comparison of this IDL procedure with the example in ``Astronomical
Algorithms'' reveals a very small discrepancy (~1 km) in the distance
computation, but no difference in the position calculation.
This procedure underwent a major rewrite in June 1996, and the new
calling sequence is *incompatible with the old* (e.g. angles now
returned in degrees instead of radians).
Procedures Called
CIRRANGE, ISARRAY(), NUTATE, TEN() - from IDL Astronomy Library
POLY() - from IDL User's Library
Modification History
Written by Michael R. Greason, STX, 31 October 1988.
Major rewrite, new (incompatible) calling sequence, much improved
accuracy, W. Landsman Hughes STX June 1996
Added /RADIAN keyword W. Landsman August 1997
Converted to IDL V5.0 W. Landsman September 1997
Use improved expressions for L',D,M,M', and F given in 2nd edition of
Meeus (very slight change), W. Landsman November 2000
Avoid 32767 overflow W. Landsman January 2005