;+ ; NAME: ; single_eph.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: ; single_eph, eph, observer=observer ; ; INPUTS: ; et - the ET at which you want to know the ; coordinates ; observer - the optional argument that indicates the ; observer location. ; testing - an optional argument that prints output in ; the units of the Horizons web site for comparison ; OUTPUTS: ; eph - a structure with the following elements ; eph.ra - the Pluto RA in radians ; eph.dec - the Pluto Dec in radians ; eph.radot - the RA rate in radians/s ; (d(ra)*cos(dec)/dt) ; eph.decdot -- the Dec rate in radians/s ; eph.ephinfo - the observer range (in km) ; and range rate (km/s). ; ; ; REVISON HISTORY: ; 17-January-2005 CBO SwRI ;- pro single_eph, target, et, eph, observer=observer, testing=testing ;check to see if optional arguments are set by the user. If not assign values. IF not keyword_set(observer) THEN observer = "Earth" IF not keyword_set(testing) THEN testing = "False" ; Load naif kernels. If they are already loaded, naifinit will not ; reload them. naifinit ; Look up the naif id's for the observer and Pluto CSPICE_BODN2C, observer, obscode, found CSPICE_BODN2C, target, targetcode, found ; Get the RA and Dec of the target abcorr = 'LT' ;only correcting for light time frame='J2000' CSPICE_SPKEZ, targetcode, et, frame, abcorr, obscode, stateTarget, ltime ; Convert X, Y, Z to RA, Dec and distance CSPICE_RECRAD, stateTarget[0:2], dist, ra, dec ; Calculate the ra and dec rates: CSPICE_SPKEZ, targetcode, et+1.0, frame, abcorr, obscode, stateT2, ltime2 CSPICE_RECRAD, stateT2[0:2], dist2, ra2, dec2 radot = (ra2 - ra)*cos(dec) decdot = (dec2 - dec) distdot = (dist2 - dist) eph = {et:et, ra:ra, dec:dec, radot:radot, decdot:decdot, $ ephinfo:[dist, distDot]} IF testing NE "False" THEN BEGIN ; This is just to help test against the web site CSPICE_ET2UTC, et, "C", 6, utcstr rad2deg = 180/(!pi) sec2hr = 60*60. km2AU = 1/(1.49598e8) ; For testing against the JPL Horizon's site print, utcstr, et, adstring([ra*rad2deg,dec*rad2deg]), $ radot*60^2*rad2deg*sec2hr,$ decdot*60^2*rad2deg*sec2hr, dist*km2AU, distdot, ltime/60. ;This code agrees with JPL Horizons. Here is our output: ;2006 JAN 11 00:00:00.000000 1.9020966e+08 17 40 03.9 -15 53 32.7 ; 5.1266878 -0.15745066 31.934703 -11.949212 265.59305 ; ; Here is JPL's: ; 2006-Jan-11 00:00 2453746.50000000 17 40 03.90 -15 53 32.7 ; 5.13 -0.15 31.9347304340 -11.95227 265.593054 ENDIF END ;+