12#include "ns3/mobility-model.h" 
   13#include "ns3/string.h" 
   26        TypeId(
"ns3::ProbabilisticV2vUrbanChannelConditionModel")
 
   28            .SetGroupName(
"Propagation")
 
   30            .AddAttribute(
"Density",
 
   31                          "Specifies the density of the vehicles in the scenario." 
   32                          "It can be set to Low, Medium or High.",
 
 
   65        pLos = std::min(1.0, std::max(0.0, 0.8548 * exp(-0.0064 * distance2D)));
 
   68        pLos = std::min(1.0, std::max(0.0, 0.8372 * exp(-0.0114 * distance2D)));
 
   71        pLos = std::min(1.0, std::max(0.0, 0.8962 * exp(-0.017 * distance2D)));
 
   74        NS_FATAL_ERROR(
"Undefined density, choose between Low, Medium and High");
 
 
   95                     1 / (0.0396 * distance2D) *
 
   96                         exp(-(log(distance2D) - 5.2718) * (log(distance2D) - 5.2718) / 3.4827)));
 
  102                     1 / (0.0312 * distance2D) *
 
  103                         exp(-(log(distance2D) - 5.0063) * (log(distance2D) - 5.0063) / 2.4544)));
 
  109                     1 / (0.0242 * distance2D) *
 
  110                         exp(-(log(distance2D) - 5.0115) * (log(distance2D) - 5.0115) / 2.2092)));
 
  113        NS_FATAL_ERROR(
"Undefined density, choose between Low, Medium and High");
 
 
  129        TypeId(
"ns3::ProbabilisticV2vHighwayChannelConditionModel")
 
  131            .SetGroupName(
"Propagation")
 
  133            .AddAttribute(
"Density",
 
  134                          "Specifies the density of the vehicles in the scenario." 
  135                          "It can be set to Low, Medium or High.",
 
 
  185        NS_FATAL_ERROR(
"Undefined density, choose between Low, Medium and High");
 
  189        std::min(1.0, std::max(0.0, aLos * distance2D * distance2D + bLos * distance2D + cLos));
 
 
  222        NS_FATAL_ERROR(
"Undefined density, choose between Low, Medium and High");
 
  226        std::min(1.0, std::max(0.0, aNlos * pow(distance2D, 2) + bNlos * distance2D + cNlos));
 
 
Hold variables of type enum.
Computes the channel condition for the V2V Highway scenario.
static TypeId GetTypeId()
Get the type ID.
VehicleDensity m_densityHighway
vehicle density
double ComputePnlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Compute the NLOS probability.
~ProbabilisticV2vHighwayChannelConditionModel() override
Destructor for the ProbabilisticV2vHighwayChannelConditionModel class.
ProbabilisticV2vHighwayChannelConditionModel()
Constructor for the ProbabilisticV2vHighwayChannelConditionModel class.
double ComputePlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Compute the LOS probability.
Computes the channel condition for the V2V Urban scenario.
VehicleDensity m_densityUrban
vehicle density
static TypeId GetTypeId()
Get the type ID.
double ComputePnlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Compute the NLOS probability.
~ProbabilisticV2vUrbanChannelConditionModel() override
Destructor for the ProbabilisticV2vUrbanChannelConditionModel class.
ProbabilisticV2vUrbanChannelConditionModel()
Constructor for the ProbabilisticV2vUrbanChannelConditionModel class.
double ComputePlos(Ptr< const MobilityModel > a, Ptr< const MobilityModel > b) const override
Compute the LOS probability.
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.
a unique identifier for an interface.
TypeId SetParent(TypeId tid)
Set the parent TypeId.
Ptr< const AttributeAccessor > MakeEnumAccessor(T1 a1)
Create an AttributeAccessor for a class data member, or a lone class get functor or set method.
#define NS_FATAL_ERROR(msg)
Report a fatal error with a message and terminate.
#define NS_LOG_COMPONENT_DEFINE(name)
Define a Log component with a specific name.
#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.
Ptr< const AttributeChecker > MakeEnumChecker(T v, std::string n, Ts... args)
Make an EnumChecker pre-configured with a set of allowed values by name.