Index Page radrec_c
A B C D E F G H I J K L M N O P Q R S T U V W X
Procedure Abstract Required_Reading Keywords Brief_I/O Detailed_Input | Detailed_Output Parameters Exceptions Files Particulars Examples | Restrictions Literature_References Author_and_Institution Version Index_Entries
#### Procedure
       void radrec_c ( SpiceDouble range,
                       SpiceDouble ra,
                       SpiceDouble dec,
                       SpiceDouble rectan[3] )
#### Abstract
       Convert from range, right ascension, and declination to rectangular
       coordinates.
#### Required_Reading
       None.
#### Keywords
       CONVERSION,   COORDINATES
#### Brief_I/O
       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.
#### Detailed_Input
       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.
#### Detailed_Output
       rectan     is the array containing the rectangular coordinates of
                  the point.  The output units associated with `rectan'
                  are those associated with the input `range.'
#### Parameters
       None.
#### Exceptions
       Error free.
#### Files
       None.
#### Particulars
       None.
#### Examples
       The following code fragment converts right ascension and
       declination from the B1950 reference frame to the J2000 frame.

          #include "SpiceUsr.h"

          SpiceDouble      ra;
          SpiceDouble      dec;
          SpiceDouble      r;
          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 );
#### Restrictions
       None.
#### Literature_References
       "Celestial Mechanics, A Computational Guide for the Practitioner"
       by Laurence G. Taff
#### Author_and_Institution
       N.J. Bachman    (JPL)
       H.A. Neilan     (JPL)
       E.D. Wright     (JPL)
#### Version
       -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)
#### Index_Entries
       range ra and dec to rectangular coordinates
       right_ascension and declination to rectangular
#### Link to routine radrec_c source file radrec_c.c

    Wed Jun  9 13:05:28 2010