Distance and Azimuth ( Spanish version)


Program objectives

This computer program has been developed to calculate the distance and the azimuth for two points over the earth. If Earth is considered like a sphere, the distance between two points over the earth, is measured along the maximum circle defined by these points. The azimuth can be also computed for these two points as the angle, measured from North and clockwise, between the meridian passing by the first point and the maximum circle, which connects the first and the second points.

Program description

The DistAz program is enclosed into a ZIP file named "DistAz.zip". When you have got the ZIP file and you have uncompressed this file, you have the files named DistAz.exe and input.dat. The file DistAz.exe contains a program (in FORTRAN code for PC) to computate the distance and azimuth, for two points over the earth. The file named input.dat is an ASCII file with the latitude and longitude of the computation points. At the final of the computation, we obtain a new file named output.dat which contains the results: the distance or azimuth, for the points listed in the file input.dat. The file input.dat has the format:

NOPTION
LAT1, LONG1, LAT2, LONG2
. . . . . . . . . . .
. . . . . . . . . . .
. . . . . . . . . . .

NOPTION = With value 1 selects the computation of the distance. With value 2 selects the computation of the azimuth. The epicentral distance or the azimuth, are computed for each pair of points listed in the file input.dat.
LAT1, LONG1 = Geographical coordinates of the first point of the pair, latitude in degrees (north positive) and longitude in degrees (east positive).
LAT2, LONG2 = Geographical coordinates of the second point of the pair, latitude in degrees (north positive) and longitude in degrees (east positive).