NS2 传输距离批改工具threshold使用详解

NS2 传输距离修改工具threshold使用详解^^ns2中设定无线节点的传输距离 threshold工具(~ns/indep-utils/pr

NS2 传输距离修改工具threshold使用详解

^^ns2中设定无线节点的传输距离
 threshold工具(~ns/indep-utils/propagation)
 默认:载波侦听距离为550米,无线节点覆盖范围250米,带宽2Mbps
 先编译得到可执行文件:g++ threshold.cc -o threshold
  修改:#include <iostream>    //增加该头文件以引用输出函数
   #include <string.h>      //增加该头文件以引用'strcmp'函数
   using namespace std;  //增加命名空间的声明
 运行./threshold -m FreeSpace 15即可得到:
   distance = 15
   propagation model: FreeSpace
   。。。。。。
   Receiving threshold RXThresh_ is: 8.5457e-07
  在tcl脚本文件中只要将RXThresh_设定为最后那个值即可