Main Page | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

PathLossReceptionModel Class Reference

#include <PathLossReceptionModel.h>

Inheritance diagram for PathLossReceptionModel:

IReceptionModel List of all members.

Detailed Description

Path loss model which calculates the received power using a path loss exponent and the distance.


Public Member Functions

virtual void initializeFrom (cModule *radioModule)
virtual double calculateReceivedPower (double pSend, double carrierFrequency, double distance)

Private Attributes

double pathLossAlpha


Member Function Documentation

double PathLossReceptionModel::calculateReceivedPower double  pSend,
double  carrierFrequency,
double  distance
[virtual]
 

Perform the calculation.

Implements IReceptionModel.

00036 {
00037     const double speedOfLight = 300000000.0;
00038     double waveLength = speedOfLight / carrierFrequency;
00039     return (pSend * waveLength * waveLength / (16 * M_PI * M_PI * pow(distance, pathLossAlpha)));
00040 }

void PathLossReceptionModel::initializeFrom cModule *  radioModule  )  [virtual]
 

Parameters read from the radio module: pathLossAlpha.

Implements IReceptionModel.

00025 {
00026     pathLossAlpha = radioModule->par("pathLossAlpha");
00027 
00028     cModule *cc = simulation.moduleByPath("channelcontrol");
00029     if (!cc)
00030         opp_error("PathLossReceptionModel: module (ChannelControl)channelcontrol not found");
00031     if (pathLossAlpha < (double) (cc->par("alpha")))
00032         opp_error("PathLossReceptionModel: pathLossAlpha can't be smaller than in ChannelControl -- please adjust the parameters");
00033 }


Member Data Documentation

double PathLossReceptionModel::pathLossAlpha [private]
 


The documentation for this class was generated from the following files:
Generated on Thu Oct 19 18:22:27 2006 for INET Framework for OMNeT++/OMNEST by  doxygen 1.4.0