[GIS] Formula for coordinates (lat, lon), azimuth and distance.

coordinateslatitude longitudepythonspherical-geometry

I would like to know how to find a set of coordinates on a small circle some distance from another point.
circles

For example, lets say A = (39.73, -104.98) #Denver

B = (39.83, -106.06) #point approximately 50 nautical miles away from A along the great circle track to C

C = (40.75, -111.88) #Salt Lake City, approximately 323 nautical miles away from A

How do I get the set of orange coordinates when I don't know the angle but I do know the cross track distance?

For concreteness, lets say the outer points near B have a cross track distance of +- 30 nautical miles and the inner points have a cross track of +- 15nm.

And the points near C have a cross track of +- 25 nm.

Also I have an initial bearing from A to C of -1.34 #radians

Best Answer

There is no one formula to solve this problem on a spheroid (since it's a partial differential equation which can only be solved by iterative means), but the solution is a trivial implementation of the "direct" problem (given a point, a bearing, and a distance, locate a point). The US National Geodetic Survey has a web site with FORTRAN source (I converted an earlier version of this code to 'C' and Java without difficulty).

You'd need to determine if the cross-track distance should be a chord or an arc when calculating the change in bearing (inverse sine of distance/radius vs. a fraction of the 2*pi*radius perimeter).

EXAMPLE:

Assuming arc distance, the bearing changes 17.18873 degrees for 15nm, 34.37746 degrees for 30nm, and 4.43466 degrees for 25nm, so the problem becomes:

name    lat     lon     bearing distance
B+30    39.73   -104.98 -42.40  50
B+15    39.73   -104.98 -59.59  50
B       39.73   -104.98 -76.78  50
B-15    39.73   -104.98 -93.97  50
B-30    39.73   -104.98 -111.15 50
C+25    39.73   -104.98 -72.34  323
C       39.73   -104.98 -76.78  323
C-25    39.73   -104.98 -81.21  323

which solved to:

name    lat     lon 
B+30    40.344  -105.715
B+15    40.148  -105.917
B       39.916  -106.034
B-15    39.667  -106.057
B-30    39.425  -105.983
C+25    41.167  -111.778
C       40.758  -111.883
C-25    40.345  -111.945

which looks right in this plot:

enter image description here

Related Question