Bug 1064

Summary: Correct Friis propagation loss equation in spectrum module
Product: ns-3 Reporter: Dean Armstrong <deanarm>
Component: wifiAssignee: Dean Armstrong <deanarm>
Status: RESOLVED FIXED    
Severity: minor CC: deanarm, nicola, ns-bugs
Priority: P5 Keywords: bug
Version: ns-3-dev   
Hardware: All   
OS: All   

Description Dean Armstrong 2011-02-28 06:26:46 UTC
The implementation of Friis' propagation loss equation in the spectrum
module is incorrect. Currently, the comment in
friis-spectrum-propagation-loss.h agrees with the implementation in
friis-spectrum-propagation-loss.cc in indicating that the free space
path loss is computed thus:

/* L = (4 * pi * d * f^2) / C^2 */
double loss = ( d * f * f) / ((3e8 * 3e8) / (4 * M_PI)) ;

These are both wrong - the entire numerator in the comment above should be
squared, rather than just the frequency term.

The fix I propose can be seen as changeset 6814:d5863a7ab817 in
http://code.nsnam.org/deanarm/ns-3-dev-wifi-spectrum
Comment 1 Nicola Baldo 2011-03-01 11:40:16 UTC
whoops... I wonder how I could write that... what a shame!
Thanks for catching it, I am fine with your proposed changeset:
http://code.nsnam.org/deanarm/ns-3-dev-wifi-spectrum/rev/d5863a7ab817
Comment 2 Dean Armstrong 2011-03-01 12:02:22 UTC
Fixed in changeset 6846:8cbf95884984 on ns-3-dev.