subroutine equecl_jd( jd, mode, equ, ecl ) ! ! Given a julian date (UT), and the position and velocity of an ! object in spherical coordinates in either the equatorial or ! ecliptic frame of reference, convert to the other frame. If ! mode is positive, convert from equatorial to ecliptic; if mode ! is negative, convert from ecliptic to equatorial. The elements ! of the 6-vectors equ and ecl are: ! ! i equ ecl ! ! 1 RA (rad, 0 to 2*pi) L (rad, 0 to 2*pi) ! 2 Dec (rad, -pi to +pi) B (rad, -pi to +pi) ! 3 R (AU) R (AU) ! 4 dRA/dt (rad/day) dL/dt (rad/day) ! 5 dDec/dt (rad/day) dB/dt (rad/day) ! 6 dR/dt (AU/day) dR/dt (AU/day) ! ! B. Knapp, 2002-08-30 ! C C RCS DATA C C $Header$ C C $Log$ C ! implicit none ! ! Input real*8 jd integer*4 mode ! ! Input/Output (one each) real*8 equ(6), ecl(6) ! ! External functions, subroutines real*8 ut2td, obliq external ut2td, obliq, equecl ! ! Local variables real*8 t, eps ! ! Get dynamic time (in Julian millenia since J2000) t = (ut2td(jd)-2451545.D0)/365250.D0 ! ! Get the obliquity of the ecliptic eps = obliq(t) ! ! Perform the requested transformation call equecl(eps, mode, equ, ecl) ! return end