Thursday 13 February 2020

python - Formula for coordinates (lat, lon), azimuth and distance.


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



Answer



If the unknown points are on the specified circles, and if you assume a simple circular reference surface (a sphere, not an ellipsoid), then it is easy to get the angle at A from AC to the unknown points:


angle = ctd / scd, where


ctd is your so-called cross-track distance (what I'd call arc distance), and



scd is your small-circle distance away from A


Then you "just" calculate the new coordinates of unknown point, U, say:


coordsU = traverse (coordsA, azimAC + angle, scd), where


coordsA are coordinates at A,


azimAC is azimuth AC, (conveniently, you already have this in radians),


angle and scd are as above,


traverse is the appropriate function for the so-called "direct" problem of spherical trigonometry -- for now, left as a separate exercise for you to research, or already available from some library.


No comments:

Post a Comment

arcpy - Changing output name when exporting data driven pages to JPG?

Is there a way to save the output JPG, changing the output file name to the page name, instead of page number? I mean changing the script fo...