Solved: what is wrong with this LatLong->Distance code? A Trigonometry "feature".
|
10-12-2016, 09:46 PM
(This post was last modified: 10-12-2016 11:05 PM by StephenG1CMZ.)
Post: #3
|
|||
|
|||
RE: Can you see what is wrong with this LatLong->Distance code?
Thank you for taking the time to look at this.
When I first saw your code I was thinking the lower-case Sin was exact and avoiding a rounding error - but it doesn't fix this example, which is still 1 km rather than 54 km. For spherical calculations I usually use an average of polar and equatorial radius, (actually. (2a+b)/3), or repeat the calculations for both - but that detail isn't significant. Example data: http://www.ga.gov.au/geodesy/datums/vinc...nverse.jsp Update: a missing atan2 call is added - the reported distance is still 1 km. Actually, that is probably just equivalent to the previous line. Code:
Stephen Lewkowicz (G1CMZ) https://my.numworks.com/python/steveg1cmz |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)