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


angdist


Returns the angular distance in radians between two vectors. The input vectors do not have to be normalised. For almost colinear or anti-colinear vectors, renders numerically more accurate results than the $\cos^{-1}$ of the scalar product.


Location in HEALPix directory tree: src/f90/mod/pix_tools.f90


FORMAT

call angdist( v1, v2, dist )


ARGUMENTS

name & dimensionality kind in/out description
       
v1(3) DP IN cartesian vector.
v2(3) DP IN cartesian vector.
dist DP OUT angular distance in radians between the 2 vectors.


EXAMPLE:

use healpix_types
use pix_tools, only : angdist
real(DP) :: dist, one = 1.0_dp
call angdist((/1,2,3/)*one, (/1,2,4/)*one, dist)
print*, dist

Returns the angular distance between 2 vectors.


RELATED ROUTINES

This section lists the routines related to angdist


vect_prod
computes the vector product between two 3D vectors

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

CL 03-2650