Learn R Programming

astro (version 1.2)

cenang: Central Angle

Description

Calculates the angle between two points on a sphere

Usage

cenang(a1, d1, a2, d2, units = "deg", method = "vincenty")

Arguments

a1
right ascension of point 1
d1
declination of point 1
a2
right ascension of point 2
d2
declination of point 2
units
input/output units [deg/rad]
method
angle calculation method (see below)

Value

The central angle: the angle between two points lying on the surface of a sphere, with reference at the origin/centroid.

Details

The central angle describes the angle, from the origin, between two points lying on the surface of a sphere (e.g., the celestial sphere). Three commonly used methods employed in its calculation are: the Spherical Law of Cosines (sloc); the Haversine Formula (haversine), and; the Vincenty Formula (vincenty). The Spherical Law of Cosines suffers from severe rounding errors for small angles (theta < 1E-5). The Haversine Formula generally works well at all angles, but suffers from rounding errors for antipodal points. The Vincenty Formula is accurate for all angles, and is recommended. The three methods may be chosen by specifying `sloc', `haversine' or `vincenty', or by their respective first letters: s, h or v.

References

http://en.wikipedia.org/wiki/Great-circle_distance

See Also

The astronomy package: astro.