Bug 1064 - Correct Friis propagation loss equation in spectrum module
Correct Friis propagation loss equation in spectrum module
Product: ns-3
Classification: Unclassified
Component: wifi
All All
: P5 minor
Assigned To: Dean Armstrong
: bug
Depends on:
  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:


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
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:
Comment 2 Dean Armstrong 2011-03-01 12:02:22 EST
Fixed in changeset 6846:8cbf95884984 on ns-3-dev.