Hi All, Our website moved to a new URL. Please bookmark the new link: https://ns2bloggers.blogspot.com/

Friday 23 May 2014

MODIFY TRANSMISSION RANGE IN NS-2

For changing the transmisson range you should do the following steps.
 
Modified folder: ns-2/mac/channel.cc
1.Some parameters calculation are reduced and those are shown RED BOLD letters.

……
void
WirelessChannel::calcHighestAntennaZ(Phy *tifp)
{
……
highestAntennaZ_ = highestZ/5;//Divide 5
WirelessPhy *wifp = (WirelessPhy *)tifp;
distCST_ = wifp->getDist(wifp->getCSThresh(), wifp->getPt(),
0.1, //REDUCE 1 to 0.1
0.1, //REDUCE 1 to 0.1
highestZ/2 , highestZ/2, wifp->getL(),
wifp->getLambda());
}

No comments :

Post a Comment