I calculated the free-space path loss using Python, so make a note to remember
Only math is used, so if Python is included, nothing in particular
Calculate free-space path loss in Python. The unit is ** dB ** What is free-space path loss?
def freespace_loss(distance, frequency):
#frequency is frequency(Hz)
#distance is meters(m)
light_speed = 300000000.0 # m/s
return 20 * math.log10((4.0 * math.pi * distance)/(light_speed/frequency))
#Frequency 2 at a distance of 100 meters.For 412GHz
print freespace_loss(100, 2.412 * 1000000000) # => 80.0893182554 dB
Recommended Posts