;+
; NAME        : EIT_SUB_UTIL_HELIO
;
; PURPOSE     : Draw solar heliographic coords. over top of EIT image.
;
; CATEGORY    :
;
; EXPLANATION : 
;
; SYNTAX      : 
;
; EXAMPLES    : none
;
; CALLED BY   :
;
; CALLS TO    : none
;
; ARGURMENTS  :	none
;
; KEYWORDS    : none
;
; OUTPUTS     : none
;
; COMMON      : none
;
; RESTRICTIONS: none
;
; SIDE EFFECTS: none
;
; PROJECT     : SOHO - EIT
;
; HISTORY     : V1,  Elaine Einfalt (HSTX)
;
; CONTACT     : eit@xanado.nascom.nasa.gov
; 		2003/07/21 _ Einfalt - Spacecraft antenna problem result
;				 in spending part of the year rolled 180
;				 Images are still displayed as taken, 
;				 but Helio tricked into upside down b angle.
;		2004/06/14 - einfalt- change call from anytim to anytim2utc,
;				 in order to minimize unnecessary code calls.	
;		2004/06/15 - einfalt - changed keyword from FILE= to DATE=
;-

pro  EIT_SUB_UTIL_HELIO, date=date, antenna_roll=antenna_roll

 image_date = date			; date of image

 if antenna_roll eq 180. then begin
    ; If rolled 180 then need to make B angle code upside down. 
    ; So subtract 6 months to image date. (2003/07/21 - einfalt)

    six_months = anytim2utc(image_date)
    six_months.mjd = six_months.mjd - (365/2)		; 6 mo. ago

    image_date = anytim2utc(six_months, /ecs,/date)	; format yyyy/mm/dd 

    print,'%EIT_SUB_UTIL_HELIO, S/C rolled 180 so using date ' + image_date + $
		' to simulate B angle'
 endif


 EIT_SUB_SOLAR_GRID, date=image_date 		; calls pb0r, sun_pos

 ; Plot solar limb, too.

 radius = 960.d				; appox.solar radius in arcsec
 theta = findgen(361) * !dtor		; all theta converted to radians
 xlimb = radius * sin(theta)  &  ylimb = radius * cos(theta)

 oplot, xlimb, ylimb, linestyle=1, color=!p.color

return
end
