45 : TclClass(
"Module/UW/PHYSICALFROMDB")
73 "Empty string for the path_gainmaps_ file name");
83 "Empty string for the path_selfinterference_ file "
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();
128 const double &_source_depth,
const double &_destination_depth,
129 const double &_destination_distance)
140#if __cplusplus > 199711L
178 const double &_source_depth,
const double &_destination_depth,
179 const double &_destination_distance)
218 const int &_row_index,
const int &_column_index)
const
232 std::cerr <<
"Impossible to open file " <<
_file_name << std::endl;
245 std::cerr <<
"Impossible to open file " <<
_file_name << std::endl;
262 if (this->
isZero(return_value_)) {
271 const int &_source_depth,
const int &_tau_index)
const bool isZero(const double &value) const
Evaluates is the number passed as input is equal to zero.
const int & getDepthRoughness() const
Returns the depth_roughness_ parameter.
char * path_
Name of the trace file writter for the current node.
const int & getDistanceRoughness() const
Returns the distance_roughness_ parameter.
const int & getTimeRoughness() const
Returns the time_roughness_ parameter.
virtual int command(int, const char *const *)
TCL command interpreter.
ostringstream osstream_
Used to create strings.
const int & getTotalTime() const
Returns the total_time_ parameter.
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...
UnderwaterPhysicalfromdbClass()
TclObject * create(int, const char *const *)
char * path_selfinterference
Name of the trace file writter for the current node.
char * path_gainmaps
Name of the trace file writter for the current node.
virtual double getSelfInterference(const double &_time, const double &_source_depth, const double &_destination_depth, const double &_destination_distance)
Read from the self interference.
virtual double retrieveFromFile(const string &_file_name, const int &_row_index, const int &_column_index) const
Read from a file the value in a specific row - column.
UnderwaterPhysicalfromdb()
Constructor of UnderwaterMPhyBpskDb class.
virtual string createNameFile(const char *_path, const int &_time, const int &_source_depth, const int &_tau_index)
Create the name of the file to read.
virtual double getPER(double _snr, int _nbits, Packet *p)
Return the Packet Error Rate of the packet p passed as input.
const int & getTauIndex() const
Return the value of the tau_index parameter.
int tau_index
Tau index to load in the file.
virtual double getGain(const double &_time, const double &_source_depth, const double &_destination_depth, const double &_destination_distance)
Read from the gain.
virtual int command(int, const char *const *)
TCL command interpreter.
UnderwaterPhysicalfromdbClass class_UnderwaterPhysicalfromdb
Definition of UnderwaterPhysicalfromdb class.