riebl / artery

OMNeT++ V2X simulation framework for ETSI ITS-G5
GNU General Public License v2.0
202 stars 128 forks source link

Get the exact number of sent message from services #300

Closed denkipez closed 4 months ago

denkipez commented 12 months ago

Dear Riebl,

I've been working on the mtits2017 scenarios, and i would like to know how could i get the exact number of sent message by the service. Actually i got the number of messages sent when the service has been called but it doesn't take into count the number of messages are sent to every vehicles in the zone. Do you know how i might change this ?

I did sum every messages sent and received messages, and there is way more received messages than sent message. Which leads to a loss rate way higher than 1.

Thank you for your help!

fysch commented 12 months ago

Hi, since most messages are sent as broadcast, the message is only sent once but received by multiple vehicles. Therefore, you can't just divide these numbers to get the loss rate.

I suspect with "in the zone" you mean the maximum transmission range? If you know the maximum transmission range (in meters) of your radio, you could use the SeeThroughSensor to get the number of vehicles in range.

denkipez commented 11 months ago

Dear Fysch,

Thank you for your answer !

Yes, the "zone" was the maximum transmission range, but each message has a request that tells the range of the zone where vehicles will receive the message.

How do i enable the SeeThroughSensor ? Will the output be a vector that tells every middleware update the number of vehicle in the transmission range?

fysch commented 11 months ago

each message has a request that tells the range of the zone where vehicles will receive the message.

I'm assuming you send a GeoBroadcast and here you mean the destination area of your request? This destination area will most likely be different from the maximum transmission range of your radio. Please see the ETSI EN 302 636-4-1 if you want to know how GeoBroadcast works in detail.

How do i enable the SeeThroughSensor ? Will the output be a vector that tells every middleware update the number of vehicle in the transmission range?

Have a look at the example scenario in scenarios/artery. With the sensors.xml file, you can equip vehicles with different kinds of sensors. Further configuration of those sensors is done in the omnetpp.ini file. You also need to familiarize yourself with the EnvironmentModel. The sensor will get you a list of vehicles that are within the defined sensor range.

riebl commented 11 months ago

I usually record the vehicle positions along with transmission and reception events for calculating the loss or reception rates. The recorded OMNeT++ vector files can be processed with a Python script, for example. For each transmission event, I can look up the vehicles within a (theoretical) maximum transmission range in this data set. Then you only need to further look up the number of receptions for this particular transmission. Admittedly, this is a little bit of post-processing effort but I don't see how we could directly record such a metric with OMNeT++.