# convert GPS to x,y using reference node

i am using sensor nodes and their antenna to calculate GPS coordinates as notation of (degrees/minutes/seconds), i have some question of how to do these things:

1. how can i convert latitude and longitude to X,Y coordinate, then plot X,y points on a scale, also need to specify one node as reference one to calculate xy related to it.

2. what is the Euclidean distance between GPS position, or it is applicable to calculate distances between the converted XY points ?

3. i need equations to convert GPS to XY, please any helpful links !!

• Welcome to gis.SE. Is the problem you are trying to solve simply how to get from degrees, minutes, seconds format to decimal degrees? Almost all GIS software can do that, but you just need to divide seconds by 60 and add to minutes, then divide that by 60 and add to degrees. Apr 15 '13 at 23:11
• actually i need to convert gps coordinate to X,Y coordinate suitable to plot them on map and get their xy toward reference node
– H.H
Apr 16 '13 at 3:17
• So you convert to decimal degrees, subtract reference latitude and longitude from the latitude and longitude of each point, find the minimum and maximum latitude and longitude, then just scale it to fit on the map. I still don't understand what you're having trouble with. Can you edit your question to show what you've already done, and what isn't working the way you'd like it to? Apr 16 '13 at 3:54
• I'm not sure equations will help - if you don't understand the principles behind them, and you don't explain exactly what you are trying to do (e.g. what sort of map, what sensors, what you are trying to convey) then maths (with attendant assumptions) could easily provide a bad answer. An example of this is date-line calculations, which may or may not matter, but are hard to deal with in the "general" case. Apr 16 '13 at 21:13

## 1 Answer

If i understood question right see this one How to measure the accuracy of latitude and longitude?. So basicly take off that n+1 gps point from first, to get relative distance and then use 111km per degree to distance in meters. Center everything to 0 and you should get nice graph

To convert decimal degrees read this article in wikipedia

If you want to plot GPS data right place on map, you need to reproject data. Read more in wikipedia. Tools like proj4, postgis , gdal etc.

• no i am not interested at accuracy side rather than how to do conversion with equations.
– H.H
Apr 16 '13 at 10:55
• which one is problem ? decimal degrees or calculating relative ristance to first point ? Apr 16 '13 at 11:50