Coastal & Marine Geology InfoBank

Home FACS Activities Atlas Geology School Related Sites More

USGS InfoBank program -- getdistance

Skip navigational links
Loading
InfoBank Programs: by Name   by Topic  
Expanded Description
Topic Description
Name
getdistance
Synopsis
/infobank/programs/share/getdistance.for
Description
  Subroutine to determine the distance (in meters) 

  between two pairs of positions.
       
USAGE
  "a" = argument, "r" = referenced, "s" = set

  
  call getdistance                      (with the following arguments)
         Position1x                  [variable r*8 a]
         Position1y                  [variable r*8 a]
         Position2x                  [variable r*8 a]
         Position2y                  [variable r*8 a]
         Distance                    [variable r*8 sr]
    
SUBROUTINES
  typenav             (shared DAPS external routine)

    
LIMITATIONS
  Positions can be either UTMx/UTMy pairs or Lat/Long pairs.

  One position CAN NOT be UTMs with the other being Lat/Long.
  Both UTM pairs are assumed to be based on the same UTM zone.
  UTM positions within 360 meters of 0d lat and 0d long will be
      interpreted as lat/longs not UTMs.
  Lat/Longs may be on opposite sides of the International Date Line.
  Longitudes must be between +/- 180.0
  Identical input pairs results in a distance value of 0.0
    
AUTHOR
  Clint Steele       3/16/93

  Michael Hamer      8/14/97   made call to geoutm instead of sphere calc.
                               for determining distance.

    
Reads
Writes
Opens
Calls
      call typenav (Position1x, Position1y,
     *              Position2x, Position2y,
     *              Temporary1x, Temporary1y,
     *              Temporary2x, Temporary2y,
     *              DataType)
              call geoutm (1, Latitude1, Longitude1,
     *               UTMX1, UTMY1, Zone1)
              call geoutm (1, Latitude2, Longitude2,
     *               UTMX2, UTMY2, Zone2)
                  call geoutm (1, Latitude2, Longitude2,
     *               UTMX2, UTMY2, Zone1)
                  call geoutm (1, Latitude2, Longitude2Temp,
     *                UTMX2, UTMY2, Zone1)

Skip footer navigational links

Coastal and Marine Science Centers:  Pacific   St. Petersburg   Woods Hole  
InfoBank   Coastal and Marine Geology Program   Geologic Information   Ask-A-Geologist   USGS Disclaimer  


Accessibility FOIA Privacy Policies and Notices

Take Pride in America logo USA.gov logo U.S. Department of the Interior | U.S. Geological Survey
URL: http://walrus.wr.usgs.gov/infobank/programs/share/getdistance.doc.html
Page Contact Information: InfoBank staff
Page Last Modified: Mon Sep 16 03:36:56 PDT 2013  (chd)