14#include "ns3/mobility-model.h"
26 static TypeId tid =
TypeId(
"ns3::ThreeGppV2vUrbanChannelConditionModel")
28 .SetGroupName(
"Buildings")
60 pLos = std::min(1.0, 1.05 * exp(-0.0114 * distance2D));
92 static TypeId tid =
TypeId(
"ns3::ThreeGppV2vHighwayChannelConditionModel")
94 .SetGroupName(
"Buildings")
105 std::placeholders::_1,
106 std::placeholders::_2);
130 if (distance2D <= 475.0)
132 pLos = std::min(1.0, 2.1013e-6 * distance2D * distance2D - 0.002 * distance2D + 1.0193);
136 pLos = std::max(0.0, 0.54 - 0.001 * (distance2D - 475.0));
171 std::placeholders::_1,
172 std::placeholders::_2);
180 std::placeholders::_1,
181 std::placeholders::_2);
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
std::function< Ptr< ChannelCondition >(Ptr< const MobilityModel >, Ptr< const MobilityModel >)> ComputeChCond
The callback which is hooked to a method to compute channel condition.
double ComputePnlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Compute the NLOS probability.
ThreeGppV2vHighwayChannelConditionModel()
Constructor for the ThreeGppV2vHighwayChannelConditionModel class.
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 ",...
Ptr< T > CreateObject(Args &&... args)
Create an object by type, with varying number of constructor parameters.
#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.