- Abstract
Convert from rectangular coordinates to latitudinal coordinates.
- Required_Reading
None.
- 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.
- 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.
- 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.
- Author_and_Institution
N.J. Bachman (JPL)
W.L. Taber (JPL)
E.D. Wright (JPL)
- Literature_References
None.
- 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 source