-
Notifications
You must be signed in to change notification settings - Fork 513
Closed
Description
Hi,
I am looking into the source code for computing Rayleigh fading in INET/INETMANET
double RayleighFading::computePathLoss(mps propagationSpeed, Hz frequency, m distance) const | |
{ | |
m waveLength = propagationSpeed / frequency; | |
double freeSpacePathLoss = computeFreeSpacePathLoss(waveLength, distance, alpha, systemLoss); | |
double x = normal(0, 1); | |
double y = normal(0, 1); | |
return freeSpacePathLoss * 0.5 * (x * x + y * y); | |
} |
double RayleighFading::computePathLoss(mps propagationSpeed, Hz frequency, m distance) const
{
m waveLength = propagationSpeed / frequency;
double freeSpacePathLoss = computeFreeSpacePathLoss(waveLength, distance, alpha, systemLoss);
double x = normal(0, 1);
double y = normal(0, 1);
return freeSpacePathLoss * 0.5 * (x * x + y * y);
}
I would like to understand where 0.5 term comes from on the line with the return statement. As far as I know,
return freeSpacePathLoss * sqrt((x * x + y * y));
This has also been reported in the OMNeT++ discussions: omnetpp/omnetpp#1119.