From 9041f3ed1f39335d6e0eae103fef1ae2b6880757 Mon Sep 17 00:00:00 2001 From: Mathieu Lacage Date: Mon, 5 Nov 2007 14:54:40 +0100 Subject: [PATCH] Document the friis propagation model. --- src/devices/wifi/propagation-loss-model.cc | 9 +++++++ src/devices/wifi/propagation-loss-model.h | 30 +++++++++++++++++++++- 2 files changed, 38 insertions(+), 1 deletion(-) diff --git a/src/devices/wifi/propagation-loss-model.cc b/src/devices/wifi/propagation-loss-model.cc index 635209ba2..8c45a0855 100644 --- a/src/devices/wifi/propagation-loss-model.cc +++ b/src/devices/wifi/propagation-loss-model.cc @@ -52,6 +52,10 @@ static NumericDefaultValue g_friisSystemLoss ("FriisPropagationLossSystemLoss", "The system loss to use by default for every FriisPropagationLossModel", 1.0); +static NumericDefaultValue g_friisPropagationLossMinDistance +("FriisPropagationLossMinDistance", + "The distance under which the propagation model refuses to give results (m)", + 0.5); static RandomVariableDefaultValue g_random ("RandomPropagationLossDistribution", @@ -198,6 +202,11 @@ FriisPropagationLossModel::GetRxPower (double txPowerDbm, * lambda: wavelength (m) */ double distance = a->GetDistanceFrom (b); + if (distance <= g_friisPropagationLossMinDistance.GetValue ()) + { + NS_FATAL_ERROR ("The friis propagation loss model is invalid when d="<< + distance<<"m << "<