void radrec_c ( SpiceDouble range,
SpiceDouble rectan )
Convert from range, right ascension, and declination to rectangular
VARIABLE I/O DESCRIPTION
-------- --- ---------------------------------------------------
range I Distance of a point from the origin.
ra I Right ascension of point in radians.
dec I Declination of point in radians.
rectan O Rectangular coordinates of the point.
range is the distance of the point from the origin. Output
units are the same as the units associated with `range.'
ra is the right ascension of the input point: the angular
distance measured toward the east from the prime meridian
to the meridian containing the input point. The direction
of increasing right ascension is from the +X axis towards
the +Y axis.
The range (i.e., the set of allowed values) of
`ra' is unrestricted. Units are radians.
dec is the declination of the point. This is the angular
distance from the XY plane to the point.
The range of `dec' is unrestricted. Units are radians.
rectan is the array containing the rectangular coordinates of
the point. The output units associated with `rectan'
are those associated with the input `range.'
The following code fragment converts right ascension and
declination from the B1950 reference frame to the J2000 frame.
SpiceDouble rotab [ 3 ][ 3 ];
SpiceDouble oldvec [ 3 ];
SpiceDouble newvec [ 3 ];
radrec_c ( 1.0, ra, dec, oldvec );
pxform_c ( "B1950", "J2000", 0.0, rotab );
mxv_c ( rotab, oldvec, newvec );
recrad_c ( newvec, &r, &ra, &dec );
"Celestial Mechanics, A Computational Guide for the Practitioner"
by Laurence G. Taff
N.J. Bachman (JPL)
H.A. Neilan (JPL)
E.D. Wright (JPL)
-CSPICE Version 1.0.2, 28-JUL-2003 (NJB)
Various header corrections were made.
-CSPICE Version 1.0.1, 13-APR-2000 (NJB)
Made some minor updates and corrections in the code example.
-CSPICE Version 1.0.0, 08-FEB-1998 (EDW)
range ra and dec to rectangular coordinates
right_ascension and declination to rectangular