1Geo::Forward(3)       User Contributed Perl Documentation      Geo::Forward(3)
2
3
4

NAME

6       Geo::Forward - Calculate geographic location from lat, lon, distance,
7       and heading.
8

SYNOPSIS

10         use Geo::Forward;
11         my $obj = Geo::Forward->new(); # default "WGS84"
12         my ($lat1,$lon1,$faz,$dist)=(38.871022, -77.055874, 62.888507083, 4565.6854);
13         my ($lat2,$lon2,$baz) = $obj->forward($lat1,$lon1,$faz,$dist);
14         print "Input Lat: $lat1  Lon: $lon1\n";
15         print "Input Forward Azimuth: $faz\n";
16         print "Input Distance: $dist\n";
17         print "Output Lat: $lat2 Lon: $lon2\n";
18         print "Output Back Azimuth: $baz\n";
19

DESCRIPTION

21       This module is a pure Perl port of the NGS program in the public domain
22       "forward" by Robert (Sid) Safford and Stephen J. Frakes.
23

CONSTRUCTOR

25   new
26       The new() constructor may be called with any parameter that is
27       appropriate to the ellipsoid method which establishes the ellipsoid.
28
29         my $obj = Geo::Forward->new(); # default "WGS84"
30

METHODS

32   initialize
33   ellipsoid
34       Method to set or retrieve the current ellipsoid object.  The ellipsoid
35       is a Geo::Ellipsoids object.
36
37         my $ellipsoid=$obj->ellipsoid;  #Default is WGS84
38
39         $obj->ellipsoid('Clarke 1866'); #Built in ellipsoids from Geo::Ellipsoids
40         $obj->ellipsoid({a=>1});        #Custom Sphere 1 unit radius
41
42   forward
43       This method is the user frontend to the mathematics. This interface
44       will not change in future versions.
45
46         my ($lat2,$lon2,$baz) = $obj->forward($lat1,$lon1,$faz,$dist);
47
48       Note: Latitude and longitude units are signed decimal degrees.   The
49       distance units are based on the ellipsoid semi-major axis which is
50       meters for WGS-84.  The forward and backward azimuths units are signed
51       degrees clockwise from North.
52

TODO

54       Add tests for more ellipsoids.
55

BUGS

57       Please log on RT and email to the geo-perl email list as well as the
58       author.
59

SUPPORT

61       DavisNetworks.com supports all Perl applications including this
62       package.
63

LIMITS

65       No guarantees that Perl handles all of the double precision
66       calculations in the same manner as Fortran.
67

AUTHOR

69         Michael R. Davis qw/perl michaelrdavis com/
70         CPAN ID: MRDVT
71

LICENSE

73       Copyright (c) 2011 Michael R. Davis (mrdvt92)
74
75       This library is free software; you can redistribute it and/or modify it
76       under the same terms as Perl itself.
77

SEE ALSO

79       Similar Packages
80
81       Geo::Distance, Geo::Ellipsoid
82
83   Opposite Packages
84       Geo::Inverse
85
86   Building Blocks
87       Geo::Ellipsoids, Geo::Constants, Geo::Functions
88
89
90
91perl v5.28.1                      2011-12-10                   Geo::Forward(3)
Impressum