If I know the coordinates at which RSUs will be placed in SUMO, How do I convert it to coordinates of omnet++?
I know that SUMO has a different coordinate system than omnet. Should I convert it offline (before starting simulation) using the equations used in the internal function "traci2omnet"? I tried this but seems inaccurate.
I tried also to create a junction at the position of the RSU in sumo, retrieve the location of this junction in omnet then place the RSU at the same coordinates. But is it possible to do such scenario while running the simulatin(during initialization for example)?
Does any one know the best solution?
SUMO and OMNeT++ use different coordinate systems, which is why helper functions like traci2omnet
are used to transform points from one coordinate system into the other. In Veins 4.6, the best parameters for this transformation are determined online, while the simulation is running. On the plus side, for the same scenario these parameters will always be the same.
Thus, an easy way forward is to alter any car's application to output the results of a coordinate transformation as soon as it is created in the simulation. The result of this conversion can then be used as the positions for RSUs. As long as the scenario remains unmodified, the positions will be correct.
A more involved (but more robust) solution is to create RSUs modules in the OMNeT++ simulation on the fly (much like car modules are created on the fly), based on objects that exist in the SUMO simulation. Such objects might be SUMO "point of interest" objects. In this solution, as soon as the OMNeT++ simulation connects to SUMO it could query the position of all points of interest, transform the positions to the right coordinate system, and instantiate one RSU at each position.