FUNCTION HOSOrbit, T, hos=HosIn, degrees=Degrees, quick=quick ;+ ; NAME: ; HOSOrbit ; PURPOSE: ; Calculates the position of a Helios spacecraft at a given time ; CATEGORY: ; smei/gen/idl/ephem ; CALLING SEQUENCE: ; R = HOSOrbit(T,hos=Hos [,/degrees]) ; INPUTS: ; T array; type: integer or standard time structure ; times (UT) ; hos=Hos scalar; type: integer; default: 1 ; spacecraft (1=Helios A; 2=Helios B) ; OPTIONAL INPUT PARAMETERS: ; /degrees if set all angles are returned in degrees ; OUTPUTS: ; R array[3,*]; type: float ; longitude, latitude, distance ; (longitude and latitude for Equinox 1975.0 ???) ; INCLUDE: @compile_opt.pro ; On error, return to caller ; CALLS: ; KeplerOrbit, SuperArray, SyncArgs, TimeGet, ToDegrees ; PROCEDURE: ; The spacecraft orbit is assumed to lie in the ecliptic ; See O. Montenbruck, Practical Ephemeris Calculations, p. 42-45 ; Perihelion passages for Helios A: ; ; year doy JD ecl long perih ; ; 1975 74.38411 2442486.8841 257.8521 ! ; 1975 264.5102 2677.0102 .8493 ! ; 1976 89.6610 2867.1610 .8570 ! ; 1976 279.7965 3057.2965 .8478 ! ; 1977 103.9367 3247.4367 .8448 ! ; 1977 294.0973 3437.5973 .8496 ! ; 1978 119.2591 3627.7591 .8517 ! ; 1978 309.4239 3817.9239 .8518 ! ; 1979 134.5879 4008.0879 .8530 ! ; 1979 ; 1980 149.9095 4388.4095 .8465 ! ; 1980 340.2279 4578.7279 .8542 ! ; 1981 164.978 4768.729 257.978 ; 1981 ; 1982 ; 1982 ; 1983 ; 1983 ; ; Perihelion passages for Helios B: ; ; 1976 108.1035 2442885.6035 294.2079 ! ; 1976 293.7552 3071.2552 294.2007 ! ; 1977 113.5434 3257.0434 294.2332 ! ; 1977 299.3565 3442.8565 294.2353 ! ; 1978 120.2137 3628.7137 294.2470 ! ; 1978 306.0831 3814.5831 294.2528 ! ; 1979 126.9678 4000.4678 294.2577 ! ; 1979 312.8478 4186.3478 294.2553 ! ; MODIFICATION HISTORY: ; 1990, Paul Hick (UCSD) ; 1997, Paul Hick (UCSD), replaced explicit orbit calculation by call to KeplerOrbit ; SEP-1999, Paul Hick (UCSD/CASS; pphick@ucsd.edu) ; added option to set the first argument Yr to a standard time structure ;- dpm = ToDegrees(degrees=Degrees) Hos = HosIn-1 aa = [0.6471445,0.6372573] ; Semi-major axes (AU) ee = [0.521757 ,0.543814 ] ; Eccentricities pl = [ 257.85 , 294.23]/dpm pt = [3247.4367d0,3442.8565d0]-11545L if keyword_set(Quick) then $ return, KeplerOrbit(T, degrees=Degrees, elements=[aa[Hos], ee[Hos], pl[Hos], pt[Hos]]) ; Perihelion longitudes pl = [ [ 257.8521d0, 257.8493d0, 257.8570d0, 257.8478d0, 257.8448d0, 257.8496d0, $ 257.8517d0, 257.8518d0, 257.8530d0, 257.8465d0, 257.8542d0, 257.9780d0], $ [ 294.2079d0, 294.2007d0, 294.2332d0, 294.2353d0, 294.2470d0, 294.2528d0, $ 294.2577d0, 294.2553d0, 0d0,0d0,0d0,0d0] ]/dpm ; Times of perihelion passage pt = [ [2486.8841d0,2677.0120d0,2867.1610d0,3057.2965d0,3247.4367d0,3437.5973d0, $ 3627.7591d0,3817.9239d0,4008.0879d0,4388.4095d0,4578.7279d0,4768.7290d0], $ [2885.6035d0,3071.2552d0,3257.0434d0,3442.8565d0,3628.7137d0,3814.5831d0, $ 4000.4678d0,4186.3478d0, 0d0,0d0,0d0,0d0] ] pt = pt-11545L ; Days since 2000 Jan 1.5 ; 11545 = 2451545-2440000 nP = n_elements( where( pt[*,Hos] ne 0d0 ) ) JD = TimeGet(T, /njd, /scalar) Out = 0. iPP = 0 SyncArgs, JD, Out, iPP Out = SuperArray(Out,3,/lead) FOR i=0,n_elements(JD)-1 DO BEGIN ; Find nearest perihelion for all times A = min(abs(JD[i]-pt[0:nP-1,Hos]),n) iPP[i] = n ENDFOR FOR i=0,nP-1 DO BEGIN ; Loop over all perihelia A = where(iPP eq i) IF A[0] NE -1 THEN Out[*,A] = KeplerOrbit(T[A], elements=[aa[Hos],ee[Hos],pl[i,Hos],pt[i,Hos]], degrees=Degrees) ENDFOR RETURN, Out & END