[AIT logo]

Institut für Astronomie und Astrophysik

Abteilung Astronomie

Waldhäuser Str. 64, D-72076 Tübingen, Germany
[Uni logo]


SPHDIST Source code in sphdist.pro

SPHDIST

Name
       SPHDIST
Purpose
       Angular distance between points on a sphere.
Calling Sequence
       d = sphdist(long1, lat1, long2, lat2)
Input Parameters
       long1 = longitude of point 1, scalar or vector
       lat1 = latitude of point 1, scalar or vector
       long2 = longitude of point 2, scalar or vector
       lat2 = latitude of point 2, scalar or vector
Keyword Parameters
       /DEGREES - means angles are in degrees, else radians.
Output Parameters
       d = angular distance between points (in radians unless /DEGREES
           is set.)
Procedures Used
       RECPOL, POLREC
Note
       (1) The procedure GCIRC is similar to SPHDIST(), but may be more
           suitable for astronomical applications.
       (2) If long1,lat1 are scalars, and long2,lat2 are vectors, then
           SPHDIST returns a vector giving the distance of each element of
           long2,lat2 to long1,lat1.   Similarly, if long1,lat1 are vectors,
           and long2, lat2 are scalars, then SPHDIST returns a vector giving
           giving the distance of each element of long1,lat1 to to long2,lat2.
           If both long1,lat1 and long2,lat2 are vectors then SPHDIST returns
           vector giving the distance of each element of long1,lat1 to the
           corresponding element of long2, lat2.   If the input vectors are
           not of equal length, then excess elements of the longer ones will
           be ignored.
Revision History
       R. Sterner, 5 Feb, 1991
       R. Sterner, 26 Feb, 1991 --- Renamed from sphere_dist.pro
 Copyright (C) 1991, Johns Hopkins University/Applied Physics Laboratory
 This software may be used, copied, or redistributed as long as it is not
 sold and this copyright notice is reproduced on each copy made.  This
 routine is provided as is without any express or implied warranties
 whatsoever.  Other limitations apply as described in the file disclaimer.txt.
       Converted to IDL V5.0   W. Landsman   September 1997

Last modified by pro2html on 2001 April 26 at 03:13 UTC

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

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