Purpose |
Determines the azimuth that the first point bears to the second.
|
Author | Date of code (original) | Updated on | Date of page (original) | Updated on |
Bill Thoen bthoen@ctmap.com |
29Dec2000
|
29Dec2000
|
5Jan2001
|
10Jan2001
|
Restrictions on use |
This module is distributed under the terms of the
Lesser GNU General Public License. Restrictions on the use of this
work in a commercial application or derivative work is described in
the Lesser GNU General Public License page at:
http://www.fsf.org/copyleft/lesser.html
|
Description |
Returns the azimuth that the first point bears to the second along
the great circle route between the two points. Points must be
decimal degrees of Latitude and Longitude.
|
External resources |
none
|
Declare statement of sub_function. Include in your program. Copy/Paste if needed. |
declare function GreatCircleAzimuth ( byval fLon0 as float, 'Origin longitude byval fLat0 as float, 'Origin latitude byval fLon1 as float, 'Destination longitude byval fLat1 as float 'Destination latitude ) as float |
Returned value(s) (function only) |
Azimuth in decimal degrees
|
Other required declare statement(s). Include in your program. Copy/Paste if needed. |
include "GC_Azimuth.def" include "GC_Constants.def" '(Optional for caller) |
MapBasic Code. Copy/Paste if needed.
|
View code in separate window |
Availability for download |
GreatCircleFn.zip |
Example |
dim fLat0, fLon0, fLat1, fLon1 as float dim fAzimuth as float fLat0 = 40 fLon0 = -105 fLat1 = 42 fLon1 = -72 fAzimuth = GreatCircleAzimuth (fLon0, fLat0, fLon1, fLat1) |
Comments |
|
See also |
GreatCircleCoordinates( ) GreatCircleDistance( ) |