Distance of UE from eNB can be calculated by knowing the values of T1 and T2.
T1 and T2 are the GT window available for the UE and it is known to eNB once it successfully decoded the Preamble Message.
{Tg( Guard Time ) – GT Window Left }
Time gives the Time delay from UE to eNB.
T1Diff = Tg-T1
T2Diff = Tg-T2
Since UE2 is far from eNB compared to UE1,
T2Diff > T1Dif
Now to calculate the UE Distance, eNB refers the available GT window after successfully decoding UE Preamble.From Physics,
Distance = Speed * Time
As we know the speed of Electromagnetic Spectrum is 3*(108 )meters per second.
UE 1 Distance = T1Diff * 3*(108 ) meters
Similarly,
UE 2 Distance = T2Diff * 3*(108 ) meters
The above equations will enable eNB to calculate UE distance.