先感謝這位作者:『網路節點模擬』研究日誌 – 設定傳輸範圍

其實在作者的網頁上已寫的蠻清楚

在路徑 /ns-allinone-2.27/ns-2.27/indep-utils/propagation/ 中可以看到 threshold.cc 這個檔案

#g++  threshold.cc  -o threshold

執行之後,會看到一串似錯誤的訊息

#./threshold -m TwoRayGround -fr 2.4e+9 250

會出現一些訊息,最底下那行,即為我們所計算的距離

NS2_threshold.gif

將設定寫入 tcl 中

#設定trace file
set ns [new Simulator] ;#產生ns simulator
Phy/WirelessPhy set RXThresh_ 3.652e-10 ;#設定傳輸範圍為 250m

其他參考資料:

1.How can you set the communication radius in wireless nodes?

2.NS-2 下的IEEE 802.11 Ad Hoc 無線網路模擬(pdf更完整資料)

3.ns tool 簡介

NS中提供了3种传播模 型:FreeSpace, TwoRayGround, Shadowing。一个数据包如果要在接收方正确接收,接收功率必须大于某个接收功率阈值(threshold).threshold用来计算在某种传 播模型下,如何设定接收功率阈值来控制无线传输的范围。

相關文章:

回家
回家

等待
等待

素雅的大眼睛 Canon EF 85mm F1.8 USM
素雅的大眼睛 Canon EF 85mm F1.8 USM

輕暑.小烏來
輕暑.小烏來

一起看夜景的幸福
一起看夜景的幸福

大溪橋夜空
大溪橋夜空

Tags: ,