C+ C NAME: C SC_ECLIP C PURPOSE: C Calculate heliocentric or topocentric (s/c-centered) ecliptic C coordinates (longitude,latitude, elongation and distance) for the C point P closest to the Sun along each Helios line of sight C (i.e. each photometer-sector combination; SC_ECLIP) and for the C 90 degree photometer (SC_ECLIP90) C CALLING SEQUENCE: subroutine SC_ECLIP(iScIn,IBS,IBE,HLNG,HLAT,HR,HELO) C INPUTS: C iScIn integer +/-1=Helios A, +/-2=Helios B C (positive: returns heliocentric values C negative: returns topocentric values) C IBS integer start sector C IBE integer end sector C IBS and IBE define the range of sectors used and may be given C as normal sector numbers (1,..,32) or modified sector numbers C (-15,..,16). IBS and IBE are used to dimension the output C arrays. C OUTPUTS: (for SC_ECLIP90 the outputs are scalars) C HLNG(IBS:IBE,2) real relative ecliptic longitude P deg in [0,360]), C i.e. the heliocentric difference lng(P)-lng(s/c) or the C topocentric difference lng(P)-lng(Sun) C HLAT(IBS:IBE,2) real ecliptic latitude of P (deg in [-90,90]) C HR (IBS:IBE,2) real distance of P (units of the Sun-s/c distance) C HELO(IBS:IBE,2) real elongation of P (deg) (+ for East; - for West) C CALLS: C POINT_ON_LOS, Say C RESTRICTIONS: C > The spacecraft is supposed to move in the ecliptic C PROCEDURE: C > First calculate azimuth XLNG and elevation XLAT of the line of sight as C defined by a photometer-sector combination. These angles refer to a C spacecraft-centered ecliptic coordinate system (+Z-axis towards ecliptic C North and the +X-axis towards the Sun. The phase angle (measured C counter-clockwise) increases/decreases with sector number for HELIOS C A/B. HELIOS A looks south of ecliptic (XLAT<0); HELIOS B north (XLAT>0). C > The sector numbering is assumed to be in the positive sense using the C spin axis as Z-axis starting at the S/C-Sun direction. C For Helios A (spin axis to North) sector 1 is the first sector eastward C of the S/c-Sun direction; for Helios B (spin axis to South) sector 1 C is the first westward sector. C > Since the sector azimuth offsets are taken into account the results C for sectors 17-32 are almost, but not quite symmetrical relative to C sectors 1-16 C!> I'm not sure of the sign for the azimuth offset for Helios B. It may C have the wrong sign now. C > If the s/c is located at 1 AU and at ecliptic longitude 0, HLNG and C HLAT become the heliocentric ecliptic coordinates of P and HR the C distance P-Sun in AU. C > The heliocentric elongation is the angle P-Sun-Sc; C the topocentric elongation is the angle P-Sc-Sun. C > The sign of the elongation is used to indicate wheter the point C P lies east of west of the Sun as seen from the spacecraft. C HELO>0 towards the east; HELO<0 towards the west. The sign of HELO will C the same for heliocentric and topocentric cases. C MODIFICATION HISTORY: C APR-1992, Paul Hick (UCSD); modification of SC_ECLIPTIC C- integer iScIn integer IBS integer IBE real HLNG(IBS:IBE,2) real HLAT(IBS:IBE,2) real HR (IBS:IBE,2) real HELO(IBS:IBE,2) !------- ! For entry point SC_ECLIP90 real GLNG real GLAT real GR real GELO !------- real WIDTH /5.625/ ! Minimum sector width (deg) real ELEV(2,2) /16.2,31.3,16.23,31.02/ ! Photometer elevation w.r.t. s/c X-Y plane real DAZ (2,2) /.49,.5,.0,-.43/ ! Lag of phot. azimuth behind nominal value real RNear /0.25/ save RNear iSc = abs(iScIn) if (IBE .lt. IBS) call Say('SC_ECLIP','E','Start','sector must be less than end sector') if (IBS .lt. -15 .or. IBE .gt. 32) call Say('SC_ECLIP','E','Invalid','start or end sector') do IP=1,2 ! 1=16 deg photom; 2=31 deg photom do IS=IBS,IBE ! Loop over all sectors ISA = IS if (IS .gt. 16) ISA = 33-IS ! Map 32 to 1, 31 to 2, .., 17 to 16 if (IS .lt. 1) ISA = 1-IS ! Map 0 to 1, -1 to 2, .., -15 to 16 XLNG = ( min(ISA,8)+2*max(0,min(ISA-8,4))+4*max(0,ISA-12) )*WIDTH RTMP = .25*WIDTH*( 5+sign(1,ISA-9)+2*sign(1,ISA-13) ) ! Sector halfwidth XLNG = XLNG-RTMP ! Center of sector if (IS .lt. 1 .or. IS .gt. 16) XLNG = -XLNG !------- ! At this point the sector center azimuth XLNG is still an increasing function ! of the modified sector number [-15..16] for both Helios A and Helios B. ! For Helios A this is the same as the relative ecliptic longitude ! (= longitude (sector)-longitude(Sun)], except for the sector lag. ! For Helios B it is the opposite of the relative ecliptic longitude. XLNG = XLNG+DAZ(IP,iSc) ! Spin axis HELIOS A points to ecliptic North XLAT = -ELEV(IP,iSc) ! Photometers cover south hemisphere if (iSc .eq. 2) then XLNG = -XLNG ! Spin axis HELIOS B points to ecliptic South XLAT = -XLAT ! Photometers cover north hemisphere end if !------- ! XLNG and XLAT now are the topocentric (s/c-centered) ecliptic coordinates for ! the line of sight. XLNG is a relative longitude, i.e. the difference of the ! longitude of the sector and the longitude of the Sun. POINT_ON_LOS converts to ! heliocentric relative ecliptic coordinates, i.e. XLNG becomes the heliocentric ! longitude(Point P)-longitude(Earth); XLAT becomes the heliocentric ! latitude(Point P), and XR the heliocentric distance of Point P in units of ! the S/C-Sun distance. XLNG0 = XLNG XLAT0 = XLAT RTMP = cosd(XLNG)*cosd(XLAT) ! Cosine elongation XR = max(RNear,RTMP) call POINT_ON_LOS(XLNG0,XLAT0,XR,ELO,ELOSUN,iEorW) if (iScIn .gt. 0) then ! Heliocentric HLNG(IS,IP) = XLNG0 HLAT(IS,IP) = XLAT0 HR (IS,IP) = XR HELO(IS,IP) = iEorW*ELOSUN else ! Topocentric HLNG(IS,IP) = XLNG HLAT(IS,IP) = XLAT HR (IS,IP) = max(RNear,RTMP) HELO(IS,IP) = iEorW*acosd(RTMP) end if end do end do return C+ C NAME: C SC_ECLIP90 C PURPOSE: C Calculate heliocentric or topocentric (s/c-centered) ecliptic C coordinates (longitude,latitude, elongation and distance) for the C point P closest to the Sun along each Helios line of sight C (i.e. each photometer-sector combination; SC_ECLIP) and for the C 90 degree photometer (SC_ECLIP90) C CALLING SEQUENCE: entry SC_ECLIP90(iScIn,GLNG,GLAT,GR,GELO) C INPUTS: C iScIn integer +/-1=Helios A, +/-2=Helios B C (positive: returns heliocentric values C negative: returns topocentric values) C OUTPUTS: C GLNG real relative ecliptic longitude P deg in [0,360]), C i.e. the heliocentric difference lng(P)-lng(s/c) or the C topocentric difference lng(P)-lng(Sun) C GLAT real ecliptic latitude of P (deg in [-90,90]) C GR real distance of P (units of the Sun-s/c distance) C GELO real elongation of P (deg) (+ for East; - for West) C CALLS: C POINT_ON_LOS C RESTRICTIONS: C > The spacecraft is supposed to move in the ecliptic C PROCEDURE: C Entry point in href=SC_ECLIP= C MODIFICATION HISTORY: C APR-1992, Paul Hick (UCSD); modification of SC_ECLIPTIC C- ! Topocentric GLNG = 0. ! Ecl. longitude GLAT = (2*abs(iScIn)-3)*90. ! Ecl. latitude GR = RNear ! Point P distance ! Heliocentric if (iScIn .gt. 0) then call POINT_ON_LOS(GLNG,GLAT,GR,ELO,GELO,iEorW) else GELO = 90. ! Elongation end if return end