a log distance propagation model. More...
#include <propagation-loss-model.h>
Public Member Functions | |
LogDistancePropagationLossModel () | |
void | SetPathLossExponent (double n) |
double | GetPathLossExponent (void) const |
void | SetReference (double referenceDistance, double referenceLoss) |
Static Public Member Functions | |
static TypeId | GetTypeId (void) |
This method returns the TypeId associated to ns3::LogDistancePropagationLossModel. | |
Private Member Functions | |
LogDistancePropagationLossModel (const LogDistancePropagationLossModel &o) | |
LogDistancePropagationLossModel & | operator= (const LogDistancePropagationLossModel &o) |
virtual double | DoCalcRxPower (double txPowerDbm, Ptr< MobilityModel > a, Ptr< MobilityModel > b) const |
Static Private Member Functions | |
static Ptr< PropagationLossModel > | CreateDefaultReference (void) |
Private Attributes | |
double | m_exponent |
double | m_referenceDistance |
double | m_referenceLoss |
a log distance propagation model.
This model calculates the reception power with a so-called log-distance propagation model:
where:
When the path loss is requested at a distance smaller than the reference distance, the tx power is returned.
Definition at line 202 of file propagation-loss-model.h.
ns3::LogDistancePropagationLossModel::LogDistancePropagationLossModel | ( | ) |
Definition at line 266 of file propagation-loss-model.cc.
ns3::LogDistancePropagationLossModel::LogDistancePropagationLossModel | ( | const LogDistancePropagationLossModel & | o | ) | [private] |
static Ptr<PropagationLossModel> ns3::LogDistancePropagationLossModel::CreateDefaultReference | ( | void | ) | [static, private] |
double ns3::LogDistancePropagationLossModel::DoCalcRxPower | ( | double | txPowerDbm, | |
Ptr< MobilityModel > | a, | |||
Ptr< MobilityModel > | b | |||
) | const [private, virtual] |
The formula is: rx = 10 * log (Pr0(tx)) - n * 10 * log (d/d0)
Pr0: rx power at reference distance d0 (W) d0: reference distance: 1.0 (m) d: distance (m) tx: tx power (dB) rx: dB
Which, in our case is:
rx = rx0(tx) - 10 * n * log (d/d0)
Implements ns3::PropagationLossModel.
Definition at line 287 of file propagation-loss-model.cc.
References m_exponent, m_referenceDistance, m_referenceLoss, and NS_LOG_DEBUG.
double ns3::LogDistancePropagationLossModel::GetPathLossExponent | ( | void | ) | const |
Definition at line 281 of file propagation-loss-model.cc.
References m_exponent.
TypeId ns3::LogDistancePropagationLossModel::GetTypeId | ( | void | ) | [static] |
This method returns the TypeId associated to ns3::LogDistancePropagationLossModel.
Attributes defined for this type:
No TraceSources defined for this type.
Reimplemented from ns3::PropagationLossModel.
Definition at line 241 of file propagation-loss-model.cc.
References ns3::TypeId::AddAttribute(), m_exponent, m_referenceDistance, m_referenceLoss, and ns3::TypeId::SetParent().
LogDistancePropagationLossModel& ns3::LogDistancePropagationLossModel::operator= | ( | const LogDistancePropagationLossModel & | o | ) | [private] |
void ns3::LogDistancePropagationLossModel::SetPathLossExponent | ( | double | n | ) |
n | the path loss exponent. Set the path loss exponent. |
Definition at line 270 of file propagation-loss-model.cc.
References m_exponent.
void ns3::LogDistancePropagationLossModel::SetReference | ( | double | referenceDistance, | |
double | referenceLoss | |||
) |
Definition at line 275 of file propagation-loss-model.cc.
References m_referenceDistance, and m_referenceLoss.
double ns3::LogDistancePropagationLossModel::m_exponent [private] |
Definition at line 228 of file propagation-loss-model.h.
Referenced by DoCalcRxPower(), GetPathLossExponent(), GetTypeId(), and SetPathLossExponent().
double ns3::LogDistancePropagationLossModel::m_referenceDistance [private] |
Definition at line 229 of file propagation-loss-model.h.
Referenced by DoCalcRxPower(), GetTypeId(), and SetReference().
double ns3::LogDistancePropagationLossModel::m_referenceLoss [private] |
Definition at line 230 of file propagation-loss-model.h.
Referenced by DoCalcRxPower(), GetTypeId(), and SetReference().