A Discrete-Event Network Simulator
API
Loading...
Searching...
No Matches
buildings-propagation-loss-model.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2011, 2012 Centre Tecnologic de Telecomunicacions de Catalunya (CTTC)
3 *
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation;
7 *
8 * This program is distributed in the hope that it will be useful,
9 * but WITHOUT ANY WARRANTY; without even the implied warranty of
10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 * GNU General Public License for more details.
12 *
13 * You should have received a copy of the GNU General Public License
14 * along with this program; if not, write to the Free Software
15 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
16 *
17 * Author: Marco Miozzo <marco.miozzo@cttc.es>
18 * Nicola Baldo <nbaldo@cttc.es>
19 *
20 */
21
22#ifndef BUILDINGS_PROPAGATION_LOSS_MODEL_H_
23#define BUILDINGS_PROPAGATION_LOSS_MODEL_H_
24
25#include "ns3/nstime.h"
26#include "ns3/propagation-loss-model.h"
27#include "ns3/random-variable-stream.h"
28#include <ns3/building.h>
29#include <ns3/mobility-building-info.h>
30
31namespace ns3
32{
33
34class ShadowingLossModel;
35class JakesFadingLossModel;
36
56{
57 public:
62 static TypeId GetTypeId();
63
70 virtual double GetLoss(Ptr<MobilityModel> a, Ptr<MobilityModel> b) const = 0;
71
72 // inherited from PropagationLossModel
73 double DoCalcRxPower(double txPowerDbm,
75 Ptr<MobilityModel> b) const override;
76
77 protected:
97
105
107
114 {
115 public:
122 ShadowingLoss(double shadowingValue, Ptr<MobilityModel> receiver);
126 double GetLoss() const;
131
132 protected:
135 };
136
138 mutable std::map<Ptr<MobilityModel>, std::map<Ptr<MobilityModel>, ShadowingLoss>>
147
158
159 int64_t DoAssignStreams(int64_t stream) override;
160};
161
162} // namespace ns3
163
164#endif /* BUILDINGS_PROPAGATION_LOSS_MODEL_H_ */
This model allows the computation of shadowing loss.
Ptr< MobilityModel > m_receiver
The receiver mobility model.
This model provides means for simulating the following propagation phenomena in the presence of build...
double DoCalcRxPower(double txPowerDbm, Ptr< MobilityModel > a, Ptr< MobilityModel > b) const override
PropagationLossModel.
std::map< Ptr< MobilityModel >, std::map< Ptr< MobilityModel >, ShadowingLoss > > m_shadowingLossMap
Map of the shadowng loss.
double GetShadowing(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const
Calculate the shadowing loss.
double HeightLoss(Ptr< MobilityBuildingInfo > n) const
Calculate the height loss.
double m_shadowingSigmaOutdoor
Standard deviation of the normal distribution used to calculate the shadowing for outdoor nodes.
virtual double GetLoss(Ptr< MobilityModel > a, Ptr< MobilityModel > b) const =0
double m_shadowingSigmaExtWalls
Standard deviation of the normal distribution used to calculate the shadowing due to ext walls.
double m_shadowingSigmaIndoor
Standard deviation of the normal distribution used to calculate the shadowing for indoor nodes.
double ExternalWallLoss(Ptr< MobilityBuildingInfo > a) const
Calculate the external wall loss.
int64_t DoAssignStreams(int64_t stream) override
Assign a fixed random variable stream number to the random variables used by this model.
double m_lossInternalWall
loss from internal walls (in dBm)
double EvaluateSigma(Ptr< MobilityBuildingInfo > a, Ptr< MobilityBuildingInfo > b) const
Calculate the Standard deviation of the normal distribution used to calculate the shadowing.
Ptr< NormalRandomVariable > m_randVariable
Random variable.
double InternalWallsLoss(Ptr< MobilityBuildingInfo > a, Ptr< MobilityBuildingInfo > b) const
Calculate the internal wall loss.
Models the propagation loss through a transmission medium.
Smart pointer class similar to boost::intrusive_ptr.
Definition: ptr.h:78
a unique identifier for an interface.
Definition: type-id.h:60
Every class exported by the ns3 library is enclosed in the ns3 namespace.