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:
@@ -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
|
||||
------------
|
||||
|
||||
@@ -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)
|
||||
{
|
||||
|
||||
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user