@spiceErrorCheck<EOL>def convrt(x, inunit, outunit):
inunit = stypes.stringToCharP(inunit)<EOL>outunit = stypes.stringToCharP(outunit)<EOL>y = ctypes.c_double()<EOL>if hasattr(x, "<STR_LIT>"):<EOL><INDENT>outArray=[]<EOL>for n in x:<EOL><INDENT>libspice.convrt_c(n,inunit,outunit,ctypes.byref(y))<EOL>outArray.append(y.value)<EOL><DEDENT>return outArray<EOL><DEDENT>x = ctypes.c_double(x)<EOL>libspice.convrt_c(x, inunit, outunit, ctypes.byref(y))<EOL>return y.value<EOL>
Take a measurement X, the units associated with
X, and units to which X should be converted; return Y
the value of the measurement in the output units.

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

:param x: Number representing a measurement in some units.
:type x: float
:param inunit: The units in which x is measured.
:type inunit: str
:param outunit: Desired units for the measurement.
:type outunit: str
:return: The measurment in the desired units.
:rtype: float