Learn R Programming

astroFns (version 4.0-0)

angSep: Angular separation of two sky positions

Description

angSep calculates the angular separation of two sky positions using spherical trigonometry.

Usage

angSep(ra1, dec1, ra2, dec2)

Arguments

ra1
Right ascention (string) of the first position.
dec1
Declination of (string) the first position.
ra2
Right ascention (string) the second position.
dec2
Declination of (string) the second position.

Value

  • Returns angluar separation in decimal degrees.

Details

Enter positions as text strings with fields separated by characters d, h, m, s, a colon, or a comma, e.g. '17, 42, 28', '-28h43m03s', or '- 28 :43 : 3'. Spaces are removed in input conversion. This is a spherical trigonometry calculation, valid for small and large distances.

See Also

See dms2rad, hms2rad for input conversions.

Examples

Run this code
angSep('1, 59, 03', '-3, 40, 44', '2, 30', '5, 40, 03')
angSep('1h59m03s', '-3d40m44s', '2h30', '5h40m03')
angSep('1', '0', '2', '0')
angSep('1,  40,  4', '-  5, 6', '3', '1')

Run the code above in your browser using DataLab