[OSM-dev] Code to find distance with JOSM eastNorth
Jonas Svensson
jonass at lysator.liu.se
Wed Jan 10 16:56:12 GMT 2007
I don't think there is much difference to the Haversine formula if
you apply degrees or radians, what matters most is if your math
functions uses degrees or radians. See for example
<http://en.wikipedia.org/wiki/Haversine_formula>.
/Jonas
On 9 Jan 2007 at 23:11, matthew-osm at newtoncomputing.c wrote:
> Hi,
>
> Similar to Nick's question, but not the same ;-).
>
> I'm trying to work out how to calculate the great circle distance between two
> nodes in JOSM, preferably using eastNorth coordinates. It seems like it should
> be quite easy - I think eastNorth coords are just angles in radians. Therefore
> it should be calculate the angle between the two nodes, and then multiply my
> 6372797 (radius of earth in metres). However, my maths gets a bit stuck here.
>
> Searching the Internet seems to imply that I should be using the Haversine
> Formula, but that is for Lat/Lon, not JOSM's eastNorth, from what I can tell.
>
> Any help would be appreciated!
>
> Thanks,
>
> --
> Matthew
>
> _______________________________________________
> dev mailing list
> dev at openstreetmap.org
> http://lists.openstreetmap.org/cgi-bin/mailman/listinfo/dev
More information about the dev
mailing list