PathLossModel.h Source File

Simu5G: PathLossModel.h Source File
Simu5G
PathLossModel.h
1//
2// Simu5G
3//
4// Copyright (C) 2012-2021 Giovanni Nardini, Giovanni Stea, Antonio Virdis et al. (University of Pisa)
5// Copyright (C) 2022-2026 Giovanni Nardini, Giovanni Stea et al. (University of Pisa)
6//
7// This file is part of a software released under the license included in file
8// "license.pdf". Please read LICENSE and README files before using it.
9// The above files and the present reference are part of the software itself,
10// and cannot be removed from it.
11//
12
13#ifndef STACK_PHY_CHANNELMODEL_PATHLOSSMODEL_H_
14#define STACK_PHY_CHANNELMODEL_PATHLOSSMODEL_H_
15
16#include "simu5g/common/LteCommon.h"
17
18namespace simu5g {
19
20using namespace omnetpp;
21
36{
37 protected:
38 cComponent *owner_ = nullptr; // RNG + parameter context
39
40 DeploymentScenario scenario_ = UNKNOWN_SCENARIO;
41 double hNodeB_ = 0;
42 double hUe_ = 0;
43 double hBuilding_ = 0;
44 double wStreet_ = 0;
45 bool inside_building_ = false;
46 double inside_distance_ = 0;
47 double carrierFrequencyHz_ = 0;
48 double carrierFrequencyGHz_ = 0;
49 double log10CarrierFrequencyGHz_ = 0;
50 bool tolerateMaxDistViolation_ = false;
51
52 /*
53 * Propagation velocity in free space, as the breakpoint-distance notes of
54 * all three reports define it. This is the rounded 3.0e8 m/s they write,
55 * not the exact speed of light: the breakpoint distance appears in the
56 * beyond-breakpoint path-loss formulas themselves and not only in the
57 * branch condition, so the two choices differ by about 0.005 dB on every
58 * LOS link past a breakpoint.
59 */
60 static constexpr double PROPAGATION_VELOCITY = 3.0e8;
61
62 public:
63 virtual ~PathLossModel() {}
64
65 /*
66 * Copy the deployment-scenario parameters the formulas need. Parameter
67 * ownership stays with the owning channel model; this only receives the
68 * values it has already read from its NED parameters.
69 */
70 virtual void initialize(cComponent *owner, DeploymentScenario scenario,
71 double hNodeB, double hUe, double hBuilding, double wStreet,
72 bool insideBuilding, double insideDistance,
73 double carrierFrequencyHz, double carrierFrequencyGHz, double log10CarrierFrequencyGHz,
74 bool tolerateMaxDistViolation);
75
76 /*
77 * Compute the path-loss attenuation according to the selected scenario.
78 * A concrete model that needs only one of the two distances ignores the
79 * other.
80 */
81 virtual double computePathLoss(double d3D, double d2D, bool los) = 0;
82
83 /*
84 * Compute the LOS probability according to the selected scenario.
85 * Returns the probability p; the caller draws against it and stores the
86 * outcome.
87 */
88 virtual double computeLosProbability(double d3D, double d2D) = 0;
89
90 /*
91 * Compute the standard deviation of the log-normal shadowing according
92 * to the selected scenario and the LOS state of the link.
93 */
94 virtual double getShadowingStdDev(double d3D, double d2D, bool losState) = 0;
95
96 /*
97 * Compute the attenuation caused by the antenna pattern for a given
98 * reception direction.
99 */
100 virtual double computeAngularAttenuation(double hAngle, double vAngle) = 0;
101};
102
103} //namespace
104
105#endif
Definition PathLossModel.h:36
Definition AlertReceiver.h:24