NASA - Jet Propulsion Laboratory
    + View the NASA Portal
Search JPL
Jet Propulsion Laboratory Home Earth Solar System Stars & Galaxies Technology
Introduction Background Software Links


vec2ang


Routine to convert the 3D position vector (x,y,z) of point into its position angles $(\theta,\phi) $ on the sphere with $x = \sin\theta\cos\phi $, $y=\sin\theta\sin\phi $, $z=\cos\theta $.


Location in HEALPix directory tree: src/C/subs/vec2ang.c


FORMAT

void vec2ang(double *vector, double *theta, double *phi);


ARGUMENTS

name & dimensionality kind in/out description
       
vector(3) double IN three dimensional cartesian position vector (x,y,z). The north pole is (0,0,1)
theta double OUT colatitude in radians measured southward from north pole (in [0,$\pi$]).
phi double OUT longitude in radians measured eastward (in [0, $2\pi$]).


RELATED ROUTINES

This section lists the routines related to vec2ang


ang2vec
converts the position angles of a point on the sphere into its 3D position vector.

Eric Hivon 2010-06-18
Privacy / Copyright
FIRST GOV Contact: NASA Home Page Site Manager:
Webmaster:

CL 03-2650