To the best of my knowledge, the cost associated with a wireless link following the ZigBee standard is calculated using the below formula.
C(l)= min(7, round(1/p(l)4) )
where p(l) is probability of successful packet delivery over the wireless link l.
The paper "Wireless Sensor Network With Perpetual Motes for Terrestrial Snail Activity Monitoring (http://ieeexplore.ieee.org/abstract/document/7954581/)" calculates it using the below formula.
p(l) = 1 - ((0.8/radio range) * distance between two nodes + rand (-0.1, 0.1))
Is it a correct way to obtain p(l) ?
Otherwise, how to obtain the probability of successful packet delivery (p(l) ) in the simulations?
Any help is highly appreciated. Thank you in advance.