Fortran library for Geodesics  2.0
geodinverse.for
Go to the documentation of this file.
1 *> @file geodinverse.for
2 *! @brief A test program for invers()
3 
4 *> A simple program to solve the inverse geodesic problem.
5 *!
6 *! This program reads in lines with lat1, lon1, lon2, lat2 and prints
7 *! out lines with azi1, azi2, s12 (for the WGS84 ellipsoid).
8 
9  program geodinverse
10  implicit none
11 
12  include 'geodesic.inc'
13 
14  double precision a, f, lat1, lon1, azi1, lat2, lon2, azi2, s12,
15  + dummy1, dummy2, dummy3, dummy4, dummy5
16  integer omask
17 
18 * WGS84 values
19  a = 6378137d0
20  f = 1/298.257223563d0
21 
22  omask = 0
23 
24  10 continue
25  read(*, *, end=90, err=90) lat1, lon1, lat2, lon2
26  call invers(a, f, lat1, lon1, lat2, lon2,
27  + s12, azi1, azi2, omask,
28  + dummy1, dummy2, dummy3, dummy4, dummy5)
29  print 20, azi1, azi2, s12
30  20 format(1x, f20.15, 1x, f20.15, 1x, f19.10)
31  go to 10
32  90 continue
33 
34  stop
35  end
program geodinverse
A simple program to solve the inverse geodesic problem.
Definition: geodinverse.for:9