CSPICE_CONVRT performs a conversion from a measurement in
one unit set to the corresponding measure in another unit
For important details concerning this module's function, please refer to
the CSPICE routine convrt_c.
x is a number representing a measurement in the units
specified by `in'.
in represents the units associated with a measurement x.
Acceptable units are:
Metric Distances: "METERS"
English Distances: "FEET"
Astrometric Distances: "AU"
"LIGHTYEARS" julian lightyears
"YEARS" (same as julian years)
The case of the string `in' is not significant.
cspice_convrt, x, in, out, y
y represents the units desired for the measurement `x'.
See the description of `in'.
The case of the string `out' is not significant.
NOTE: 'x' and 'y' must be uniquely named variables.
Any numerical results shown for this example may differ between
platforms as the results depend on the SPICE kernels used as input
and the machine specific arithmetic implementation.
;; Convert 300 miles (statute miles) to kilometers.
dist_sm = 300.d
cspice_convrt, dist_sm, 'statute_miles', 'km', dist_km
;; Determine the number of lightyears in a parsec.
one_parsec = 1.d
cspice_convrt, one_parsec, 'parsecs', 'lightyears', lightyears
This routine converts a measurement x given in units specified by
in to the equivalent value y in units specified by out.
If a unit is not recognized, an error message is produced that
indicates which one was not recognized.
If input and output units are incompatible (for example angle
and distance units) and error message will be produced stating
the requested units and associated types.
-Icy Version 1.0.1, 11-JAN-2017, EDW (JPL)
Header update to correspond to current SPICELIB/CSPICE version.
-Icy Version 1.0.0, 16-JUN-2003, EDW (JPL)