Generate UE and distances, Bases