@spiceErrorCheck<EOL>def spkezr(targ, et, ref, abcorr, obs):
targ = stypes.stringToCharP(targ)<EOL>ref = stypes.stringToCharP(ref)<EOL>abcorr = stypes.stringToCharP(abcorr)<EOL>obs = stypes.stringToCharP(obs)<EOL>starg = stypes.emptyDoubleVector(<NUM_LIT:6>)<EOL>lt = ctypes.c_double()<EOL>if hasattr(et, "<STR_LIT>"):<EOL><INDENT>states = []<EOL>times = []<EOL>for t in et:<EOL><INDENT>libspice.spkezr_c(targ, ctypes.c_double(t), ref, abcorr, obs, starg, ctypes.byref(lt))<EOL>checkForSpiceError(None)<EOL>states.append(stypes.cVectorToPython(starg))<EOL>times.append(lt.value)<EOL><DEDENT>return states, times<EOL><DEDENT>else:<EOL><INDENT>libspice.spkezr_c(targ, ctypes.c_double(et), ref, abcorr, obs, starg, ctypes.byref(lt))<EOL>return stypes.cVectorToPython(starg), lt.value<EOL><DEDENT>
Return the state (position and velocity) of a target body
relative to an observing body, optionally corrected for light
time (planetary aberration) and stellar aberration.

http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkezr_c.html

:param targ: Target body name.
:type targ: str
:param et: Observer epoch.
:type et: Union[float,Iterable[float]]
:param ref: Reference frame of output state vector.
:type ref: str
:param abcorr: Aberration correction flag.
:type abcorr: str
:param obs: Observing body name.
:type obs: str
:return:
        State of target,
        One way light time between observer and target.
:rtype: tuple