PLANET_COORDS
Name
PLANET_COORDS
Purpose
Find low or high precision RA and DEC for the planets given a date
Explanation
For low precision this routine uses HELIO to get the heliocentric ecliptic
coordinates of the planets at the given date, then converts these to
geocentric ecliptic coordinates ala "Astronomical Algorithms" by Jean
Meeus (1991, p 209). These are then converted to RA and Dec using EULER.
The accuracy between the years 1800 and 2050 is better than 1 arcminute
for the terrestial planets, but reaches 10 arcminutes for Saturn.
Before 1850 or after 2050 the accuracy can get much worse.
For high precision use the /JPL option ito use the full JPL ephemeris.
Calling Sequence
PLANET_COORDS, DATE, RA, DEC, [ PLANET = , /JD, /JPL]
Inputs
DATE - If /JD is not set, then date is a 3-6 element vector containing
year,month (1-12), day, and optionally hour, minute, & second.
If /JD is set then DATE is a Julian date. An advantage of the
/JD option is that it allows the use of vector dates.
Outputs
RA - right ascension of planet(s), J2000 degrees, double precision
DEC - declination of planet(s), J2000 degrees, double precision
Optional Input Keyword
PLANET - scalar string giving name of a planet, e.g. 'venus'. Default
is to compute coords for all of them (except Earth).
/JD - If set, then the date parameter should be supplied as Julian date
JPL - if /JPL set, then PLANET_COORDS will call the procedure
JPLEPHINTERP to compute positions using the full JPL ephemeris.
The JPL ephemeris FITS file JPLEPH.405 must exist in either the
current directory, or in the directory specified by the
environment variable ASTRO_DATA. Alternatively, the JPL keyword
can be set to the full path and name of the ephemeris file.
A copy of the JPL ephemeris FITS file JPLEPH.405 is available in
http://idlastro.gsfc.nasa.gov/ftp/data/
Examples
(1) Find the RA, Dec of Venus on 1992 Dec 20
IDL> planet_coords, [1992,12,20], ra,dec ;Compute for all planets
IDL> print,adstring(ra[1],dec[1],1) ;Venus is second planet
====> RA = 21 05 2.66 Dec = -18 51 45.7
This position is 37" from the full DE406 ephemeris position of
RA = 21 05 5.24 -18 51 43.1
(2) Return the current RA and Dec of all 8 planets using JPL ephemeris
IDL> get_juldate, jd ;Get current Julian Date
IDL> planet_coords,jd,ra,dec,/jd,/jpl ;Find positions of all planets
IDL> forprint,adstring(ra,dec,0) ;Display positions
(3) Plot the declination of Mars for every day in the year 2001
IDL> jdcnv,2001,1,1,0,jd ;Get Julian date of midnight on Jan 1
Now get Mars RA,Dec for 365 consecutive days
IDL> planet_coords,jd+indgen(365),ra,dec,/jd, planet = 'mars'
IDL> plot,indgen(365)+1,dec
Notes
HELIO is based on the two-body problem and neglects interactions
between the planets. This is why the worst results are for
Saturn. Use the /JPL option or the online ephemeris generator
http://ssd.jpl.nasa.gov/horizons.cgi for more accuracy.
The procedure returns astrometric coordinates, i.e. no correction
for aberration. A correction for light travel time is applied
when /JPL is set, but not for the default low-precision calculation.
Procedures Used
JULDATE
EULER, HELIO - if /JPL is not set
JPLEPHREAD, JPLEPHINTERP - if /JPL is set
Revision History
Written P.Plait & W. Landsman August 2000
Fixed Julian date conversion W. Landsman August 2000
Added /JPL keyword W. Landsman July 2001
Allow vector Julian dates with JPL ephemeris W. Landsman December 2002