function spice_body_pos,body_name,obs_name,utc=utc,et=et,frame=frame,ltime=ltime,abcorr=abcorr,check_objects=check_objects
on_error,2
if not keyword_set(frame) then frame = 'ECLIPJ2000'
if not keyword_set(abcorr) then abcorr = 'NONE'
ut = time_double(utc)
et = time_ephemeris(ut,/ut2et)
ns = n_elements(et)
if keyword_set(check_objects) then begin
time_valid = spice_valid_times(et,object=check_objects)
ind = where(time_valid ne 0,nind)
endif else begin
ind = lindgen((nind = ns))
endelse
pos = replicate(!values.d_nan,3,ns)
if arg_present(ltime) then ltime = replicate(!values.d_nan,ns)
if nind ne 0 then begin
cspice_spkpos,body_name,et[ind],frame,abcorr,obs_name, pos2, ltime2
pos[*,ind] = pos2
if keyword_set(ltime) then ltime[ind] = ltime2
endif else dprint,'No Valid SPK frame for: ',check_objects
return,pos
end