DESERT 4.0.0
UwOpticalMPropagation Class Reference

#include <uwoptical-mpropagation.h>

Inheritance diagram for UwOpticalMPropagation:
Inheritance graph
Collaboration diagram for UwOpticalMPropagation:
Collaboration graph

Public Member Functions

 UwOpticalMPropagation ()
 
virtual ~UwOpticalMPropagation ()
 
virtual int command (int, const char *const *)
 
virtual double getGain (Packet *p)
 
virtual void setWoss (bool flag)
 
double getTemperature (double depth)
 
double getBeta (Packet *p)
 
double getC (Packet *p=NULL)
 
bool isOmnidirectional ()
 

Public Attributes

int debug_
 

Protected Member Functions

virtual double getLambertBeerGain (double d, double beta_)
 
virtual void initializeLUT ()
 
double getWossOrientation (Position *src, Position *dest)
 
double linearInterpolator (double x, double x1, double x2, double y1, double y2)
 
void updateC (double d)
 
double getLambertBeerGain_variableC (double beta_, double min_depth_, double max_depth_)
 

Protected Attributes

double Ar_
 
double At_
 
double c_
 
double theta_
 
bool omnidirectional_
 
bool variable_c_
 
bool use_woss_
 
LUT_c lut_c_
 
string lut_file_name_
 
char lut_token_separator_
 

Detailed Description

Class used to represents the UWOPTICAL_MPROPAGATION.

Constructor & Destructor Documentation

◆ UwOpticalMPropagation()

UwOpticalMPropagation::UwOpticalMPropagation ( )

Constructor of the UwOpticalMPropagation class

References Ar_, At_, c_, debug_, and theta_.

◆ ~UwOpticalMPropagation()

virtual UwOpticalMPropagation::~UwOpticalMPropagation ( )
inlinevirtual

Destructor of the UwOpticalMPropagation class

Member Function Documentation

◆ command()

int UwOpticalMPropagation::command ( int  argc,
const char *const *  argv 
)
virtual

TCL command interpreter. It implements the following OTcl methods:

Parameters
argcNumber of arguments in argv.
argvArray of strings which are the command parameters (Note that argv[0] is the name of the object).
Returns
TCL_OK or TCL_ERROR whether the command has been dispatched successfully or not.

References Ar_, At_, c_, initializeLUT(), lut_file_name_, lut_token_separator_, omnidirectional_, theta_, and variable_c_.

Here is the call graph for this function:

◆ getBeta()

double UwOpticalMPropagation::getBeta ( Packet *  p)

Provide angle between transmitter and receiver.

Parameters
Packet*Pointer to the packet that has to be received.
Returns
the angle between transmitter and receiver.

References getWossOrientation(), and use_woss_.

Referenced by getGain().

Here is the call graph for this function:

◆ getC()

double UwOpticalMPropagation::getC ( Packet *  p = NULL)

Provide the attenuation coefficient.

Returns
c.

References c_, lut_c_, use_woss_, and variable_c_.

◆ getGain()

double UwOpticalMPropagation::getGain ( Packet *  p)
virtual

Calculate the gain following the Lambert and Beer's law

Parameters
Packet*Pointer to the packet that has to be received.
Returns
the gain due to the optical propagation.

References debug_, getBeta(), getLambertBeerGain(), getLambertBeerGain_variableC(), updateC(), use_woss_, and variable_c_.

Here is the call graph for this function:

◆ getLambertBeerGain()

double UwOpticalMPropagation::getLambertBeerGain ( double  d,
double  beta_ 
)
protectedvirtual

Calculate the gain following the Lambert and Beer's law

Parameters
dDistance between transmitter and receiver.
betainclination angle between the transmitter and the receiver.
Returns
the gain due to the optical propagation.

References Ar_, At_, c_, omnidirectional_, and theta_.

Referenced by getGain().

◆ getLambertBeerGain_variableC()

double UwOpticalMPropagation::getLambertBeerGain_variableC ( double  beta_,
double  min_depth_,
double  max_depth_ 
)
protected

Calculate the gain following the Lambert and Beer's law in the case of variable c model

Parameters
beta_
min_depth_the max between depth of rx and depth of tx.
max_depth_the min between depth of rx and depth of tx.
Returns
the gain due to the optical propagation in the case of variable c model.

References Ar_, At_, debug_, linearInterpolator(), lut_c_, omnidirectional_, and theta_.

Referenced by getGain().

Here is the call graph for this function:

◆ getTemperature()

double UwOpticalMPropagation::getTemperature ( double  depth)

Provide the temperature from LUT

Parameters
depthdepth of the receiver.
Returns
the temperature at certain depth.

References linearInterpolator(), lut_c_, and variable_c_.

Here is the call graph for this function:

◆ getWossOrientation()

double UwOpticalMPropagation::getWossOrientation ( Position *  src,
Position *  dest 
)
protected

Calculate the inclination angle between the transmitter and the receiver

Parameters
srcpointer to the transmitter position.
destpointer to the receiver position.
Returns
the inclination angle between the transmitter and the receiver

References debug_.

Referenced by getBeta().

◆ initializeLUT()

void UwOpticalMPropagation::initializeLUT ( )
protectedvirtual

Inizialize LUT of c_variable values

References lut_c_, lut_file_name_, and lut_token_separator_.

Referenced by command().

◆ isOmnidirectional()

bool UwOpticalMPropagation::isOmnidirectional ( )

Provide if we are assuming omnidirectional tx and rx or not.

Returns
if it is omnidirectional or not.

References omnidirectional_.

◆ linearInterpolator()

double UwOpticalMPropagation::linearInterpolator ( double  x,
double  x1,
double  x2,
double  y1,
double  y2 
)
protected

Calculate the linear interpolation between two 2-D points

Parameters
xx-coordinate of which we need to finde the value.
x1x-coordinate of the first point
x2x-coordinate of the second point
y1y-coordinate of the first point
y2y-coordinate of the second point
Returns
the value assumed by y obtained by linear interpolation

References q.

Referenced by getLambertBeerGain_variableC(), getTemperature(), and updateC().

◆ setWoss()

void UwOpticalMPropagation::setWoss ( bool  flag)
virtual

References use_woss_.

◆ updateC()

void UwOpticalMPropagation::updateC ( double  d)
protected

Set the attenuation coefficient from lookup table when both the nodes are alligned and at the same depth

Parameters
ddepth of the nodes.

References c_, linearInterpolator(), and lut_c_.

Referenced by getGain().

Here is the call graph for this function:

Member Data Documentation

◆ Ar_

double UwOpticalMPropagation::Ar_
protected

◆ At_

double UwOpticalMPropagation::At_
protected

◆ c_

double UwOpticalMPropagation::c_
protected

Beam light attenuation coefficient c = a + b [m^-1]

Referenced by command(), getC(), getLambertBeerGain(), updateC(), and UwOpticalMPropagation().

◆ debug_

int UwOpticalMPropagation::debug_

◆ lut_c_

LUT_c UwOpticalMPropagation::lut_c_
protected

Lookup table map of the attenuation coefficient and the temperature versus the depth

Referenced by getC(), getLambertBeerGain_variableC(), getTemperature(), initializeLUT(), and updateC().

◆ lut_file_name_

string UwOpticalMPropagation::lut_file_name_
protected

LUT file name

Referenced by command(), and initializeLUT().

◆ lut_token_separator_

char UwOpticalMPropagation::lut_token_separator_
protected

LUT token separator

Referenced by command(), and initializeLUT().

◆ omnidirectional_

bool UwOpticalMPropagation::omnidirectional_
protected

Flag to set whether the system is omnidirectional or not. By default it is false

Referenced by command(), getLambertBeerGain(), getLambertBeerGain_variableC(), and isOmnidirectional().

◆ theta_

double UwOpticalMPropagation::theta_
protected

Transmitting beam diverge angle [rad]

Referenced by command(), getLambertBeerGain(), getLambertBeerGain_variableC(), and UwOpticalMPropagation().

◆ use_woss_

bool UwOpticalMPropagation::use_woss_
protected

Flag to set the woss. By default it is false

Referenced by getBeta(), getC(), getGain(), and setWoss().

◆ variable_c_

bool UwOpticalMPropagation::variable_c_
protected

Flag to set whether the attenuation is constant or not. By default it is false

Referenced by command(), getC(), getGain(), and getTemperature().


The documentation for this class was generated from the following files: