From 2fb7094e1a4f7cef547fdba777df4ef9810dc7a9 Mon Sep 17 00:00:00 2001 From: Marco Miozzo Date: Wed, 7 Sep 2011 12:36:56 +0200 Subject: [PATCH] Update for calculation of speed paramented needed by JakesFadingLossModel new version --- src/lte/model/lte-propagation-loss-model.cc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/lte/model/lte-propagation-loss-model.cc b/src/lte/model/lte-propagation-loss-model.cc index aaa425888..053394573 100644 --- a/src/lte/model/lte-propagation-loss-model.cc +++ b/src/lte/model/lte-propagation-loss-model.cc @@ -83,6 +83,11 @@ LtePropagationLossModel::DoCalcRxPowerSpectralDensity (Ptr Ptr rxPsd = Copy (txPsd); Values::iterator vit = rxPsd->ValuesBegin (); + + Vector aSpeedVector = a->GetVelocity (); + Vector bSpeedVector = b->GetVelocity (); + + double speed = sqrt (pow (aSpeedVector.x-bSpeedVector.x,2) + pow (aSpeedVector.y-bSpeedVector.y,2)); NS_LOG_FUNCTION (this << *rxPsd); @@ -92,7 +97,7 @@ LtePropagationLossModel::DoCalcRxPowerSpectralDensity (Ptr NS_ASSERT (subChannel < 100); if (*vit != 0.) { - multipath = c->GetJakesFadingLossModel ()->GetValue (subChannel); + multipath = c->GetJakesFadingLossModel ()->GetValue (subChannel, speed); // computei PROPRAGATION LOSS: double loss = multipath - pathLoss - shadowind - penetration; // in dB