23 #include "ns3/propagation-loss-model.h"
25 #include "ns3/mobility-model.h"
26 #include "ns3/double.h"
27 #include "ns3/pointer.h"
30 #include <ns3/mobility-building-info.h>
45 : m_shadowingValue (shadowingValue), m_receiver (receiver)
53 return (m_shadowingValue);
65 static TypeId tid =
TypeId (
"ns3::BuildingsPropagationLossModel")
70 .AddAttribute (
"ShadowSigmaOutdoor",
71 "Standard deviation of the normal distribution used for calculate the shadowing for outdoor nodes",
74 MakeDoubleChecker<double> ())
76 .AddAttribute (
"ShadowSigmaIndoor",
77 "Standard deviation of the normal distribution used for calculate the shadowing for indoor nodes ",
80 MakeDoubleChecker<double> ())
81 .AddAttribute (
"ShadowSigmaExtWalls",
82 "Standard deviation of the normal distribution used for calculate the shadowing due to ext walls ",
85 MakeDoubleChecker<double> ())
87 .AddAttribute (
"InternalWallLoss",
88 "Additional loss for each internal wall [dB]",
91 MakeDoubleChecker<double> ());
131 int nfloors = node->GetFloorNumber () - 1;
132 loss = -2 * (nfloors);
140 double dx = std::abs (a->GetRoomNumberX () - b->GetRoomNumberX ());
141 double dy = std::abs (a->GetRoomNumberY () - b->GetRoomNumberY ());
153 NS_ASSERT_MSG ((a1 != 0) && (b1 != 0),
"BuildingsPropagationLossModel only works with MobilityBuildingInfo");
158 std::map<Ptr<MobilityModel>,
ShadowingLoss>::iterator bit = ait->second.find (b);
159 if (bit != ait->second.end ())
161 return (bit->second.GetLoss ());
168 double shadowingValue =
m_randVariable->GetValue (0.0, (sigma*sigma));
170 return (ait->second[b].GetLoss ());
178 double shadowingValue =
m_randVariable->GetValue (0.0, (sigma*sigma));
double GetShadowing(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const
double m_shadowingSigmaOutdoor
virtual double DoCalcRxPower(double txPowerDbm, Ptr< MobilityModel > a, Ptr< MobilityModel > b) const
Ptr< NormalRandomVariable > m_randVariable
#define NS_LOG_COMPONENT_DEFINE(name)
double HeightLoss(Ptr< MobilityBuildingInfo > n) const
BuildingsPropagationLossModel()
virtual double GetLoss(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const =0
double m_shadowingSigmaIndoor
std::map< Ptr< MobilityModel >, std::map< Ptr< MobilityModel >, ShadowingLoss > > m_shadowingLossMap
static TypeId GetTypeId(void)
NS_OBJECT_ENSURE_REGISTERED(AntennaModel)
double EvaluateSigma(Ptr< MobilityBuildingInfo > a, Ptr< MobilityBuildingInfo > b) const
#define NS_ASSERT_MSG(condition, message)
Modelize the propagation loss through a transmission medium.
mobility buildings information (to be used by mobility models)
Ptr< MobilityModel > GetReceiver(void) const
double ExternalWallLoss(Ptr< MobilityBuildingInfo > a) const
Hold an floating point type.
Ptr< T > GetObject(void) const
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
double m_shadowingSigmaExtWalls
double m_lossInternalWall
double InternalWallsLoss(Ptr< MobilityBuildingInfo > a, Ptr< MobilityBuildingInfo > b) const
virtual int64_t DoAssignStreams(int64_t stream)