;+ ; NAME: ; oc_ephicy.Pro ; ; PURPOSE: ; Returns a structure with the following information: ; {et, ra, dec, radot, decdot, ephinfo} where ephinfo ; contains the observer range and observer range rate. ; ; DESCRIPTION: ; Calculates the ra, dec, radot, decdot, observer range ; and range rate using the NAIF ICY routines. ; ; CALLING SEQUENCE: ; eph = oc_ephicy(target, observer, utcStrStart, utcStrEnd, dt, neph) ; ; INPUTS: ; target - the target for the ephemeris, i.e. "Pluto" ; observer - the observer location, i.e. "Earth" ; utcStrStart - the UTC string of the start time, ; i.e. "January 11, 2006 00:00:00" ; utcStrEnd - the UTC string of the end time ; dt - the increment in time, seconds ; OUTPUTS: ; eph - a structure with the following elements ; eph.et - ephemeris time at observer, in TDB s past J2000 ; eph.ra - the target RA in radians ; eph.dec - the target Dec in radians ; eph.raerr - the error in cos(dec)*ra (-999 for undefined) ; eph.decerr - the error in Dec in radians (-999 for undefined) ; eph.radot - the RA rate in radians/s (d(ra)*cos(dec)/dt) ; eph.decdot -- the Dec rate in radians/s ; eph.radoterr - the error in radot (-999 for undefined) ; eph.decdoterr - the error in decdot (-999 for undefined) ; eph.delta - target-obeserver distance in km ; eph.deltadot - change in target-obeserver distance in km/s ; eph.state - J2000 [X,Y,Z, X', Y', Z'] in km and km/s ; ; eph.naif - naif info structure ; eph.naif.target - NAIF target name ; eph.naif.observer - NAIF observer name ; eph.naif.targetcode - NAIF target code ; eph.naif.observercode - NAIF observer code ; eph.naif.frame - frame for returning state, eg 'J2000' ; eph.naif.abcorr - aberation correction, eg 'LT' for lighttime ; eph.naif.kernels - list of kernels loaded ; ; REVISON HISTORY: ; 17-January-2005 CBO SwRI ; 21-March-2005 LAY SwRI ; Changed from procedure to function ; Changed i from float to long ; 12 March 2006 LAY SwRI ; Cleaned up docs to reflect new single_eph output ; Cast dt to be a double ; 22 March 2006 LAY SwRI added verbose, abcoor, frame, ; lonlatalt keywords ; 02-July-2006 LAY SwRI add kernel keyword to single_eph to avoid extra calls ; to naif_laodedkernels ;- function oc_ephicy, target, observer, utcStrStart, utcStrEnd, dt, neph, $ verbose = verbose, abcorr = abcorr, frame=frame, $ lonlatalt=lonlatalt naifinit ; Generate the time list CSPICE_STR2ET, utcStrStart, et0 CSPICE_STR2ET, utcStrEnd, et1 ; Number of steps num = ceil((et1 - et0)/double(dt)) eph1 = single_eph( target, et0, neph, observer=observer, $ verbose = verbose, abcorr = abcorr, frame=frame, $ lonlatalt=lonlatalt) eph = replicate(eph1, num+1) kernels = eph1.naif.kernels FOR i=0L, num-1 DO BEGIN time = et0 + (i+1)*double(dt) eph1 = single_eph( target, time, neph, observer=observer, $ verbose = verbose, abcorr = abcorr, frame=frame, $ lonlatalt=lonlatalt, kernels=kernels) eph[i+1] = eph1 ENDFOR neph = num+1 return, eph END ;+