Solved: what is wrong with this LatLong->Distance code? A Trigonometry "feature".
|
10-13-2016, 10:12 AM
(This post was last modified: 10-13-2016 10:25 AM by Guenter Schink.)
Post: #4
|
|||
|
|||
RE: Can you see what is wrong with this LatLong->Distance code?
(10-12-2016 09:46 PM)StephenG1CMZ Wrote: Thank you for taking the time to look at this.Sorry the lower case "sin" was not intentionally. But now I think we're coming closer. Don't know what really happens (a bug?). I added commands to print DLON and DLAT. And much to my surprise they showed up in DMS format. Consequently I removed the transformation to radians et voilá the result comes pretty close to what's expected. Code: EXPORT Haversine(LAT1,LON1,LAT2,LON2) It will happen on the command line too. Just enter "12°30' * PI / 180" the expression will stay in DMS mode. HTH, Günter ** That's obviously the reason why I didn't encounter the problem, as I entered the data in degrees format. Günter |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)