Answers to: Relation between GPS and cartesian coordinateshttps://help.openstreetmap.org/questions/42589/relation-between-gps-and-cartesian-coordinates<p>Hi,
I'm trying to create a layer with nodes representing a route. This occurs indoor so there's no GPS info along the way.
I have a starting point with its GPS coordinates in OSM. That point corresponds to a cartesian point, say, (0,0). At a few points I calculate the variation of the cartesian coordinates having then several (x1,y1), (x2,y2), etc. points in meters.
I'd like to calculate the GPS coordinates of that points knowing that the initial point (0,0) is the initial GPS coordinate.</p>
<p>I've read about <a href="http://rosettacode.org/wiki/Haversine_formula">haversine formula</a> about how to calculate distances between two GPS coordinates but I don't know how to do the inverse action.</p>
<p>Can anyone shed some light?</p>enSun, 26 Apr 2015 10:02:33 +0100Answer by SimonPoolehttps://help.openstreetmap.org/questions/42589/relation-between-gps-and-cartesian-coordinates/42600<p>Well the basic problem is that the world isn't flat.</p>
<p>You need to <a href="http://en.wikipedia.org/wiki/Map_projection">project</a> your <a href="http://en.wikipedia.org/wiki/World_Geodetic_System">coodinates on a spheroid</a> on to a plane. There are multiple ways to do this as the wikipedia article points out, but I suspect what you would want to use is the <a href="http://en.wikipedia.org/wiki/Mercator_projection">mercator projection</a>, likely scaled to whatever you are using as a local grid. </p>
<p>To get the WGS84 (GPS) coordinates back from your cartesian coordinates you have to naturally do the inverse. </p>SimonPooleSun, 26 Apr 2015 10:02:33 +0100https://help.openstreetmap.org/questions/42589/relation-between-gps-and-cartesian-coordinates/42600