C+ C NAME: C Time2jpl_eph C PURPOSE: C Read the JPL planetary ephemeris and gives position and velocity of body NTARG C with respect to body NCENT C CATEGORY: C gen/for/lib C CALLING SEQUENCE: logical function Time2jpl_eph(tt,ntarg,ncent,rrd,bKm,bBary) C INPUTS: C tt(2) integer 2-element standard time C ntarg integer number of the body whose position and velocity are needed C ncent integer number of the body used as the origin C (see jpl_eph2 for numbering system) C bKm logical flag setting the units of the output (default: .FALSE.) C bKM = .TRUE. : KM and KM/SEC C = .FALSE.: AU and AU/DAY C bKM determines the time unit for nutations and librations C The angles are always in radians. C bBary logical flag defining the output center (default: .FALSE.) C (affects only the 9 planets) C bBary = .TRUE. : center is solar system barycenter C = .FALSE.: center is Sun C OUTPUTS: C rrd(6) double precision C Position (AU or km) and velocity (AU/day or km/s) of NTARG with C respect to NCENT C For librations the units are radians and radians/day C For nutations the first four will be set (units of radians and C radians/day). C Time2jpl_eph logical status indicator C will be .FALSE. if input time was outside range of ephemeris C file or if there was a read error. Otherwise .TRUE. C CALLS: C Time2Doy, Time2Delta, Time2JD, Time2Day8, jpl_eph2 C PROCEDURE: C Time2jpl_eph is just a wrapper for jpl_eph2. C The only difference is in the first argument (the time). C MODIFICATION HISTORY: C- integer tt(2) integer ntarg integer ncent double precision rrd(6) logical bKm logical bBary logical jpl_eph2 integer uu(2) integer vv(2) double precision et(2) call Time2YDoy(0,tt,iyr,vv) ! vv is doy vv(1) = 0 ! vv is fraction of day since previous midnight call Time2Delta(tt,vv,uu) ! uu is time of previous midnight call Time2JD (0,uu,uu) ! Convert uu to Julian days call Time2Day8(0,uu,et(1)) call Time2Day8(0,vv,et(2)) Time2jpl_eph = jpl_eph2(et,ntarg,ncent,rrd,bKm,bBary) return end