omnet++

Calculate direction of a vehicle (Veins/Omnet++/Sumo)

别来无恙 提交于 2019-12-01 02:01:12
Is it possible to calculate(get) direction of vehicle in Veins(via TraCIMobility)? I want to know if two vehicles are traveling in opposing directions or not. I think I can do that via getAngleRad() method (if they are moving in the same direction they fall in the same quadrant and if moving opposite they are in opposite quadrants), but I am not sure if its correct. (Sub-Question: Also, what are the exact values that getAngleRad() would return for each quadrant?) Christoph Sommer You are correct: getAngleRad() returns the vehicle's heading in radians (from -pi up to, but excluding, +pi ). A

RSU placement in veins/SUMO

故事扮演 提交于 2019-12-01 00:41:21
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

How to access TraCI command interface from TraCIDemoRSU11p in Veins Car2X simulator?

旧街凉风 提交于 2019-11-30 22:04:11
I want to access the command interface of TraCI from the application layer of RSU model in Veins Source for OMNet++. But I am unable to find so. Can anyone please help me do so? Please note that I am not having TraciMobility as parent module in case of RSU Node. It is having only the BaseMobility which is what I want it to have. Now I want to access the command interface so that this RSU can perform the sumo instructions like change traffic light and get induction loop data. Veins 4.3 provides a TraCIScenarioManagerAccess helper class, which can be used to quickly get access to the class

end to end delay in Veins

余生长醉 提交于 2019-11-30 21:03:53
问题 I want to calculate end-to-end delay in Veins example scenario. I have already read old mails that are related to this topic but they don't provide a real solution for the problem. I used getCreationTime() and simTime() functions. The resulting delay is about 1.70*10^-4 . This delay doesn't make sense for me. It is supposed to be more. I need some help at this point. I take the creation time of macPkt by using mackPkt->creationTime() function and i extract simTime() from it for calculating

How to access TraCI command interface from TraCIDemoRSU11p in Veins Car2X simulator?

时光怂恿深爱的人放手 提交于 2019-11-30 17:51:14
问题 I want to access the command interface of TraCI from the application layer of RSU model in Veins Source for OMNet++. But I am unable to find so. Can anyone please help me do so? Please note that I am not having TraciMobility as parent module in case of RSU Node. It is having only the BaseMobility which is what I want it to have. Now I want to access the command interface so that this RSU can perform the sumo instructions like change traffic light and get induction loop data. 回答1: Veins 4.3

Vehicles Receive Beacon Messages outside RSU Range

五迷三道 提交于 2019-11-30 07:42:47
问题 I am working on Veins framework, inside OMNET++. I set the property of RSU inside .ned file as follow: @display("p=150,140;b=10,10,oval;r=90"); The tkenv shows a circle around RSU, but the vehicles received beacons outside the range (circle). How can I adjust the transmission range of RSU to the Circle? 回答1: Adding a display string tag of r is just adding a circle to the graphical output; it does not influence the simulation. If you define the "transmission range" as the point where the

Error while running example of the veins in the last step of the installation

痞子三分冷 提交于 2019-11-29 18:37:32
did the installation of the veins according to the tutorial of the site ( http://veins.car2x.org/tutorial/ ) using the operating system windows 10, but in the last step, when executing the omnetpp.ini of the example of the veins the code compiles but the execution in qtnev gives the following error: Help me please Cannot evaluate parameter ‘headerLength’: (omnetpp::cDoubleParlmpl)headerLength: Cannot cast from type double to integer – in module (Mac1609_4) RSUExampleScenario.rsu[0].nic.mac1609_4 (id=12), during network initialization This was introduced in a recent version of OMNeT++, which no

RoadId() from the BaseWaveApplLayer.cc (VEINS, OMNET++)

纵然是瞬间 提交于 2019-11-29 17:56:12
how can i get information such as roadid in order to use it as a new field for example in beacon messages from BaseWaveApplLayer.cc? best, Pavlos There is the class TraCICommandInterface which provides access methods for such data like getRoadId() . In the class TraCIDemo11p you can find an example how to get this information. It basically boilds down to performing the following steps: TraCIMobility* mobility = TraCIMobilityAccess().get(getParentModule()); TraCICommandInterface* traci = mobility->getCommandInterface(); TraCICommandInterface::Vehicle* traciVehicle = mobility-

Converting Veins Coordinates to GPS

感情迁移 提交于 2019-11-29 15:48:51
问题 I am using realistic street networks imported from OpenStreetMap for simulations with Veins, for example the Luxembourg scenario from Lara Codeca. Now, to prepare a visualisation (using Google Earth), I want to export the vehicle positions in the simulation from SUMO or OmNET coordinates to GPS coordinates. As material I have the OSM file used for generating the scenario, including the GPS positions of all nodes there. I was hoping to find a simple mapping from the simulation coordinates to

how to get start to build a veins application

只愿长相守 提交于 2019-11-29 12:31:34
I am new to veins and would like to use it. I have taken my time to learn omnetpp and SUMO. now I can use both successfully. I also downloaded and installed veins and the example works well. now I need to build my own application using veins. simply, I need to simulate a straight road where vehicles are moving and send messages to a single RSU. I can't find any documentation for veins or its example. can anybody help me to know what steps should I follow to do this? for example, which ned files should be created, how cars and RSUs are created, how to set the application of each node,etc. First