25 #include "ns3/mobility-model.h"
37 static TypeId tid =
TypeId(
"ns3::ThreeGppV2vUrbanChannelConditionModel")
39 .SetGroupName(
"Buildings")
71 pLos =
std::min(1.0, 1.05 * exp(-0.0114 * distance2D));
103 static TypeId tid =
TypeId(
"ns3::ThreeGppV2vHighwayChannelConditionModel")
105 .SetGroupName(
"Buildings")
116 std::placeholders::_1,
117 std::placeholders::_2);
141 if (distance2D <= 475.0)
143 pLos =
std::min(1.0, 2.1013e-6 * distance2D * distance2D - 0.002 * distance2D + 1.0193);
147 pLos =
std::max(0.0, 0.54 - 0.001 * (distance2D - 475.0));
182 std::placeholders::_1,
183 std::placeholders::_2);
191 std::placeholders::_1,
192 std::placeholders::_2);
211 cond->SetO2iCondition(ChannelCondition::O2iConditionValue::O2O);
212 cond->SetLosCondition(ChannelCondition::LosConditionValue::LOS);
Smart pointer class similar to boost::intrusive_ptr.
Base class for the 3GPP channel condition models.
static double Calculate2dDistance(const Vector &a, const Vector &b)
Computes the 2D distance between two 3D vectors.
Computes the channel condition for the V2V Highway scenario.
Ptr< ChannelCondition > GetChCondWithNoBuildings(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const
Get the channel condition between a and b.
Ptr< ChannelCondition > GetChCondWithBuildings(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const
Get the channel condition between a and b using BuildingsChannelConditionModel.
Ptr< BuildingsChannelConditionModel > m_buildingsCcm
used to determine the obstructions due to buildings
double ComputePnlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Compute the NLOS probability.
ThreeGppV2vHighwayChannelConditionModel()
Constructor for the ThreeGppV2vHighwayChannelConditionModel class.
std::function< Ptr< ChannelCondition >Ptr< const MobilityModel >, Ptr< const MobilityModel >)> ComputeChCond
The callback which is hooked to a method to compute channel condition.
static TypeId GetTypeId()
Get the type ID.
double ComputePlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Compute the LOS probability as specified in Table Table 6.2-1 of 3GPP TR 37.885 for the V2V Highway s...
Ptr< ChannelCondition > GetChCondAndFixCallback(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b)
Get the channel condition and redirect the callback ComputeChCond to GetChCondWithBuildings or to Get...
~ThreeGppV2vHighwayChannelConditionModel() override
Destructor for the ThreeGppV2vHighwayChannelConditionModel class.
Computes the channel condition for the V2V Urban scenario.
static TypeId GetTypeId()
Get the type ID.
Ptr< BuildingsChannelConditionModel > m_buildingsCcm
used to determine the obstructions due to buildings
double ComputePnlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Compute the NLOS probability.
ThreeGppV2vUrbanChannelConditionModel()
Constructor for the ThreeGppV2vUrbanChannelConditionModel class.
double ComputePlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Compute the LOS probability as specified in Table Table 6.2-1 of 3GPP TR 37.885 for the V2V Urban sce...
~ThreeGppV2vUrbanChannelConditionModel() override
Destructor for the ThreeGppV2vUrbanChannelConditionModel class.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
#define NS_ASSERT_MSG(condition, message)
At runtime, in debugging builds, if this condition is not true, the program prints the message to out...
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#define NS_LOG_FUNCTION(parameters)
If log level LOG_FUNCTION is enabled, this macro will output all input parameters separated by ",...
#define NS_OBJECT_ENSURE_REGISTERED(type)
Register an Object subclass with the TypeId system.
Every class exported by the ns3 library is enclosed in the ns3 namespace.