Index Page
cspice_cyllat
A  B  C  D  E  F  G  H  I  J  K  L  M  N  O  P  Q  R  S  T  U  V  W  X 

Abstract
I/O
Examples
Particulars
Required Reading
Version
Index_Entries

Abstract


   CSPICE_CYLLAT converts cylindrical coordinates to latitudinal
   coordinates.

   For important details concerning this module's function, please refer to
   the CSPICE routine cyllat_c.

I/O

   
   Given: 
   
      r      the scalar double precision value for distance of 
             the point from z axis
      
      lonc   the scalar double precision value for the cylindrical 
             angle of the point from XZ plane as measured in radians
             
      z      the scalar double precision value for the height of the 
              point above XY plane
   
   the call:
   
      cspice_cyllat, r, lonc, z, radius, lon, lat
   
   returns: 
   
      radius   the scalar double precision distance of the point from 
               origin
      
      lon      the scalar double precision longitude of the point 
               measured in radians
      
      lat      the scalar double precision latitude of the point 
               measured in radians
   

Examples


   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.

   
      ;;
      ;; Define six sets of cylindrical coordinates, 'lonc' expressed
      ;; in degrees.
      ;;
      r     = [ 1.d,  1.d,   1.d,   1.d,   0.d,  0.d ]
      lonc  = [ 0.d, 90.d, 180.d, 180.d, 180.d, 33.d ] 
      z     = [ 0.d,  0.d,   1.d,  -1.d,   1.d,  0.d ]
   
      ;;
      ;; Print a header for the data output.
      ;;
      print, '     r        lonc       z       radius     lon        lat  '
      print, '  --------  --------  --------  --------  --------  --------'
   
      ;;
      ;; Loop over each set of coordinates...
      ;;
      for i=0, 5 do begin
   
         ;;
         ;; ...convert the 'lonc' values from degrees to radians
         ;;
         cspice_convrt, lonc[i], 'DEGREES', 'RADIANS', lonc_rads
   
         ;;
         ;; ..convert the cylindrical coordinates to latitudinal coordinates
         ;;
         cspice_cyllat, r[i], lonc_rads, z[i], radius, lon, lat
   
         ;;
         ;; ...convert the 'lon' and 'lat' values from radians to degrees
         ;;
         cspice_convrt, lon, 'RADIANS', 'DEGREES', lon_degs
         cspice_convrt, lat, 'RADIANS', 'DEGREES', lat_degs
   
         ;;
         ;; Print the input and corresponding output.
         ;;
         print, FORMAT='(6D10.4)', r[i], lonc[i], z[i], $
                                   radius, lon_degs, lat_degs
   
      endfor
   
   IDL outputs:
   
        r        lonc       z       radius     lon        lat  
     --------  --------  --------  --------  --------  --------
       1.0000    0.0000    0.0000    1.0000    0.0000    0.0000
       1.0000   90.0000    0.0000    1.0000   90.0000    0.0000
       1.0000  180.0000    1.0000    1.4142  180.0000   45.0000
       1.0000  180.0000   -1.0000    1.4142  180.0000  -45.0000
       0.0000  180.0000    1.0000    1.0000  180.0000   90.0000
       0.0000   33.0000    0.0000    0.0000   33.0000    0.0000

Particulars


   None.

Required Reading


   ICY.REQ

Version


   -Icy Version 1.0.0, 16-JUN-2003, EDW (JPL)

Index_Entries

 
   cylindrical to latitudinal 
 



Wed Apr  5 17:57:59 2017