Index Page
cspice_latcyl
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_LATCYL converts from latitudinal coordinates to 
   cylindrical coordinates.

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

I/O

   
   Given:
   
      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
   
   The call:
   
      cspice_latcyl, radius, lon, lat, r, lonc, z
   
   returns: 
   
      r     the scalar double precision value for distance of 
            the point from z axis
      
      lon   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

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, 'lon' and 'lat' expressed
      ;; in degrees (convert in place to radians).
      ;;
      rad = [ 1.d,  1.d, sqrt(2.d), sqrt(2.d),   1.d,  0.d ]
      lon = [ 0.d, 90.d,     180.d,     180.d, 180.d, 33.d ] * cspice_rpd()
      lat = [ 0.d,  0.d,      45.d,      -45.d, 90.d,  0.d ] * cspice_rpd()

      ;;
      ;; 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 cylindrical coordinates to latitudinal coordinates
         ;;
         cspice_latcyl,  rad[i], lon[i], lat[i], r, lonc, z

         ;;
         ;; ...convert the 'lon' and 'lat' values from radians to degrees
         ;;
         cspice_convrt, lonc  , 'RADIANS', 'DEGREES', lonc_degs
         cspice_convrt, lon[i], 'RADIANS', 'DEGREES', lon_degs
         cspice_convrt, lat[i], 'RADIANS', 'DEGREES', lat_degs

         ;;
         ;; Print the input and corresponding output.
         ;;
         print, FORMAT='(6D10.4)', r, lonc_degs, z, rad[i], 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.1, 09-DEC-2005, EDW (JPL)

      Added Examples section.

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

Index_Entries


   latitudinal to cylindrical coordinates




Wed Apr  5 17:58:02 2017