;+ ; NAME: ; met2et_nh ; PURPOSE: (one line) ; Given an array or scalar of New Horizons MET, return Ephemeris Time ; DESCRIPTION: ; CATEGORY: ; CALLING SEQUENCE: ; et = met2et_nh ; INPUTS: ; met = mission elapsed time. Should be a double. ; OUTPUTS: ; et = Ephemeris Time. TDB (Barycentric Dynamical Time) since J2000. ; See NAIF documentation for details. ; RESTRICTIONS: ; MET should be double ; The New Horizons sclk kernel must be loaded. ; PROCEDURE: ; CSPICE_SCS2E interprets them as ".". The major and minor ticks are defined in the SCLK kernel: ; ; In a particular partition of the NEW HORIZONS spacecraft clock, ; the clock read-out consists of two separate stages: ; ; 1/18424652:24251 ; ; The first stage, a 32 bit field, represents the spacecraft ; clock seconds count. The second, a 16 bit field, represents ; counts of 20 microsecond increments of the spacecraft clock. ; MODIFICATION HISTORY: ; Written 2015 July 19 (P+5), by Leslie Young, SwRI ; Many thanks to David Kaufman and ;- function met2et_nh, met n = n_elements(met) et = dblarr(n) for i = 0, n-1 do begin ; convert to long met_l = floor(met[i]) met_s = string(met_l,for='(I010)') ; get the number of 20-microsecond increments met_tick = round((met[i] - met_l) / (20d-6)) met_s = met_s + ':' + string(met_tick,for='(I05)') ; convert to et cspice_scs2e,-98, met_s, et_i et[i] = et_i endfor return, et end