veins

Computing End-To-End Delay in Veins

做~自己de王妃 提交于 2019-12-02 06:49:38
I have read a bunch of posts on SO regarding the computation of end-to-end delay in Veins, but have not found an answer to be fulfilling in explaining why the delay is seemingly too low. I am using: Veins 4.7 Sumo 0.32.0 Omnetpp 5.3 Channel switching is turned off. I have the following code, sending a message from the transmitting node: if(sendMessage) { WaveShortMessage* wsm = new WaveShortMessage(); sendDown(wsm); } The receiving node computes the delay using the wsm creation time, but I have also tried setting the timestamp on the transmitting side. The result is the same. simtime_t delay =

Transmission of vehicular status in Veins

允我心安 提交于 2019-12-01 15:30:50
I want to transmit a given car's vehicular data such as it's vType , instantaneous speed and position to a RSU in a scenario in Veins. How can I obtain the data from SUMO and send it through MiXiM methods to an RSU node? user4786271 To achieve your goal you have to use the TraCIMobility component of Veins . You can do that by first getting a pointer to that component in the initialize() method of your node cModule *tmpMobility = getParentModule()->getSubmodule("veinsmobility"); mobility = dynamic_cast<Veins::TraCIMobility*>(tmpMobility); ASSERT(mobility); Once you have the mobility component

Transmission of vehicular status in Veins

左心房为你撑大大i 提交于 2019-12-01 13:34:45
问题 I want to transmit a given car's vehicular data such as it's vType , instantaneous speed and position to a RSU in a scenario in Veins. How can I obtain the data from SUMO and send it through MiXiM methods to an RSU node? 回答1: To achieve your goal you have to use the TraCIMobility component of Veins . You can do that by first getting a pointer to that component in the initialize() method of your node cModule *tmpMobility = getParentModule()->getSubmodule("veinsmobility"); mobility = dynamic

Calculating distance between cars nodes VEINS

会有一股神秘感。 提交于 2019-12-01 13:10:39
问题 I am new to VEINS and trying to implement weighted p-persistence inside MyVeinsApp.cc. Distance between the sending node and receiving is used in that formula. I saw the 2 functions below. virtual Coord& getSenderPos(); virtual const Coord& getSenderPos() const {return const_cast<WaveShortMessage*>(this)->getSenderPos();} Should I use one of those methods to calculate the distance between nodes? Please advise on the best approach. 回答1: For the distance you obviously need the two positions.

Model error: ASSERT: condition (intersectAt.size() % 2) == 0 false in function calculateAttenuation, veins/modules/obstacle/Obstacle.cc

戏子无情 提交于 2019-12-01 10:03:39
问题 I use Veins-4a2 and I have modified the scenario of the demo example. When I executed the simulation, I had this error: Error in module (Veins::ObstacleControl) RSUExampleScenario.obstacles (id=2) at event #22, t=0.037209: Model error: ASSERT: condition (intersectAt.size() % 2) == 0 false in function calculateAttenuation, veins/modules/obstacle/Obstacle.cc line 127. Why this error was happened? Can you please help me to 回答1: There is a known bug in Veins versions up to 4.4, where sometimes a

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

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

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