Skip to main content
. 2018 Dec 12;18(12):4399. doi: 10.3390/s18124399
Algorithm 9 Distance UCV to traffic light.
Input:u, c,
Result: Distance d to the end of the lane from current position
  • 1:

    DistanceUCVToTrafficLight(c,)

  • 2:

    for allldo

  • 3:

        if lid equals c then

  • 4:

            Point PlastPointOf(l)

  • 5:

        end if

  • 6:

    end for

  • 7:

    Calculate Euclidean distance dPxPyuxuy2

  • 8:

    returnd