#include <path_loss.hpp>
Inheritance diagram for FreeSpace:
Public Types | |
typedef boost::shared_ptr< FreeSpace > | FreeSpacePtr |
Smart pointer that clients should use. | |
Public Member Functions | |
virtual double | getRecvdStrength (const WirelessCommSignal &signal, const PhysicalLayer &receiver) const |
Compute the signal strength for the signal at the receiver. | |
Static Public Member Functions | |
static FreeSpacePtr | create () |
A factory method to ensure that all objects are created via new since we are using smart pointers. | |
static FreeSpacePtr | create (double lossFactor) |
A factory method to ensure that all objects are created via new since we are using smart pointers. | |
Protected Member Functions | |
FreeSpace () | |
A constructor. | |
FreeSpace (double lossFactor) | |
A constructor. | |
Protected Attributes | |
double | m_lossFactor |
The multiplier for how much signal loss a signal experiences. | |
Static Protected Attributes | |
static const double | m_DEFAULT_LOSS_FACTOR = 1.0 |
The default loss factor. |
The equation for the model * is given by:
where is the receiver power, is the transmitted power, and are the gains of the transmitter and receiver antennas, respectively, is the wavelength, is the distance between the transmitter and receiver, and is the loss factor.
Definition at line 59 of file path_loss.hpp.
FreeSpace::FreeSpace | ( | double | lossFactor | ) | [protected] |
A constructor.
lossFactor | the loss factor of the model (must be >= 1). |
Definition at line 26 of file path_loss.cpp.
References m_DEFAULT_LOSS_FACTOR, and m_lossFactor.
FreeSpacePtr FreeSpace::create | ( | double | lossFactor | ) | [inline, static] |
A factory method to ensure that all objects are created via new
since we are using smart pointers.
lossFactor | the loss factor of the model (must be >= 1). |
Reimplemented in TwoRay.
Definition at line 184 of file path_loss.hpp.
References FreeSpace().
double FreeSpace::getRecvdStrength | ( | const WirelessCommSignal & | signal, | |
const PhysicalLayer & | receiver | |||
) | const [virtual] |
Compute the signal strength for the signal at the receiver.
signal | the signal being transmitted. | |
receiver | the object receiving the signal. |
Implements PathLoss.
Reimplemented in TwoRay.
Definition at line 46 of file path_loss.cpp.
References decibelsToPower(), Location::distance(), Signal::getDbStrength(), PhysicalLayer::getGain(), PhysicalLayer::getLocation(), Signal::getLocation(), WirelessCommSignal::getTransmitterGain(), WirelessCommSignal::getWavelength(), m_lossFactor, and PI.
Referenced by TwoRay::getRecvdStrength().