在ns2的傳輸損耗模型中,節點位置、天線引數配置、傳輸路徑模型都會影響到傳輸情況
$ns node-config -adhocrouting $opt(adhocrouting) \
-lltype $opt(ll) \
-mactype $opt(mac) \
-channel $chan \
-ifqtype $opt(ifq) \
-ifqlen $opt(ifqlen) \
-anttype $opt(ant) \----》天線配置
-proptype $opt(prop) \-----》傳輸模型配置
-phytype $opt(netif) \
-topoinstance $topo \
-wiredrouting on \
-agenttrace on \
-routertrace off \
-mactrace on \
-movementtrace off
1,節點位置
在tcl預設配置指令碼中(ns-default.tcl)也會有初始化配置
node/mobilenode set x_ 0
node/mobilenode set y_ 0
node/mobilenode set z_ 0
node/mobilenode set speed_ 0
node/mobilenode set position_update_interval_ 0
node/mobilenode set bandwidth_ 0 ;# not used
node/mobilenode set delay_ 0 ;# not used
node/mobilenode set regagent_port 0
node/mobilenode set decap_port 1
在tcl配置指令碼中,節點位置會重新配置
set bstation802 [$ns node 2.0.0] ;
$bstation802 set x_ 500.0
$bstation802 set y_ 1000.0
$bstation802 set z_ 0.0
$bstation802 color blue
2,天線位置
在tcl預設配置指令碼中有初始化配置
antenna/omniantenna set x_ 0
antenna/omniantenna set y_ 0
antenna/omniantenna set z_ 1.5 //這裡其實是配置天線高度
antenna/omniantenna set gt_ 1.0
antenna/omniantenna set gr_ 1.0
在tcl配置指令碼中,天線位置一般不會重新配置
3,傳輸模型
在tcl預設配置指令碼中有些會有初始化配置
# shadowing propagation model
propagation/shadowing set pathlos***p_ 2.0
propagation/shadowing set std_db_ 4.0
propagation/shadowing set dist0_ 1.0
propagation/shadowing set seed_ 0
傳輸路徑選擇過後,會呼叫相應的損耗衰減模型
ns2傳輸損耗模型
一 概述 在ns2的傳輸損耗模型中,節點位置 天線引數配置 傳輸路徑模型都會影響到傳輸情況 ns node config adhocrouting opt adhocrouting lltype opt ll mactype opt mac channel chan ifqtype opt ifq ...
ns2傳輸損耗模型
一 概述 在ns2的傳輸損耗模型中,節點位置 天線引數配置 傳輸路徑模型都會影響到傳輸情況 ns node config adhocrouting opt adhocrouting lltype opt ll mactype opt mac channel chan ifqtype opt ifq ...
NS2學習筆記
國慶假期用來研究ns2,基於socket的網路程式設計和演算法 現在看的差不多了,每天陸續寫些筆記,用來複習,也用來交流 本人也是初學者,如果有什麼錯誤,希望也可以指出 讀完了這個再去讀ns2的手冊,這個對於高階式相當重要的,而且因為有中文版的,需要的也可以留郵箱。ns2的安裝,建議安裝在linux...