2010年(13)
分类:
2010-04-20 16:36:13
1. g++ threshold.cc -o threshold
2. ./threshold -m TwoRayGround 400
3. 在脚本中运行 phy/wirelessphy set RXthresh_ 5.57346e-11
# Initialize Global Variables
set ns_ [new Simulator]
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
Phy/WirelessPhy set CPThresh_ 10.0
Phy/WirelessPhy set CSThresh_ 1.559e-11
Phy/WirelessPhy set RXThresh_ 5.57346e-11
Phy/WirelessPhy set bandwidth_ 2e6
Phy/WirelessPhy set freq_ 914e+6
Phy/WirelessPhy set L_ 1.0
Phy/WirelessPhy set Pt_ 0.28183815
set tracefd [open mflood_4.tr w]
$ns_ trace-all $tracefd