A method of operating a traffic sensor to define ranges of centers of
traffic lanes from the traffic sensor is described. The method comprises
a) providing a set of lane center variables representing the ranges of
the centers of the traffic lanes from the traffic sensor; b) initializing
each lane center variable in the set of lane center variables to have an
associated starting range value; and then, c) updating the set of lane
center variables by, for each vehicle in a plurality of vehicles, i)
detecting the vehicle, ii) determining an associated lane center variable
having an associated lane center range value closest to the vehicle; iii)
estimating a vehicle displacement from the associated lane center range
value, and iv) calculating a new lane center range value for the
associated lane centre variable using the associated lane center range
value and the vehicle displacement.