code: def spkaps(targ, et, ref, abcorr, stobs, accobs):
      
      targ = ctypes.c_int(targ)
      et = ctypes.c_double(et)
      ref = stypes.stringToCharP(ref)
      abcorr = stypes.stringToCharP(abcorr)
      stobs = stypes.toDoubleVector(stobs)
      accobs = stypes.toDoubleVector(accobs)
      starg = stypes.emptyDoubleVector(6)
      lt = ctypes.c_double()
      dlt = ctypes.c_double()
      libspice.spkaps_c(targ, et, ref, abcorr, stobs, accobs, starg,
                        ctypes.byref(lt), ctypes.byref(dlt))
      return stypes.cVectorToPython(starg), lt.value, dlt.value
docs: Given the state and acceleration of an observer relative to the
      solar system barycenter, return the state (position and velocity)
      of a target body relative to the observer, optionally corrected
      for light time and stellar aberration. All input and output
      vectors are expressed relative to an inertial reference frame.
  
      This routine supersedes :func:`spkapp`.
  
      SPICE users normally should call the high-level API routines
      :func:`spkezr` or :func:`spkez` rather than this routine.
      http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/spkaps_c.html
  
      :param targ: Target body.
      :type targ: int
      :param et: Observer epoch.
      :type et: float
      :param ref: Inertial reference frame of output state.
      :type ref: str
      :param abcorr: Aberration correction flag.
      :type abcorr: str
      :param stobs: State of the observer relative to the SSB.
      :type stobs: 6-Element Array of floats
      :param accobs: Acceleration of the observer relative to the SSB.
      :type accobs: 6-Element Array of floats
      :return:
               State of target,
               One way light time between observer and target,
               Derivative of light time with respect to time.
      :rtype: tuple