Bugzilla – Bug 1064
Correct Friis propagation loss equation in spectrum module
Last modified: 2011-03-01 12:02:22 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
whoops... I wonder how I could write that... what a shame!
Thanks for catching it, I am fine with your proposed changeset:
Fixed in changeset 6846:8cbf95884984 on ns-3-dev.