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
27       The new() constructor may be called with any parameter that is appro‐
28       priate to the ellipsoid method which establishes the ellipsoid.
29
30         my $obj = Geo::Forward->new(); # default "WGS84"
31

METHODS

33       ellipsoid
34
35       Method to set or retrieve the current ellipsoid object.  The ellipsoid
36       is a Geo::Ellipsoids object.
37
38         my $ellipsoid=$obj->ellipsoid;  #Default is WGS84
39
40         $obj->ellipsoid('Clarke 1866'); #Built in ellipsoids from Geo::Ellipsoids
41         $obj->ellipsoid({a=>1});        #Custom Sphere 1 unit radius
42
43       forward
44
45       This method is the user frontend to the mathematics. This interface
46       will not change in future versions.
47
48         my ($lat2,$lon2,$baz) = $obj->forward($lat1,$lon1,$faz,$dist);
49

TODO

51       Add tests for more ellipsoids.
52

BUGS

54       Please send to the geo-perl email list.
55

LIMITS

57       No guarantees that Perl handles all of the double precision calcula‐
58       tions in the same manner as Fortran.
59

AUTHOR

61       Michael R. Davis qw/perl michaelrdavis com/
62

LICENSE

64       Copyright (c) 2006 Michael R. Davis (mrdvt92)
65
66       This library is free software; you can redistribute it and/or modify it
67       under the same terms as Perl itself.
68

SEE ALSO

70       Net::GPSD Geo::Spline Geo::Ellipsoid Geo::Ellipsoids
71
72
73
74perl v5.8.8                       2006-12-09                   Geo::Forward(3)
Impressum