A real-time computer system to prevent head-on traffic collisions