LoginSignup
4
4

More than 5 years have passed since last update.

Pythonで自由空間伝搬損失を計算する

Last updated at Posted at 2015-01-13

概要

Pythonを使って自由空間伝搬損失を計算したので、忘れないためにメモ

事前準備

使用するのはmathのみなので、Pythonが入っていれば、特になし

目的

Pythonで自由空間伝搬損失を計算する。単位はdB

自由空間伝搬損失とは?

ソース


def freespace_loss(distance, frequency):
    # frequencyは周波数(Hz)
    # distance はメートル(m)
    light_speed = 300000000.0 # m/s
    return 20 * math.log10((4.0 * math.pi * distance)/(light_speed/frequency))

# 100メートルの距離で周波数が2.412GHzの場合
print freespace_loss(100, 2.412 * 1000000000) # => 80.0893182554 dB
4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4