code: def cylsph(r, lonc, z):
      
      r = ctypes.c_double(r)
      lonc = ctypes.c_double(lonc)
      z = ctypes.c_double(z)
      radius = ctypes.c_double()
      colat = ctypes.c_double()
      lon = ctypes.c_double()
      libspice.cyllat_c(r, lonc, z, ctypes.byref(radius), ctypes.byref(colat),
                        ctypes.byref(lon))
      return radius.value, colat.value, lon.value
docs: Convert from cylindrical to spherical coordinates.
  
      http://naif.jpl.nasa.gov/pub/naif/toolkit_docs/C/cspice/cylsph_c.html
  
      :param r: Rectangular coordinates of the point.
      :type r: float
      :param lonc: Angle (radians) of point from XZ plane.
      :type lonc: float
      :param z: Height of point above XY plane.
      :type z: float
      :return:
              Distance of point from origin,
              Polar angle (co-latitude in radians) of point,
              Azimuthal angle (longitude) of point (radians).
      :rtype: tuple