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

ang2vec
converts the position angles of a point on the sphere into its 3D position vector.
vec2ang
converts the 3D position vector of point into its position angles on the sphere.
vect_prod
computes the vector product between two 3D vectors

Version 3.82, 2022-07-28