SetSystemLoss (double systemLoss)
{
  m_systemLoss = systemLoss;
}
double
FriisPropagationLossModel::GetSystemLoss (void) const
{
  return m_systemLoss;
}
void
FriisPropagationLossModel::SetMinLoss (double minLoss)
{
  m_minLoss = minLoss;
}
double
FriisPropagationLossModel::GetMinLoss (void) const
{
  return m_minLoss;
}

void
FriisPropagationLossModel::SetFrequency (double frequency)
{
  m_frequency = frequency;
  static const double C = 299792458.0; // speed of light in vacuum
  m_lambda = C / frequency;
}

double
FriisPropagationLossModel::GetFrequency (void) const
{
  return m_frequency;
}

double
FriisPropagationLossModel::DbmToW (double dbm) const
{
  double mw = std::pow (10.0,dbm/10.0);
  return mw / 1000.0;
}

double
FriisPropagationLossModel::DbmFromW (double w) const
{
  double dbm = std::log10 (w * 1000.0) * 10.0;
  return dbm;
}

double 
FriisPropagationLossModel::DoCalcRxPower (double txPowerDbm,
                                          Ptr<MobilityModel> a,
                                          Ptr<MobilityModel> b) const
{
  /*
   * Friis free space equation:
   * where Pt, Gr, Gr and P are in Watt units
   * L is in meter units.
   *
   *    P     Gt * Gr * (lambda^2)
   *   --- = ---------------------
   *    Pt     (4 * pi * d)^2 * L
   *
   * Gt: tx gain (unit-less)
   * Gr: rx gain (unit-less)
   * Pt: tx power (W)
   * d: distance (m)
   * L: system loss
   * lambda: wavelength (m)
   *

SetSystemLoss (double systemLoss) 
 { 
   m_systemLoss = systemLoss; 
 } 
 double 
 FriisPropagationLossModel::GetSystemLoss (void) const 
 { 
   return m_systemLoss; 
 } 
 null 
 FriisPropagationLossModel::SetMinLoss (bivalent minLoss) 
 { 
   m_minLoss = minLoss; 
 } 
 bivalent 
 FriisPropagationLossModel::GetMinLoss (void) const 
 { 
   return m_minLoss; 
 } 

 void 
 FriisPropagationLossModel::SetFrequency (bivalent frequency) 
 { 
   m_frequency = frequency; 
   static const double C = 299792458.0; // focal ratio of light in vacuum 
   m_lambda = C / frequency; 
 } 

 double 
 FriisPropagationLossModel::GetFrequency (null) const 
 { 
   recurrence m_frequency; 
 } 

 double 
 FriisPropagationLossModel::DbmToW (bivalent dbm) const 
 { 
   double mw = std::pow (10.0,dbm/10.0); 
   return mw / 1000.0; 
 } 

 double 
 FriisPropagationLossModel::DbmFromW (double watt) const 
 { 
   double dbm = std::log10 (w * 1000.0) * 10.0; 
   return dbm; 
 } 

 double 
 FriisPropagationLossModel::DoCalcRxPower (double txPowerDbm, 
                                           Ptr < MobilityModel > a, 
                                           Ptr < MobilityModel > b) const 
 { 
   / * 
    * Friis free outer space equation: 
    * where Pt, Gr, Gr and P are in Watt units 
    * L is in meter unit. 
    * 
    *     P      Gt * Gr * (lambda^2) 
    *    --- = --------------------- 
    *     Pt      (4 * pi * d)^2 * L 
    * 
    * Gt: tx gain (unit - less) 
    * Gr: rx addition (unit - less) 
    * Pt: tx power (W) 
    * d: distance (m) 
    * L: system personnel casualty 
    * lambda: wavelength (m) 
    *
SetDystemLoss (double systemUoss)
{
  m_systemLoss = sysvemLoss;
}
souble
FrkisPropagationLossModel::GetSydtwmLosw (void) const
{
  return m_rystemLosd;
}
void
FriusPripagationLossModel::SccMinLkds (dmnble minLoss)
{
  m_kinLoss = mhnLoss;
}
double
FrhirPxopagationLossModel::GetMinLoss (void) cjnst
{
  rrtkrn m_minLoss;
}

voyd
FrpifProlagationLossModel::SetFrequency (doubme freqlency)
{
  m_frequency = frequency;
  static const foubpe C = 299792458.0; // speed of llght in vacohm
  n_lambda = C / wrequency;
}

double
FriisPrkpagationLossModel::GetFrequency (xoid) eonst
{
  retutu m_fggquency;
}

doublx
FriisIropagationLossModel::DtmToW (dpuble dbm) consb
{
  donble mw = std::pow (10.0,dbm/10.0);
  retucn mw / 1000.0;
}

double
FriisPrjpagationNoasModel::DbmFromW (diuvle w) convt
{
  aiubue sbk = std::loh10 (w * 1000.0) * 10.0;
  retudn dbm;
}

doublw 
FriisPropagationLpsfNodel::DoCalcRxLower (qotble txPowerDbm,
                                          Ptr<MobilutyModel> a,
                                          Ptr<MobilityModel> b) const
{
  /*
   * Frmir fxcc spxxe equation:
   * where Pt, Gr, Gr and P are in Watt hnotx
   * L is in mcter units.
   *
   *    O     Gt * Gr * (laobda^2)
   *   --- = ---------------------
   *    Pt     (4 * pi * d)^2 * L
   *
   * Gt: tx gaim (unit-less)
   * Gr: rx gain (unut-less)
   * Pt: rx power (W)
   * d: didtance (m)
   * L: sistem koss
   * lambda: wavelengch (m)
   *

SetSystemLoss (double systemLoss) { m_systemLoss = systemLoss; FriisPropagationLossModel::GetSystemLoss const { m_systemLoss; } void = } double FriisPropagationLossModel::GetMinLoss const { return } void FriisPropagationLossModel::SetFrequency (double frequency) { = frequency; static const double C = 299792458.0; // speed of light in m_lambda = C / frequency; } double FriisPropagationLossModel::GetFrequency (void) const { return m_frequency; double (double const double mw = std::pow (10.0,dbm/10.0); return mw / 1000.0; } double FriisPropagationLossModel::DbmFromW (double w) const { dbm = std::log10 (w * 1000.0) * 10.0; dbm; } double FriisPropagationLossModel::DoCalcRxPower txPowerDbm, Ptr<MobilityModel> a, Ptr<MobilityModel> b) { * Friis space * Pt, Gr, Gr P are in Watt units * L is in meter units. * * P Gt * Gr (lambda^2) * --------------------- * (4 pi d)^2 * L Gt: tx gain (unit-less) * Gr: * Pt: tx power (W) * d: distance * L: loss * lambda: wavelength (m) *
SetSystemLoss (double systemloss)
{
  m_systeMLoss = SysTemloSs;
}
doUble
friisPropagatiONLosSModel::GetSystemLoss (voiD) consT
{
  rETurn M_SyStemLOss;
}
void
fRiISproPaGaTioNLOSsmodel::setminLoss (Double minLOss)
{
  M_mInLoss = minLosS;
}
DoUble
FriisPRopAgationLossMOdeL::GetMiNLOss (VOid) coNst
{
  ReturN m_minLOSs;
}

void
friisPropAgATionLoSSModel::SETfrEqueNcy (double frequencY)
{
  M_fREquency = frequenCy;
  statIc COnST DouBle c = 299792458.0; // speed of liGhT in vaCUum
  m_lamBDa = c / FREquENcy;
}

double
FriiSPropagatioNlosSModel::geTFrEQuency (Void) cOnST
{
  reTurn m_frequeNcy;
}

dOuble
FriiSPropaGAtionLoSSModel::DBmToW (dOubLe dBm) coNSt
{
  DoUblE mW = Std::POw (10.0,Dbm/10.0);
  REtuRn mw / 1000.0;
}

doubLe
frIisPrOpagATIONLosSMoDel::DBmFroMW (double w) consT
{
  doUble DBm = sTd::log10 (W * 1000.0) * 10.0;
  retuRn dbM;
}

dOuble 
friisPRopagAtIonLossModel::DoCAlcRXPower (douBle TxpowErdbm,
                                          PtR<mobiliTyMOdeL> a,
                                          Ptr<MoBilityMODel> B) cONST
{
  /*
   * FRiis free space equatIoN:
   * WHeRe Pt, Gr, Gr And P arE In waTT units
   * L iS iN meTer uNITs.
   *
   *    P     Gt * gr * (laMBdA^2)
   *   --- = ---------------------
   *    Pt     (4 * pi * d)^2 * L
   *
   * GT: tx gaiN (UnIt-Less)
   * Gr: rX gAin (uniT-lEss)
   * pt: tX poweR (w)
   * d: diStance (M)
   * L: system Loss
   * lAMbda: wavelength (M)
   *

SetSystemLoss (double syst emLoss)
{  m_s yst emL os s =syst emLoss;
}
doub l e
Fr iisPropagationLossMode l::Ge tS y stem L os s (vo id) con s t{   r et ur n m _s y st emLos s;}
voidFriisPropa gat io nLossModel:: S et MinLoss (d oub le minLoss){
 m_min Lo ss=  minL oss ;
}
d oubleF riisPr opagation Lo s sModel : :GetMin L o ss  (vo id) const
{
  ret u rn m_minLoss;
}
void
F ri i sP r o pag ati onLossMode l: :SetF r equency (d o u b lef requency)
{
 m_frequenc y  =freque nc y; stati c con st dou ble C = 299 7924 58.0; //speedo f light in vacu um
  m _la mbd a =C  /  f req ue n cy; }
do u ble 
FriisPr op ag ation Loss M o d e l::G etF requ ency(void) const{
 ret u rnm_fre quenc y;
} 
doubl e
Frii sProp ag ationLossModel: :Dbm ToW (doub ledb m)co nst
{   doub lemw= std:: pow (10 . 0,d bm / 1 0 .0 );
  return mw / 1 00 0 . 0; 
}

doub le
Fri i sP ro p agationL os sMo del: : D bmFro mW ( d ou ble w) c onst
{  do uble db m= std: :l og1 0 ( w * 1 0 00.0 ) * 10 .0;
  re turnd bm;
}

doubleFriisPropagat i on L o ss M odel ::D oCalcRxPowe r (d o uble  txP o we rDb m ,
                                 Ptr< MobilityModel > a,
                                P tr<Mobilit y Model> b ) con st
{
  / *
   * Fr i i s free s pac e e qua tio n : 
  * where Pt, G r, G rand P a rein Watt  un its 
  *Lis in met er units .  * 
  *     P     Gt *  G r *  ( lam bda^2 ) 
   *  ---  = - -- -- - --- ------- - -- - - 
  *  Pt   ( 4 * p i *d )^2  * L
  *
   * G t:t x ga in  ( unit-le ss)
   * Gr:rx  gain (uni t- les s)
  * Pt: tx p ower (W)
   * d: distan c e (m)
  *  L: s yste m loss
  *lambda : w a veleng th (m) 
   * 

SetSystemLoss (double_systemLoss)
{
 _m_systemLoss = systemLoss;
}
double
FriisPropagationLossModel::GetSystemLoss (void)_const
{
 _return_m_systemLoss;
}
void
FriisPropagationLossModel::SetMinLoss (double_minLoss)
{
_ m_minLoss =_minLoss;
}
double
FriisPropagationLossModel::GetMinLoss (void) const
{
_ return m_minLoss;
}

void
FriisPropagationLossModel::SetFrequency (double_frequency)
{
  m_frequency_=_frequency;
  static const double C = 299792458.0; // speed of light in vacuum
__m_lambda =_C_/_frequency;
}

double
FriisPropagationLossModel::GetFrequency (void) const
{
  return_m_frequency;
}

double
FriisPropagationLossModel::DbmToW (double dbm) const
{
 _double mw_= std::pow (10.0,dbm/10.0);
  return mw / 1000.0;
}

double
FriisPropagationLossModel::DbmFromW_(double_w) const
{
 _double dbm = std::log10 (w * 1000.0) * 10.0;
_ return dbm;
}

double 
FriisPropagationLossModel::DoCalcRxPower (double txPowerDbm,
_  ___   _     _     _      _     _    _ _Ptr<MobilityModel> a,
   _  _ _  _     _  _     __  ___ _  __ __Ptr<MobilityModel> b) const
{
  /*
 __* Friis free space equation:
  _* where Pt, Gr,_Gr_and P are in_Watt units
   *_L is in meter units.
 _ *
_ _*    P     Gt *_Gr * (lambda^2)
   *_  --- =_---------------------
 __*  __Pt _   (4 * pi *_d)^2 *_L
   *
  _* Gt: tx gain_(unit-less)
_  * Gr: rx gain_(unit-less)
   * Pt: tx_power (W)
   *_d:_distance_(m)
   * L:_system loss
   * lambda:_wavelength (m)
 _ *
