C+ C NAME: C ECLIPTIC_EQUATOR C PURPOSE: C Converts ecliptic coordinates into equatorial coordinates or v.v. C CATEGORY: C Math: coordinate transformation C CALLING SEQUENCE: subroutine ECLIPTIC_EQUATOR(ID,iYr,Doy,PHI,RLAT) C CALLS: C Julian, rotate C INPUTS: C ID integer ID=0: ecliptic ---> equatorial C ID=1: equatorial ---> ecliptic C iYr integer year of current date C Doy real day of year, including a fraction for the time of day C PHI real ecliptic longitude for equinox of current date C RLAT real ecliptic latitude for equinox of current date C OUTPUTS: C PHI real right ascension C RLAT real declination C PROCEDURE: C See O. Montenbruck, Practical Ephemeris Calculations, p. 11 C If ID not equal 0 or 1 then ID = 0 is assumed. C MODIFICATION HISTORY: C Paul Hick (MPAE,UCSD/CASS; pphick@ucsd.edu) C- integer ID integer iYr real Doy real PHI real RLAT double precision EPS double precision JD double precision JEpoch call Julian(0,iYr,Doy,JD,JEpoch) !Get date in Julian years EPS = 23.439291d0-0.00013004d0*(JEpoch-2000.0d0) !Angle (ecliptic-equator) BETA = EPS ! .. to equatorial coord if (ID .eq. 1) BETA = -BETA ! .. to ecliptic coord call rotate(90.0,BETA,-90.0,PHI,RLAT) return end