Bug 1064 - Correct Friis propagation loss equation in spectrum module
Correct Friis propagation loss equation in spectrum module
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: wifi
ns-3-dev
All All
: P5 minor
Assigned To: Dean Armstrong
: bug
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-02-28 06:26 EST by Dean Armstrong
Modified: 2011-03-01 12:02 EST (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dean Armstrong 2011-02-28 06:26:46 EST
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 EST
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 EST
Fixed in changeset 6846:8cbf95884984 on ns-3-dev.