Fortran library for Geodesics  2.0
geoddirect.for
Go to the documentation of this file.
1 *> @file geoddirect.for
2 *! @brief A test program for direct()
3 
4 *> A simple program to solve the direct geodesic problem.
5 *!
6 *! This program reads in lines with lat1, lon1, azi1, s12 and prints out
7 *! lines with lat2, lon2, azi2 (for the WGS84 ellipsoid).
8 
9  program geoddirect
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 flags, omask
17 
18 * WGS84 values
19  a = 6378137d0
20  f = 1/298.257223563d0
21 
22  flags = 0
23  omask = 0
24 
25  10 continue
26  read(*, *, end=90, err=90) lat1, lon1, azi1, s12
27  call direct(a, f, lat1, lon1, azi1, s12, flags,
28  + lat2, lon2, azi2, omask,
29  + dummy1, dummy2, dummy3, dummy4, dummy5)
30  print 20, lat2, lon2, azi2
31  20 format(1x, f20.15, 1x, f20.15, 1x, f20.15)
32  go to 10
33  90 continue
34 
35  stop
36  end
program geoddirect
A simple program to solve the direct geodesic problem.
Definition: geoddirect.for:9