[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

Sand 1, D-72076 Tübingen, Germany
New Address!   --   Neue Adresse!
[Uni logo]


GCIRC Source code in gcirc.pro

GCIRC

Name
     GCIRC
Purpose
     Computes rigorous great circle arc distances.
Explanation
     Input/Output can either be either sexigesimal RA, Dec, or in radians.
     All computations are double precision.
Calling Sequence
      GCIRC, U, RA1, DC1, RA2, DC2, DIS
Input Parameters
      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
Output Parameters
      DIS  -- Angular distance on the sky between points 1 and 2
              See U above for units;  double precision
Procedure
      "Cosine formula" (p. 7 of Smart's Spherical Astronomy or
      p. 12 of Green's Spherical Astronomy)
Note
       (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.
Procedures Used
      None
Revision History
      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

Last modified by pro2html on 2002 June 26 at 03:22 UTC

[Home Page] [Software, Documentation] [IDL Documentation] [Quick Reference] [Feedback]

Jörn Wilms (wilms@astro.uni-tuebingen.de)
Updated automatically