C+ C NAME: C jpl_eph C PURPOSE: C Read the JPL planetary ephemeris and gives position and velocity C of body 'ntarg' with respect to body 'ncent'. C CATEGORY: C gen/for/lib C CALLING SEQUENCE: logical function jpl_eph(jd,ntarg,ncent,rrd,bKm,bBary) C INPUTS: C jd double precision Ephemeris time specified as Julian day. C C For other input arguments (ntarg, ncent, bKm and bBary) C see href=jpl_eph2=. C OUTPUTS: C rrd(6) double precision position vector (see jpl_eph) C jpl_eph logical status indicator (see jpl_eph) C CALLS: C jpl_eph2 C EXAMPLE: C logical bOK C logical jpl_eph C double precision jd C double precision rrd(6) C C ncent = 3 ! Earth at origin C ntarg = 10 ! Moon C bOK = jpl_eph(jd,ntarg,ncent,rrd,.FALSE.,.FALSE.) C C ! The ephemeris fails only if the JPL ephemeris files are not C ! found (probably means environment variable $EPHEM is not defined), C ! or if the input jd is earlier than 1950 or later than 2050 (probably C ! means jd was calculated wrong). C C if ( .not. bOK ) stop 'bad ephemeris' C C ! Switch to single precision C C x = rrd(1) C y = rrd(2) C z = rrd(3) C C ! RA, dec in degrees C C ra = atan2d( y, x ) C dec = atan2d( z, sqrt( x*x+y*y ) ) C PROCEDURE: C See jpl_eph2 for full documentation. C jpl_eph is just a wrapper for jpl_eph2. C The only difference is in the first argument (the time). C MODIFICATION HISTORY: C- double precision jd integer ntarg integer ncent double precision rrd(6) logical bKm logical bBary double precision et(2) logical jpl_eph2 et(1) = jd et(2) = 0.0d0 jpl_eph = jpl_eph2(et,ntarg,ncent,rrd,bKm,bBary) return end