Angle (angular distance) between 2 directions - DEPRECATED
[ang] = CL_gm_sphericDist(p1,p2)
This function is deprecated.
Replacement functions: CL_co_sph2car and CL_vectAngle
Computes the angle between 2 vectors. Each vector is described by 2 spherical coordinates (analogous to longitude and latitude).
The three following formulas give the spherical distance between two vectors (where lambda: longitude, phi:latitude):
However, the first formula is used in this function as the two other ones may lead to rounding errors for small angles or antipodal points.
First direction in spherical coordinates: [longitude;latitude] [rad] (2xN)
Second direction in spherical coordinates: [longitude;latitude] [rad] (2xN)
Angle between p1 and p2 [rad] (1xN)
CNES - DCT/SB
1) R.W. Sinnott, "Virtues of the Haversine", Sky and Telescope, vol. 68, no. 2, 1984, p. 159
2) Weisstein, Eric W. "Great Circle." From MathWorld. http://mathworld.wolfram.com/GreatCircle.html