One 360° IR source between the tracks and individual sensors outside each track. Position sensors with carpenters square aligned with track edge. Connect each to an interrupt then read system millis() or micros() on trigger. Lowest number wins by time difference of the two readings.