1

I've been working on omnet++ veins to simulate a highway scenario and the relationship between vehicle and RSU(roadside unit).I'm trying to figure out how to dynamically change the bitrate of my RSU setting

*.**.nic.mac1609_4.bitrate = 6Mbps

Above is the original setting of bitrate,I'm hoping to adjust this value based on the distance between RSU and vehicle.Are there any module I can use to get the distance and furthermore respectively manipulate the bitrate between different vehicle nodes and RSU nodes

lu555
  • 43
  • 1
  • 7

1 Answers1

0

In Veins 4.7.1, you can set the modulation and coding scheme (MCS), so - by extension - the bitrate, via a call to the setMCS method of the MAC layer. Calculating the distance is supported via a method of the Coord class which is used to represent node positions.

Christoph Sommer
  • 6,893
  • 1
  • 17
  • 35
  • Sir,in the veins example code,where should I add these module to manipulate the situation I want,should I add a new .cc file? – lu555 Dec 18 '18 at 10:09