Bug 1064: Correct Friis propagation loss equation

The FrissSpectrumPropagationLoss model doesn't implement Friis formula
correctly - the whole numerator needs to be squared, rather than just
the last term.
This commit is contained in:
Dean Armstrong
2011-03-01 16:58:05 +00:00
parent e09cf6a452
commit ce8b512f0f
3 changed files with 4 additions and 2 deletions

View File

@@ -29,6 +29,7 @@ since ns-3.10, in many cases referencing the Bugzilla bug number.
- Fixed the UanPhyGen::IsStateBusy method, error with logical OR
- CsmaNetDevice ReceiveErrorModel was not dropping the packet
- bug 1064 - Correct Friis propagation loss equation in spectrum module
Known issues
------------

View File

@@ -86,7 +86,8 @@ FriisSpectrumPropagationLossModel::CalculateLoss (double f, double d) const
}
NS_ASSERT (f > 0);
double loss = ( d * f * f) / ((3e8 * 3e8) / (4 * M_PI)) ;
double loss_sqrt = (4 * M_PI * f * d) / 3e8;
double loss = loss_sqrt * loss_sqrt;
if (loss < 1)
{

View File

@@ -49,7 +49,7 @@ public:
* Return the propagation loss L according to a simplified version of Friis'
* formula in which antenna gains are unitary:
*
* 4 * pi * d * f^2
* (4 * pi * d * f) ^ 2
* L = ----------------------
* C^2
*