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 15:58:38 +0100Comment by SimonPoole on SimonPoole's answerhttps://help.openstreetmap.org/questions/42589/relation-between-gps-and-cartesian-coordinates#42604<p><a href="http://help.openstreetmap.org/users/647/sk53">@SK53</a> I suspect this maybe simply an arbitrary grid laid over the floor plan (or screen coordinates for what it is worth).</p>SimonPooleSun, 26 Apr 2015 15:58:38 +0100https://help.openstreetmap.org/questions/42589/relation-between-gps-and-cartesian-coordinates#42604Comment by SK53 on SimonPoole's answerhttps://help.openstreetmap.org/questions/42589/relation-between-gps-and-cartesian-coordinates#42603<p>For indoor mapping of this kind I would find a local co-ordinate system suitable for calculations in Cartesian geometry (such as OSGB (EPSG:27700 for UK) or CH-1903 or CH-1903+(for CH)). This is effectively what <a href="http://help.openstreetmap.org/users/2053/simonpoole">@SimonPoole</a> is suggesting.</p>SK53Sun, 26 Apr 2015 15:43:26 +0100https://help.openstreetmap.org/questions/42589/relation-between-gps-and-cartesian-coordinates#42603Answer 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