#include <path_loss.hpp>
Inheritance diagram for TwoRay:
Public Types | |
typedef boost::shared_ptr< TwoRay > | TwoRayPtr |
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 TwoRayPtr | create () |
A factory method to ensure that all objects are created via new since we are using smart pointers. | |
static TwoRayPtr | create (double lossFactor) |
A factory method to ensure that all objects are created via new since we are using smart pointers. | |
Protected Member Functions | |
TwoRay () | |
A constructor. | |
TwoRay (double lossFactor) | |
A constructor. |
The equation for the Two-Ray model is given by:
where is the receiver power,
is the transmitted power,
and
are the gains of the transmitter and receiver antennas, respectively,
and
is the transmitter and receiver antenna heights,
is the distance between the transmitter and receiver, and
is the loss factor. By default,
.
Definition at line 126 of file path_loss.hpp.
TwoRay::TwoRay | ( | double | lossFactor | ) | [protected] |
A constructor.
lossFactor | the loss factor of the model (must be >= 1). |
Definition at line 40 of file path_loss.cpp.
TwoRayPtr TwoRay::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 from FreeSpace.
Definition at line 196 of file path_loss.hpp.
References TwoRay().
double TwoRay::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. |
Reimplemented from FreeSpace.
Definition at line 62 of file path_loss.cpp.
References decibelsToPower(), Location::distance(), Signal::getDbStrength(), PhysicalLayer::getGain(), PhysicalLayer::getLocation(), Signal::getLocation(), FreeSpace::getRecvdStrength(), WirelessCommSignal::getTransmitterGain(), WirelessCommSignal::getWavelength(), LogStreamManager::instance(), LogStreamManager::logDebugItem(), PathLoss::m_DEBUG_SIGNAL_STRENGTH, FreeSpace::m_lossFactor, and PI.