M. Younan, S. Khattab, and R. Bahgat, "Evaluation of an Integrated Testbed Environment for The Web of Things," in International Journal On Advances in Intelligent Systems (IntSys), vol. 8, no. 3&4, pp. 467-482, Nov. 2015.
distance = sqrt((P * G * Gr) / (L * Pr)) * lambda / (4 * PI);
where p power transmitted, G transmitted gain Gr received gain lambda lambda = wavelength of the signal (m). L system loss, you can estimate distance by TDOA or TOA.