Hi,
This is to same like a laser device. Laser device is better, because the light ray is more coherent, and will be an easier to obtained big distance. The problem their can be the noise, from son, from lamp, from headlight. To reduce this signal you must use a more intelligent sensor. If you use industrial this problem is solve. If you make own, you must use the impulse mode with auto calibration. The bigger problem is if you have two cars with distance small that car length. In this case your sensor will detect front of the first car, and rear of the second. If you want to solve this problem, then the task is a more difficult. One way, but is not very easy is to use optical recognition. Second is to use RFID tags, but this is ....not very accuracy, because depend from the car position, and weather you can have a different distance to tag reading, but if you get starting time and ending time, and give the average between to car time, the error will be a small.