Calculate direction of a vehicle (Veins/Omnet++/Sumo)

后端 未结 1 1987
既然无缘
既然无缘 2020-12-18 15:44

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

1条回答
  •  执念已碎
    2020-12-18 16:46

    You are correct: getAngleRad() returns the vehicle's heading in radians (from -pi up to, but excluding, +pi). A value of 0 means the vehicle is heading east; a value of pi/2 means it is heading north; etc.

    0 讨论(0)
提交回复
热议问题