39#ifndef UWOPTICAL_MPROPAGATION_H
40#define UWOPTICAL_MPROPAGATION_H
42#include <mpropagation.h>
47#define NOT_FOUND_C_VALUE -1
48#define NOT_VARIABLE_TEMPERATURE -20
52typedef ::std::map<double, c_temperat>
LUT_c;
83 virtual int command(
int,
const char *
const *);
93 virtual double getGain(Packet *p);
95 virtual void setWoss(
bool flag);
121 double getC(Packet *p = NULL);
170 double x,
double x1,
double x2,
double y1,
double y2);
193 double beta_,
double min_depth_,
double max_depth_);
Class used to represents the UWOPTICAL_MPROPAGATION.
virtual double getGain(Packet *p)
Calculate the gain following the Lambert and Beer's law.
bool variable_c_
Flag to set whether the attenuation is constant or not.
double theta_
Transmitting beam diverge angle [rad].
double linearInterpolator(double x, double x1, double x2, double y1, double y2)
Calculate the linear interpolation between two 2-D points.
virtual ~UwOpticalMPropagation()
Destructor of the UwOpticalMPropagation class.
char lut_token_separator_
LUT token separator.
virtual double getLambertBeerGain(double d, double beta_)
Calculate the gain following the Lambert and Beer's law.
double getLambertBeerGain_variableC(double beta_, double min_depth_, double max_depth_)
Calculate the gain following the Lambert and Beer's law in the case of variable c model.
virtual void initializeLUT()
Inizialize LUT of c_variable values.
bool omnidirectional_
Flag to set whether the system is omnidirectional or not.
double getC(Packet *p=NULL)
Provide the attenuation coefficient.
bool use_woss_
Flag to set the woss.
double getWossOrientation(Position *src, Position *dest)
Calculate the inclination angle between the transmitter and the receiver.
virtual void setWoss(bool flag)
double getTemperature(double depth)
Provide the temperature from LUT.
void updateC(double d)
Set the attenuation coefficient from lookup table when both the nodes are alligned and at the same de...
bool isOmnidirectional()
Provide if we are assuming omnidirectional tx and rx or not.
double c_
Beam light attenuation coefficient c = a + b [m^-1].
virtual int command(int, const char *const *)
TCL command interpreter.
string lut_file_name_
LUT file name.
LUT_c lut_c_
Lookup table map of the attenuation coefficient and the temperature versus the depth.
double getBeta(Packet *p)
Provide angle between transmitter and receiver.
UwOpticalMPropagation()
Constructor of the UwOpticalMPropagation class.
double At_
Transmitter size [m^2].
double Ar_
Receiver area [m^2].
::std::pair< double, double > c_temperat
::std::map< double, c_temperat > LUT_c
LUT_c::iterator LUT_c_iter