48 : TclClass(
"Module/UW/GAINFROMDB")
61 , distance_roughness_(1)
63 , frequency_correction_factor_(1)
98 double x_ = (
ph->srcPosition)->getX();
99 double y_ = (
ph->srcPosition)->getY();
100 double z_ = (
ph->srcPosition)->getZ();
101 double x_dst_ = (
ph->dstPosition)->getX();
102 double y_dst_ = (
ph->dstPosition)->getY();
103 double z_dst_ = (
ph->dstPosition)->getZ();
114 if ((
ph->Pn +
ph->Pi) != 0) {
118 cerr <<
"ph->Pn + ph->Pi = 0!" <<
endl;
157 const double &_frequency_correction_factor)
166 const double &_destination_depth,
const double &_destination_distance)
194 const int &_row_index,
const int &_column_index)
const
237 if (this->
isZero(return_value_)) {
UnderwaterGainFromDbClass()
TclObject * create(int, const char *const *)
double frequency_correction_factor_
used to shift from a frequency value to another one.
const bool isZero(const double &value) const
Evaluates is the number passed as input is equal to zero.
int time_roughness_
Roughness of the temporal samples.
virtual void setDistanceRoughness(const int &)
Sets the distance_roughness_ parameter.
char * path_
Name of the trace file writter for the current node.
virtual int command(int, const char *const *)
TCL command interpreter.
virtual void setTotalTime(const int &)
Sets the total_time_ parameter.
ostringstream osstream_
Used to create strings.
virtual void setTimeRoughness(const int &)
Sets the time_roughness_ parameter.
int depth_roughness_
Roughness of the depth samples.
virtual void setDepthRoughness(const int &)
Sets the depth_roughness_ parameter.
virtual void setFrequencyCorrectionFactor(const double &)
Sets the frequency_correction_factor_ parameter.
virtual double retriveGainFromFile(const string &, const int &, const int &) const
virtual double getPER(double snr, int nbits, Packet *p)
Returns the packet error rate by using the length of a packet and the information contained in the pa...
virtual double getGain(const double &, const double &, const double &, const double &)
int total_time_
Maximum value of the temporal samples, after this limit the smilulation time will be reset to zero.
UnderwaterGainFromDb()
Constructor of UnderwaterMPhyBpskDb class.
int distance_roughness_
Roughness of the distance samples.
virtual string createNameFile(const int &, const int &)
Creates the name of the file to load.
char token_separator_
Token used to parse the elements in a line of the database.
virtual double getPER(double snr, int nbits, Packet *)
Returns the packet error rate by using the length of a packet and the information contained in the pa...
virtual int command(int, const char *const *)
TCL command interpreter.
UnderwaterGainFromDbClass class_UnderwaterGainFromDb
Definition of UnderwaterGainFromDb class.
Provides the UWIP packets header description. Definition of the class that define the network layer.