![]() |
Institut für Astronomie und AstrophysikAbteilung AstronomieSand 1, D-72076 Tübingen, GermanyNew Address! -- Neue Adresse! |
![]() |
GCIRC
Computes rigorous great circle arc distances.
Input/Output can either be either sexigesimal RA, Dec, or in radians.
All computations are double precision.
GCIRC, U, RA1, DC1, RA2, DC2, DIS
U -- Describes units of inputs and output:
0: everything radians
1: RAx in decimal hours, DCx in decimal
degrees, DIS in arc seconds
RA1 -- Right ascension of point 1
DC1 -- Declination of point 1
RA2 -- Right ascension of point 2
DC2 -- Declination of point 2
DIS -- Angular distance on the sky between points 1 and 2
See U above for units; double precision
"Cosine formula" (p. 7 of Smart's Spherical Astronomy or
p. 12 of Green's Spherical Astronomy)
(1) If RA1,DC1 are scalars, and RA2,DC2 are vectors, then DIS is a
vector giving the distance of each element of RA2,DC2 to RA1,DC1.
Similarly, if RA1,DC1 are vectors, and RA2, DC2 are scalars, then DIS
is a vector giving the distance of each element of RA1, DC1 to
RA2, DC2. If both RA1,DC1 and RA2,DC2 are vectors then DIS is a
vector giving the distance of each element of RA1,DC1 to the
corresponding element of RA2,DC2. If the input vectors are not the
same length, then excess elements of the longer ones will be ignored.
(2) Coordinates closer together than a few milliarcsec cannot
be distinguished. If you are in this realm, you should be
using special-purpose algorithms.
(3) The function SPHDIST provides an alternate method of computing
a spherical distance.
None
Written in Fortran by R. Hill -- SASC Technologies -- January 3, 1986
Translated from FORTRAN to IDL, RSH, STX, 2/6/87
Vector arguments allowed W. Landsman April 1989
Prints result if last argument not given. RSH, RSTX, 3 Apr. 1998
Converted to IDL V5.0 April 1998
Remove ISARRAY(), V5.1 version W. Landsman August 2000
[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]