Purpose |
Determines the coordinates of a point a given distance and bearing
along a great circle.
|
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 |
Calculates lat/lon coordinates from origin, azimuth and distance
from origin. Destination coordinates are returned in decimal
degrees. fDistance and fRadius must be in the same units.
|
External resources |
none
|
Declare statement of sub_function. Include in your program. Copy/Paste if needed. |
declare sub GreatCircleCoords ( byval fLon0 as float, 'Origin longitude byval fLat0 as float, 'Origin latitude byval fAzimuth as float, 'Azimuth byval fDistance as float, 'Distance byval fRadius as float, 'Radius of earth fLon1 as float, 'Destination longitude fLat1 as float) 'Destination latitude |
Returned value(s) (function only) |
|
Other required declare statement(s). Include in your program. Copy/Paste if needed. |
include "GC_Constants.def" include "GC_Coordinates.def" |
MapBasic Code. Copy/Paste if needed.
|
View code in separate window |
Availability for download |
GreatCircleFn.zip |
Example |
include "GC_Constants.def" include "GC_Coordinates.def" dim fLat1, fLon1 as float call GreatCircleCoords (-105, 40, 30, 25, EARTH_RADIUS, fLon1, fLat1) 'Now (fLon1, fLat1) are the coordinates of 'the point 25 miles bearing 30 degrees (NNE) 'from the origin at (-105,40). |
Comments |
|
See also |
GreatCircleAzimuth( ) GreatCircleDistance( ) |