>  Docs Center  >  Libraries  >  JHU/APL/S1R  >  ELL_LL2RB






      For two points on an ellipsoid return range and bearing.


Calling Sequence

      ell_ll2rb, lon1, lat1, lon2, lat2, dist, azi1, azi2


      lon1, lat1 = Point 1 geodetic long and lat (deg). in
      lon2, lat2 = Point 2 geodetic long and lat (deg). in

Keyword Parameters


      dist = Distance along surface of ellipsoid (m). out
      azi1 = forward geodetic azimuth (pt1 to pt2, deg). out
      azi1 = reverse geodetic azimuth (pt2 to pt1, deg). out
        If point 2 eq point 1 then azi1, azi2 both returned as 0.

Common Blocks


      Notes: Use ellipsoid,set=name to set working ellipsoid. Uses
      T. Vincenty's method. Converted to IDL from FORTRAN code at


        lon1 = 144.42486788D0 & lat1 = -37.95103341D0
        lon2 = 143.92649552D0 & lat2 = -37.65282113D0
        ell_ll2rb, lon1, lat1, lon2, lat2, dist, azi1, azi2
        help, dist, azi1, azi2
        dist = 54972.271 meters
        azi1 = 306.86816 deg
        azi2 = 127.17363 deg
      Reference: Direct and Inverse Solutions of Geodesics on the
      Ellipsoid with Applications of Nested Equations.
      T. Vincenty, Survey Review XXII, 176, April 1975. p 88-93.
      The Vicenty formulae should be good over distances from a few
      cm to nearly 20,000 km with millimeter accuracy.
      ell_rb2ll is inverse.
      ll2rb is spherical version.

Modification History

      R. Sterner, 2001 Sep 04
      R. Sterner, 2002 May 01 --- Generalized ellipsoid.
      R. Sterner, 2006 Jan 10 --- Fixed minor error noted by Bob Jensen.
      R. Sterner, 2006 Feb 07 --- Added to help text to avoid 0 distance.
      R. Sterner, 2006 Mar 19 --- Added reference to help text.
      R. Sterner, 2010 May 04 --- Converted arrays from () to [].
      R. Sterner, 2011 Apr 26 --- Handled point 2 EQ point 1 (finally).
      R. Sterner, 2011 Apr 26 --- Cleaned up the code some.
  Copyright (C) 2001, 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.

© 2020 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us