Index Page
reclat_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 reclat_c ( ConstSpiceDouble    rectan[3],
                   SpiceDouble       * radius,
                   SpiceDouble       * longitude,
                   SpiceDouble       * latitude  )

Abstract

   Convert from rectangular coordinates to latitudinal coordinates.
 

Required_Reading

   None.

Keywords

 

   CONVERSION,  COORDINATES


Brief_I/O

 
   VARIABLE  I/O  DESCRIPTION
   --------  ---  --------------------------------------------------
   rectan     I   Rectangular coordinates of a point.
   radius     O   Distance of the point from the origin.
   longitude  O   Longitude of the point in radians.
   latitude   O   Latitude of the point in radians.
 

Detailed_Input

 

   rectan     The rectangular coordinates of the input point.  `rectan'
              is a 3-vector.
 

Detailed_Output

 
 
   radius     Distance of the point from the origin.

              The units associated with `radius' are those
              associated with the input `rectan'.

   longitude  Longitude of the input point.  This is angle between the
              prime meridian and the meridian containing `rectan'.  The
              direction of increasing longitude is from the +X axis
              towards the +Y axis.
 
              Longitude is output in radians. The range of `longitude'
              is [-pi, pi].


   latitude   Latitude of the input point.  This is the angle from
              the XY plane of the ray from the origin through the
              point. 

              Latitude is output in radians.  The range of `latitude'
              is [-pi/2, pi/2].

Parameters

 
 
   None. 

Exceptions

 
 
   Error free. 

   1) If the X and Y components of `rectan' are both zero, the
      longitude is set to zero.

   2) If `rectan' is the zero vector, longitude and latitude are
      both set to zero.
 

Files

 

   None. 
 

Particulars

 

   None.

Examples

   Below are two tables.
 
   Listed in the first table (under rectan[0], rectan[1], and
   rectan[2]) are a number of points whose rectangular coordinates are
   taken from the set {-1, 0, 1}.
 
   The results of the code fragment

      reclat_c ( rectan, &r, &longitude, &latitude );

      latitude  *=  dpr_c();
      longitude *=  dpr_c();

   are listed to four decimal places in the second parallel table under
   r (radius), longitude, and latitude.

   rectan[0]  rectan[1] rectan[2]    r       longitude  latitude
   -------------------------------   ----------------------------
     0.0000     0.0000   0.0000      0.0000    0.0000    0.0000
     1.0000     0.0000   0.0000      1.0000    0.0000    0.0000
     0.0000     1.0000   0.0000      1.0000   90.0000    0.0000
     0.0000     0.0000   1.0000      1.0000    0.0000   90.0000
    -1.0000     0.0000   0.0000      1.0000  180.0000    0.0000
     0.0000    -1.0000   0.0000      1.0000  -90.0000    0.0000
     0.0000     0.0000  -1.0000      1.0000    0.0000  -90.0000
     1.0000     1.0000   0.0000      1.4142   45.0000    0.0000
     1.0000     0.0000   1.0000      1.4142    0.0000   45.0000
     0.0000     1.0000   1.0000      1.4142   90.0000   45.0000
     1.0000     1.0000   1.0000      1.7320   45.0000   35.2643
 

Restrictions

   None.

Literature_References

   None.

Author_and_Institution

   N.J. Bachman    (JPL)
   W.L. Taber      (JPL) 
   E.D. Wright     (JPL)

Version

   -CSPICE Version 1.2.1, 30-JUL-2003 (NJB)

       Various header changes were made to improve clarity.  Some
       minor header corrections were made.

   -CSPICE Version 1.2.0, 28-AUG-2001 (NJB)
     
       Removed tab characters from source file.  Now includes 
       interface macro header SpiceZim.h.

   -CSPICE Version 1.1.0, 21-OCT-1998 (NJB)

      Made input vector const.

   -CSPICE Version 1.0.0, 08-FEB-1998 (EDW)

Index_Entries

   rectangular to latitudinal coordinates

Link to routine reclat_c source file reclat_c.c

Wed Apr  5 17:54:41 2017