Reputation: 33
Thank you for reading the question. I have a simple query that when vehicles are broadcasting a message then the event happened and re-routing of vehicles are being done. But if I want to store the information of a vehicle such as nodeId, Speed, Direction, distance in RSU and other neighboring vehicles What is the correct way to do that?
I understand all the files of tic toc and veins itself. i found Passedmsg is there cArray, cparlist and so many things. but I really want to achieve this thing in a correct way.
Please Help me. i know it may be silly question but I have no clue where to make cchanges for storage of the message content.
Upvotes: 0
Views: 137
Reputation: 6943
As you saw in the answer to the question you quoted, getAngleRad()
returns the vehicle's heading in Radians, not degrees.
Note that, as of Veins 5.0, the same functionality is achieved by calling getHeading()
and then calling getRad()
on the result.
If you want to know whether the two angles are from vectors pointing into the same or opposite directions, you could check whether their difference is bigger than 0.5 Pi radians (90 degrees).
See an answer on for how to calculate the smallest difference between angles for possible ways to achieve that.
Upvotes: 2