在ns2中,对于20m的范围,Pt的值是多少

时间:2015-04-13 17:38:06

标签: ns2

我想知道如何设置范围传输的Pt传输功率值

Phy/WirelessPhy set Pt_ 0.2818  (gives my signal will travel upto 250m )

这段代码为250米,但是如果用于计算Pt的方法是20或30m呢? 请帮忙

2 个答案:

答案 0 :(得分:1)

距离的另一个例子:ns2.3x / tcl / ex / wpan / wpan_demo4b.tcl→→ 第61-77行:

# For model 'TwoRayGround'
set dist(5m)  7.69113e-06
set dist(9m)  2.37381e-06
set dist(10m) 1.92278e-06
set dist(11m) 1.58908e-06
set dist(12m) 1.33527e-06
set dist(13m) 1.13774e-06
set dist(14m) 9.81011e-07
set dist(15m) 8.54570e-07
set dist(16m) 7.51087e-07
set dist(20m) 4.80696e-07
set dist(25m) 3.07645e-07
set dist(30m) 2.13643e-07
set dist(35m) 1.56962e-07
set dist(40m) 1.20174e-07
Phy/WirelessPhy set CSThresh_ $dist(12m)
Phy/WirelessPhy set RXThresh_ $dist(12m

答案 1 :(得分:0)

?可以" 0.2818"是一个数学符号吗?

模拟文件中的示例:

cd [examples]/ && grep -R "Phy/WirelessPhy set Pt" *

Phy/WirelessPhy set Pt_ 0.3196e-5 ;#power needed to have 100m of distance

Phy/WirelessPhy set Pt_ 0.09588e-5 ;#power needed to have 30m of distance

Phy/WirelessPhy set Pt_ 0.281838

Phy/WirelessPhy set Pt_ 0.025

Phy/WirelessPhy set Pt_ 1

Phy/WirelessPhy set Pt_ 0.28    ;# transmitter signal power (Watt)

Phy/WirelessPhy set Pt_ 0.031622777        ;# Tx power (W)

Phy/WirelessPhy set Pt_ 7.214e-3

Phy/WirelessPhy set Pt_ 8.5872e-4    ;# 40m

Phy/WirelessPhy set Pt_ 1.33826e-3   ;# 50m

Phy/WirelessPhy set Pt_ 7.214e-3     ;# 100m

Phy/WirelessPhy set Pt_ 0.2818       ;# 250m

Phy/WirelessPhy set Pt_ 2.28289e-11  ;# 500m

Phy/WirelessPhy set Pt_ 1.1272        ;# 1000m transmission range