; 1.1 Heliocentric Earth equatorial (HEEQ) ; ;This system has its Z axis parallel to the Sun's rotation axis (positive to the North) and its X axis towards the intersection of the solar equator and the solar central meridian as seen from the Earth. This system is sometimes known as heliocentric solar (HS). ;2. Systems based on the ecliptic ;2.1 Heliocentric Earth ecliptic (HEE) ; ;This system has its X axis towards the Earth and its Z axis perpendicular to the plane of the Earth's orbit around the Sun (positive North). This system is fixed with respect to the Earth-Sun line. ;2.2 Heliocentric Aries ecliptic (HAE) ; ;This system has its Z axis perpendicular to the plane of the Earth's orbit around the Sun (positive North) and its X axis towards the First Point of Aries (the direction in space defined by the intersection between the Earth's equatorial plane and the plane of its orbit around the Sun (the plane of the ecliptic). This system is (to first order) fixed with respect to the distant stars. It is subject to slow change owing to the various slow motions of the Earth's rotation axis with respect to the fixed stars. ;+ ; NAME: ; CvSky_HEEQ ; PURPOSE: ; Euler angles for Ecliptic to Heliographic conversion ; CATEGORY: ; smei/gen/idl/ephem ; CALLING SEQUENCE: FUNCTION CvSky_HEEQ, UT, degrees=degrees, longitude=longitude ; INPUTS: ; UT array[n]; type: time structure ; OPTIONAL INPUT PARAMETERS: ; longitude array[n] or scalar; type: float; default: 0 ; heliographic longitude(s). See PROCEDURE. ; /degrees if set all angles are in degrees (default: radians) ; OUTPUTS: ; abc array[3,n]; type: float ; Euler angles for rotation from ecliptic to heliographic ; coordinate frame ; INCLUDE: @compile_opt.pro ; On error, return to caller ; CALLS: ; ToDegrees, TimeGet, TimeUnit, SuperArray, SubArray ; SEE ALSO: ; CvSky_IHG ; PROCEDURE: ; The ecliptic longitude for the ascending node and the inclination of ; equator to ecliptic are from R. Green, "Spherical astronomy", p. 431 ; ; If keyword 'longitude' is specified than the Euler angles refer ; to a rotation from an ecliptic reference frame to a ; heliographic reference frame with longitude measured from the ; heliographic meridian through 'longitude', instead of the ; heliographic prime meridian (i.e. heliographic longitude zero). ; This is useful, for instance, to set up 'earth-centered' ; heliographic coordinates with heliographic longitude measured ; from the heliographic longitude of Earth. ; MODIFICATION HISTORY: ; AUG-2002, Paul Hick (UCSD/CASS; pphick@ucsd.edu) ;- dpm = ToDegrees(degrees=degrees) A = TimeGet(UT, /mjd, /scalar)+1780L ; MJD -1780=JD2398220-JD2400000 B = 0.25d0+(A-!sun.siderealp*long(A/!sun.siderealp))/!sun.siderealp ; A[0,*] = -90 deg + ecliptic longitude of ascending node of solar equator on ecliptic ; A[1,*] = inclination of solar equator to ecliptic ; A[2,*] = +90 deg + angle from ascending node to heliographic prime meridian ; (prime meridian = heliographic longitude zero) Y = TimeGet(UT,TimeUnit(/year),/scalar)-1850+(TimeGet(UT,/doy,/scalar)-1.0d0)/365.25d0 A = SuperArray(double(0*A),3,/lead) A = SubArray(A, element=0, add=-16.333333d0+0.5025d0*Y/36.0d0) A = SubArray(A, element=1, add= 7.25d0) L = 360.00d0*(B-long(B)) ; Angle asc node to heliographic prime meridian IF IsType(longitude,/defined) THEN BEGIN L += longitude*dpm ; Add input heliographic longitude (in degrees) L = AngleRange(L,/degrees) ; Keep inside [0,360] ENDIF A = SubArray(A, element=2, add=L) RETURN, A/dpm & END