Bug 1504

Summary: Possible wrong calculations in the received Power
Product: ns-3 Reporter: abdo4444 <abdo.aast>
Component: wifiAssignee: Nicola Baldo <nicola>
Status: RESOLVED INVALID    
Severity: major CC: ns-bugs, ruben
Priority: P5    
Version: ns-3.13   
Hardware: All   
OS: All   

Description abdo4444 2012-09-15 22:30:07 UTC
In the method: YansWifiPhy::StartReceivePacket {....
  rxPowerDbm += m_rxGainDb;
....
}

rxPowerDbm is calculated in terms of (Dbm) while the rxGainDb is by default initialized in terms of (Db). To the best of my knowledge a signal power represented in terms of (Dbm) does not equal the same value represented in terms of (Dbm).

I believe we need to convert them into single unit before the addition, since a value of x in (dbm) = value of x in (db) + 30

Since db is calculated with One Watt as a reference while dbm is calculated with One MilliWatt as a reference value ( in the denominator).
Comment 1 Nicola Baldo 2012-09-16 05:20:15 UTC
It's correct to have gain in units of dB and powers in dBm, because in linear scale powers are in W, but gains are just scalars with no unit.
You're confusing dB with dBW, in fact the formula you gave is for conversion from dBW to dBm.  
Hence I am closing this bug as invalid.