0

I am trying to plot RSU based on GPS coordinates. Is there any easy way to do it? I have written a program where I convert GPS coordinates to cartesian but I get cartesian points on basis of reference GPS coordinates which doesn't get placed nicely in omnet.

Sam1324
  • 387
  • 2
  • 13
  • Note that different parts of Veins use different coordinate systems. Your data source likely uses lon/lat coordinates, SUMO uses one kind of map projection (see the `projParameter` in your .net.xml) to transform this to cartesian, then Veins transforms these coordinates to its own system (see the `traci2omnet` method) when executing the simulation. The Veins FAQ has an entry on "Why are the coordinates returned by TraCI methods different from the ones I see in the GUI?" that goes into more detail – Christoph Sommer May 16 '17 at 11:43
  • @ChristophSommer Thank you for the comment, I will look into it. – Sam1324 May 16 '17 at 15:55

2 Answers2

1

Yes, you can use the Gatcomsumo tool. It includes a coordinates conversor from different coordinate systems. In your case, you need to convert from Geodetic or UTM to OMNeT++. The coordinates you get is written into the omnetpp.ini file.

johnnyRose
  • 7,310
  • 17
  • 40
  • 61
0

So this is what I am doing now.

I cannot write the code but I can give a general Idea. We do have boundary GPS locations of the map. Now to change a GPS Latitude and longitude to (x,y) cartesian. Find the distance between latitude to latitude and longitude to longitude by this we get (x,y) co-ordinate and this can be used to plot RSU.

Sam1324
  • 387
  • 2
  • 13