Bug 2154 - Incorrect power calculation in wifi power adaptation examples
Incorrect power calculation in wifi power adaptation examples
Status: RESOLVED FIXED
Product: ns-3
Classification: Unclassified
Component: wifi
ns-3-dev
PC Linux
: P5 normal
Assigned To: sebastien.deronne
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2015-07-09 17:14 EDT by Matías Richart
Modified: 2015-07-22 17:35 EDT (History)
2 users (show)

See Also:


Attachments
Patch (2.33 KB, patch)
2015-07-09 17:14 EDT, Matías Richart
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Matías Richart 2015-07-09 17:14:26 EDT
Created attachment 2092 [details]
Patch

In the examples power-adaptation-distance and power-adaptation-interference the power is converted from dBm to mW in the wrong place. It has to be converted before calculating the energy.
That makes the power graphs change a lot. 

I attach a patch where I correct this and also add that only data frames are considered for power usage calculation.
Comment 1 sebastien.deronne 2015-07-14 14:21:07 EDT
I agree with the fix.
Comment 2 sebastien.deronne 2015-07-22 17:35:26 EDT
Committed in changeset 11525:7e0fee5babf8