INET Framework for OMNeT++/OMNEST
inet::physicallayer::SuiPathLoss Class Reference

This class implements the empirical Stanford University Interim path loss model. More...

#include <SuiPathLoss.h>

Inheritance diagram for inet::physicallayer::SuiPathLoss:
inet::physicallayer::PathLossBase inet::physicallayer::IPathLoss inet::IPrintableObject

Public Member Functions

 SuiPathLoss ()
 
virtual std::ostream & printToStream (std::ostream &stream, int level, int evFlags=0) const override
 Prints this object to the provided output stream. More...
 
virtual double computePathLoss (mps propagationSpeed, Hz frequency, m distance) const override
 Returns the loss factor as a function of propagation speed, carrier frequency and distance. More...
 
virtual m computeRange (mps propagationSpeed, Hz frequency, double loss) const override
 Returns the range for the given loss factor. More...
 
- Public Member Functions inherited from inet::physicallayer::PathLossBase
virtual double computePathLoss (const ITransmission *transmission, const IArrival *arrival) const override
 Returns the loss factor for the provided transmission and arrival. More...
 
- Public Member Functions inherited from inet::IPrintableObject
virtual ~IPrintableObject ()
 
virtual std::string printToString () const
 
virtual std::string printToString (int level, int evFlags=0) const
 
virtual std::string getInfoStringRepresentation (int evFlags=0) const
 
virtual std::string getDetailStringRepresentation (int evFlags=0) const
 
virtual std::string getDebugStringRepresentation (int evFlags=0) const
 
virtual std::string getTraceStringRepresentation (int evFlags=0) const
 
virtual std::string getCompleteStringRepresentation (int evFlags=0) const
 

Protected Member Functions

virtual void initialize (int stage) override
 

Protected Attributes

m ht
 Transmitter antenna high. More...
 
m hr
 Receiver antenna high. More...
 
double a
 
double b
 
double c
 
double d
 
double s
 

Additional Inherited Members

- Public Types inherited from inet::IPrintableObject
enum  PrintLevel {
  PRINT_LEVEL_TRACE, PRINT_LEVEL_DEBUG, PRINT_LEVEL_DETAIL, PRINT_LEVEL_INFO,
  PRINT_LEVEL_COMPLETE = INT_MIN
}
 
enum  PrintFlag { PRINT_FLAG_FORMATTED = (1 << 0), PRINT_FLAG_MULTILINE = (1 << 1) }
 

Detailed Description

This class implements the empirical Stanford University Interim path loss model.

Author
Konrad Polys, Krzysztof Grochla

Constructor & Destructor Documentation

◆ SuiPathLoss()

inet::physicallayer::SuiPathLoss::SuiPathLoss ( )
44  {
45  a = 4.6;

Member Function Documentation

◆ computePathLoss()

double inet::physicallayer::SuiPathLoss::computePathLoss ( mps  propagationSpeed,
Hz  frequency,
m  distance 
) const
overridevirtual

Returns the loss factor as a function of propagation speed, carrier frequency and distance.

The value is in the range [0, 1] where 1 means no loss at all and 0 means all power is lost.

Implements inet::physicallayer::PathLossBase.

95  {
96  L = 20 * log10(unit(4 * M_PI * R / lambda).get()) + s;
97  }
98  return math::dB2fraction(-L);
99 }
100 
101 } // namespace physicallayer
102 
103 } // namespace inet
104 

◆ computeRange()

virtual m inet::physicallayer::SuiPathLoss::computeRange ( mps  propagationSpeed,
Hz  frequency,
double  loss 
) const
inlineoverridevirtual

Returns the range for the given loss factor.

The value is in the range [0, +infinity) or NaN if unspecified.

Implements inet::physicallayer::IPathLoss.

◆ initialize()

void inet::physicallayer::SuiPathLoss::initialize ( int  stage)
overrideprotectedvirtual

Terrain A - Highest path loss. Dense populated urban area. Terrain B - Intermediate path loss. Suburban area. Terrain C - Minimum path loss. Flat areas or rural with light vegetation.

51  {
52  a = 4.0;
53  b = 0.0065;
54  c = 17.1;
55  d = 10.8;
56  s = 9.6;
57  }
58  else if (!strcmp(terrain, "TerrainC")) {
59  a = 3.6;
60  b = 0.0050;
61  c = 20.0;
62  d = 20.0;
63  s = 8.2;
64  }
65  else
66  throw cRuntimeError("Unknown terrain");
67  }
68 }
69 
70 std::ostream& SuiPathLoss::printToStream(std::ostream& stream, int level, int evFlags) const
71 {
72  stream << "SuiPathLoss";
73  if (level <= PRINT_LEVEL_TRACE)
74  stream << EV_FIELD(ht)
75  << EV_FIELD(hr);
76  return stream;
77 }
78 
79 double SuiPathLoss::computePathLoss(mps propagationSpeed, Hz frequency, m distance) const
80 {
81  m R = distance;
82  m R0 = m(100.0);

◆ printToStream()

std::ostream & inet::physicallayer::SuiPathLoss::printToStream ( std::ostream &  stream,
int  level,
int  evFlags = 0 
) const
overridevirtual

Prints this object to the provided output stream.

Reimplemented from inet::IPrintableObject.

91  {

Member Data Documentation

◆ a

double inet::physicallayer::SuiPathLoss::a
protected

◆ b

double inet::physicallayer::SuiPathLoss::b
protected

◆ c

double inet::physicallayer::SuiPathLoss::c
protected

◆ d

double inet::physicallayer::SuiPathLoss::d
protected

◆ hr

m inet::physicallayer::SuiPathLoss::hr
protected

Receiver antenna high.

◆ ht

m inet::physicallayer::SuiPathLoss::ht
protected

Transmitter antenna high.

◆ s

double inet::physicallayer::SuiPathLoss::s
protected

The documentation for this class was generated from the following files:
inet::physicallayer::SuiPathLoss::a
double a
Definition: SuiPathLoss.h:60
inet::units::units::Hz
pow< s, -1 > Hz
Definition: Units.h:935
inet::physicallayer::SuiPathLoss::s
double s
Definition: SuiPathLoss.h:60
inet::units::units::mps
compose< m, pow< s, -1 > > mps
Definition: Units.h:1151
inet::physicallayer::SuiPathLoss::b
double b
Definition: SuiPathLoss.h:60
inet::physicallayer::SuiPathLoss::d
double d
Definition: SuiPathLoss.h:60
EV_FIELD
#define EV_FIELD(...)
Definition: INETDefs.h:112
inet::units::constants::R
const value< double, compose< units::J, compose< pow< units::mol, -1 >, pow< units::kg, -1 > > > > R(8.314472)
inet::math::dB2fraction
double dB2fraction(double dB)
Converts a dB value to fraction.
Definition: INETMath.h:153
inet::physicallayer::SuiPathLoss::printToStream
virtual std::ostream & printToStream(std::ostream &stream, int level, int evFlags=0) const override
Prints this object to the provided output stream.
Definition: SuiPathLoss.cc:84
inet::IPrintableObject::PRINT_LEVEL_TRACE
@ PRINT_LEVEL_TRACE
Definition: IPrintableObject.h:22
inet::physicallayer::SuiPathLoss::hr
m hr
Receiver antenna high.
Definition: SuiPathLoss.h:58
inet::units::unit
pow< internal::none, 0 > unit
Definition: Units.h:72
inet::physicallayer::SuiPathLoss::ht
m ht
Transmitter antenna high.
Definition: SuiPathLoss.h:55
inet::evFlags
int evFlags
Definition: INETDefs.cc:12
inet::physicallayer::SuiPathLoss::computePathLoss
virtual double computePathLoss(mps propagationSpeed, Hz frequency, m distance) const override
Returns the loss factor as a function of propagation speed, carrier frequency and distance.
Definition: SuiPathLoss.cc:93
inet::units::values::m
value< double, units::m > m
Definition: Units.h:1233
inet::physicallayer::SuiPathLoss::c
double c
Definition: SuiPathLoss.h:60
M_PI
#define M_PI
Definition: INETMath.h:52