reclat_c

 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,
SpiceDouble       * longitude,
SpiceDouble       * latitude  )

```

#### Abstract

```   Convert from rectangular coordinates to latitudinal coordinates.
```

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

```

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

```

None.
```

```

None.
```

#### Examples

```   Below are two tables.

Listed in the first table (under rectan, rectan, and
rectan) 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

rectan  rectan rectan    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)

-CSPICE Version 1.2.0, 28-AUG-2001 (NJB)

Removed tab characters from source file.  Now includes
```   rectangular to latitudinal coordinates
`Wed Apr  5 17:54:41 2017`