Fortran library for Geodesics
1.37
|
This is a Fortran implementation of the geodesic algorithms from GeographicLib. This is a self-contained library which makes it easy to do geodesic computations for an ellipsoid of revolution in a Fortran program. It is written in Fortran 77 (avoiding features which are now deprecated) and should compile correctly with just about any Fortran compiler.
The Fortran library is part of GeographicLib which available for download at
as either a compressed tar file (tar.gz) or a zip file. After unpacking the source, the Fortran library can be found in GeographicLib-1.31/legacy/Fortran. The library consists of the file geodesic.for.
The interface to the library is documented via doxygen in the source file. To access this, see geodesic.for.
Also included are 3 small test programs:
Here, for example, is geodinverse.for
To compile, link, and run this, you would typically use
f95 -o geodinverse geodinverse.for geodesic.for echo 30 0 29.5 179.5 | ./geodinverse
These sample programs can also be built with the supplied cmake file, CMakeLists.txt, as follows
mkdir BUILD cd BUILD cmake .. make echo 30 0 29.5 179.5 | ./geodinverse
include "geodesic.inc"in declaration section of your subroutines.