cspice_cyllat

 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

lat      the scalar double precision latitude of the point

```

#### 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
;;

;;
;; ..convert the cylindrical coordinates to latitudinal coordinates
;;

;;
;; ...convert the 'lon' and 'lat' values from radians to degrees
;;

;;
;; Print the input and corresponding output.
;;
print, FORMAT='(6D10.4)', r[i], lonc[i], z[i], \$

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

```

```
None.

```

```
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`