Channel state implementing log-normal shadowing. More...
#include <LogNormalShadowing.h>
Inherits AnalogueModel.
Public Member Functions | |
LogNormalShadowing (double mean, double stdDev, simtime_t interval) | |
Takes the mean and standard deviation of the log normal distributed attenuation values as well as the inteval in which to define key entries in (accuracy of the model). | |
virtual void | filterSignal (Signal &s) |
Calculates shadowing loss based on a normal gaussian function. | |
Protected Member Functions | |
double | randomLogNormalGain () const |
Returns a random log normal distributed gain factor. | |
Protected Attributes | |
double | mean |
Mean of the random attenuation in dB. | |
double | stdDev |
Standart deviation of the random attenuation in dB. | |
simtime_t | interval |
The interval to set attenuation entries in. | |
Static Protected Attributes | |
static DimensionSet | dimensions |
The dimensions of this analogue model. |
Channel state implementing log-normal shadowing.
An example config.xml for this AnalogueModel can be the following:
<AnalogueModel type="LogNormalShadowing"> <!-- Mean attenuation in dB --> <parameter name="mean" type="double" value="0.5"/> <!-- Standart deviation of the attenuation in dB --> <parameter name="stdDev" type="double" value="0.25"/> <!-- Interval in which to define attenuation for in seconds --> <parameter name="interval" type="double" value="0.001"/> </AnalogueModel>
Definition at line 42 of file LogNormalShadowing.h.
double LogNormalShadowing::randomLogNormalGain | ( | ) | const [protected] |
Returns a random log normal distributed gain factor.
The gain factor is below 1.0 so its an actual attenuation.
Definition at line 26 of file LogNormalShadowing.cc.
References FWMath::dBm2mW(), mean, and stdDev.
Referenced by filterSignal().
{ return FWMath::dBm2mW(-1.0 * normal(mean, stdDev)); }