Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[sumo-user] Distance to stop-line including a lane-split

Hi all,

I would like to compute the distance from the induction loop at line x=59 to
the *stop-line* at line x =13.6.
All is explained in the image below.
I have a method to obtain the distance, but it might not be the most
systematic / fool-proof way of computing it.

*My current method*
distance_to_stop_line = traci.lane.getLength(lane_id_after_split) -
traci.inductionloop.getPosition('loop_id_at_x=43.6')
This method seems to work fine. 
I do this for both loops at x=59 and x =43.6 and then sum these distances.
But most importantly I need to add a hardcoded length of the lane-split.
Only now I have the actual distance to the stop-line and the loop at x=59.

*Using (x,y) points from the GUI*
I saw some issues on the forum with respect to lane lengths which where
modified in NETEDIT and  wrongly shown in the SUMO-GUI.
Therefore, I only used geometry points (red dots in NETEDIT) and changed
their (x,y) coordinates to set the desired length of lanes.
I use SUMO V1_0_1.
Is it fine to use the (x,y) coordinates as obtained in the SUMO-GUI and used
in my image below ?

*Possible solutions*
1. Can I get the (x,y) coordinates of the induction loops and stop-line ?
So I can use Pythagoras' theorem to compute the distance between them.

2. Can I get the actual length of "lane_split" as shown in the figure below.

3. Is there a third option which I did not see ? 

Thanks in advance for any help,

Lourens

<http://sumo-user-mailing-list.90755.n8.nabble.com/file/t315/detector_distances_forum.png> 




--
Sent from: http://sumo-user-mailing-list.90755.n8.nabble.com/


Back to the top