How to get the position of the vehicle (geographical coordinates of the vehicle) in MOSAIC during the simulation. #393
Replies: 1 comment
-
Hello @Jean-Tshibangu-jtm, The error that SUMO is printing relates to something different. The command at question is relating to a state change (https://sumo.dlr.de/docs/TraCI/Change_Vehicle_State.html), e.g., when you call I'm assuming that you're using a flows within a SUMO route-file to spawn the vehicles. But to further assist you I would need to know more about the scenario and applications. So to summarize Let me know if these hints help you or provide some further information on your setup. |
Beta Was this translation helpful? Give feedback.
-
How to get the position of the vehicle (geographical coordinates of the vehicle) in MOSAIC during the simulation.
My idea is to check whether the geographical position of the vehicle belongs to a geographical zone, in order to trigger an event.
I'm sending you a few lines of code that I've written, but on the SUMO side there are errors (including roads).
GeoPoint currentPosition = getOs().getPosition();
I used this MOSAIC interface : import org.eclipse.mosaic.lib.objects.road.IRoadPosition;
Thank you for your help.
Beta Was this translation helpful? Give feedback.
All reactions