I am using veins to simulate localization of vehicle. RSU send a message in a fixed interval (100ms) and the vehicle recieving this wants to estimate the distance from RSU using Time of Arrival technique. I use bsm->getArrivalTime()
and bsm->getTimestamp()
to get the time at which the message arrives at the vehicle and starts transmission from RSU respectively. It turns out that the times really are as measured when the message is in the respective application layer; However what is desired is the time at which the message leaves the physical layer of the RSU and arrives at the physical layer of the vehicle.I am attaaching the event log to make my problem more clear
In the log what I want to measure is #9833 and #9832, contrary to what the bsm->get...()
measures is #9828 and #9842.
Asked
Active
Viewed 55 times
1

prithvi shenoy
- 11
- 2
-
You should be able to modify the source code of Veins to include these time stamps with every message. – Christoph Sommer Sep 24 '18 at 13:10