DESERT 3.5.1
Loading...
Searching...
No Matches
UwOpticalMPropagation Class Reference

#include <uwoptical-mpropagation.h>

Inheritance diagram for UwOpticalMPropagation:
Collaboration diagram for UwOpticalMPropagation:

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.

Definition at line 58 of file uwoptical-mpropagation.h.

Constructor & Destructor Documentation

◆ UwOpticalMPropagation()

UwOpticalMPropagation::UwOpticalMPropagation ( )

Constructor of the UwOpticalMPropagation class.

Definition at line 71 of file uwoptical-mpropagation.cpp.

◆ ~UwOpticalMPropagation()

virtual UwOpticalMPropagation::~UwOpticalMPropagation ( )
inlinevirtual

Destructor of the UwOpticalMPropagation class.

Definition at line 69 of file uwoptical-mpropagation.h.

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.

Definition at line 92 of file uwoptical-mpropagation.cpp.

◆ 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.

Definition at line 191 of file uwoptical-mpropagation.cpp.

◆ getC()

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

Provide the attenuation coefficient.

Returns
c.

Definition at line 220 of file uwoptical-mpropagation.cpp.

◆ 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.

Definition at line 269 of file uwoptical-mpropagation.cpp.

◆ 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.

Definition at line 315 of file uwoptical-mpropagation.cpp.

◆ 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.

Definition at line 360 of file uwoptical-mpropagation.cpp.

◆ getTemperature()

double UwOpticalMPropagation::getTemperature ( double  depth)

Provide the temperature from LUT.

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

Definition at line 430 of file uwoptical-mpropagation.cpp.

◆ 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

Definition at line 174 of file uwoptical-mpropagation.cpp.

◆ initializeLUT()

void UwOpticalMPropagation::initializeLUT ( )
protectedvirtual

Inizialize LUT of c_variable values.

Definition at line 325 of file uwoptical-mpropagation.cpp.

◆ isOmnidirectional()

bool UwOpticalMPropagation::isOmnidirectional ( )

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

Returns
if it is omnidirectional or not.

Definition at line 214 of file uwoptical-mpropagation.cpp.

◆ 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

Definition at line 351 of file uwoptical-mpropagation.cpp.

◆ setWoss()

void UwOpticalMPropagation::setWoss ( bool  flag)
virtual

Definition at line 147 of file uwoptical-mpropagation.cpp.

◆ 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.

Definition at line 153 of file uwoptical-mpropagation.cpp.

Member Data Documentation

◆ Ar_

double UwOpticalMPropagation::Ar_
protected

Receiver area [m^2].

Definition at line 195 of file uwoptical-mpropagation.h.

◆ At_

double UwOpticalMPropagation::At_
protected

Transmitter size [m^2].

Definition at line 196 of file uwoptical-mpropagation.h.

◆ c_

double UwOpticalMPropagation::c_
protected

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

Definition at line 197 of file uwoptical-mpropagation.h.

◆ debug_

int UwOpticalMPropagation::debug_

Definition at line 131 of file uwoptical-mpropagation.h.

◆ lut_c_

LUT_c UwOpticalMPropagation::lut_c_
protected

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

Definition at line 204 of file uwoptical-mpropagation.h.

◆ lut_file_name_

string UwOpticalMPropagation::lut_file_name_
protected

LUT file name.

Definition at line 206 of file uwoptical-mpropagation.h.

◆ lut_token_separator_

char UwOpticalMPropagation::lut_token_separator_
protected

LUT token separator.

Definition at line 207 of file uwoptical-mpropagation.h.

◆ omnidirectional_

bool UwOpticalMPropagation::omnidirectional_
protected

Flag to set whether the system is omnidirectional or not.

By default it is false

Definition at line 199 of file uwoptical-mpropagation.h.

◆ theta_

double UwOpticalMPropagation::theta_
protected

Transmitting beam diverge angle [rad].

Definition at line 198 of file uwoptical-mpropagation.h.

◆ use_woss_

bool UwOpticalMPropagation::use_woss_
protected

Flag to set the woss.

By default it is false

Definition at line 203 of file uwoptical-mpropagation.h.

◆ variable_c_

bool UwOpticalMPropagation::variable_c_
protected

Flag to set whether the attenuation is constant or not.

By default it is false

Definition at line 201 of file uwoptical-mpropagation.h.


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