World Ocean Simulation System (WOSS) library
|
Class for reading and manipulating results provided by any acoustic toolbox SHD file. More...
#include <ac-toolbox-shd-reader.h>
Public Member Functions | |
ShdResReader () | |
ShdResReader (const Woss *const woss) | |
virtual bool | initialize () |
virtual Pressure * | readAvgPressure (double frequency, double tx_depth, double start_rx_depth, double start_rx_range, double end_rx_depth, double end_rx_range) |
virtual Pressure * | readPressure (double frequency, double tx_depth, double rx_depth, double rx_range) const |
virtual TimeArr * | readTimeArr (double frequency, double tx_depth, double rx_depth, double rx_range) const |
Public Member Functions inherited from woss::ResReader | |
ResReader () | |
ResReader (const Woss *const woss) | |
ResReader & | setWossPtr (const Woss *const woss) |
const Woss *const | getWossPtr () |
ResReader & | setFileName (const ::std::string &name) |
::std::string | getFileName () |
Protected Member Functions | |
::std::complex< double > | readMapAvgPressure (double frequency, double tx_depth, double start_rx_depth, double start_rx_range, double end_rx_depth, double end_rx_range, double theta=0.0) |
::std::complex< double > | accessMap (double frequency, double tx_depth, double rx_depth, double rx_range, double theta=0.0) const |
bool | getShdFile () |
bool | getShdHeader () |
Protected Attributes | |
bool | shd_header_collected |
bool | shd_file_collected |
::std::ifstream | file_reader |
ShdData | shd_file |
ShdData_v1 | shd_file_v1 |
double | last_tx_depth |
double | last_start_rx_depth |
double | last_start_rx_range |
double | last_end_rx_depth |
double | last_end_rx_range |
::std::complex< double > | last_ret_value |
Protected Attributes inherited from woss::ResReader | |
const Woss * | woss_ptr |
::std::string | file_name |
Class for reading and manipulating results provided by any acoustic toolbox SHD file.
Class ShdResReader stores Pressure provided by any acoustic toolbox SHD file in a ShdData. It also offers Pressure manipulation and TimeArr conversion methods.
ShdResReader::ShdResReader | ( | ) |
ShdResReader default constructor
ShdResReader::ShdResReader | ( | const Woss *const | woss | ) |
ShdResReader constructor
woss | const pointer to a const Woss object |
|
protected |
Gets the Pressure value from ShdData Pressure array associated to given parameters
frequency | frequency [hZ] |
tx_depth | transmitter depth [m] |
rx_depth | start receiver depth [m] |
rx_range | start receiver range [m] |
theta | theta value |
References woss::BellhopWoss::getBellhopShdSyntax(), woss::ShdData::getPressureIndex(), woss::ShdData_v1::getPressureIndex(), woss::Woss::getWossId(), woss::ShdData::press_values, woss::ShdData_v1::press_values, shd_file, shd_file_v1, and woss::ResReader::woss_ptr.
Referenced by readPressure(), and readTimeArr().
|
protected |
Process the SHD file data
References woss::ResReader::file_name, file_reader, woss::BellhopWoss::getBellhopShdSyntax(), woss::Pressure::getTxLossDb(), woss::Woss::getWossId(), woss::ShdData::Nrd, woss::ShdData_v1::Nrd, woss::ShdData::Nrr, woss::ShdData_v1::Nrr, woss::ShdData::Nrx_per_range, woss::ShdData_v1::Nrx_per_range, woss::ShdData::Nsd, woss::ShdData_v1::Nsd, woss::ShdData::Ntheta, woss::ShdData_v1::Ntheta, woss::ShdData::press_values, woss::ShdData_v1::press_values, woss::ShdData::record_length, woss::ShdData_v1::record_length, woss::ShdData::rx_depths, woss::ShdData_v1::rx_depths, woss::ShdData::rx_ranges, woss::ShdData_v1::rx_ranges, shd_file, shd_file_collected, shd_file_v1, woss::ShdData::tx_depths, woss::ShdData_v1::tx_depths, woss::Woss::usingDebug(), and woss::ResReader::woss_ptr.
Referenced by initialize().
|
protected |
Process the SHD file header
References woss::ResReader::file_name, file_reader, woss::ShdData::frequency, woss::ShdData_v1::frequency, woss::BellhopWoss::getBellhopShdSyntax(), woss::Woss::getWossId(), woss::ShdData::Nrd, woss::ShdData_v1::Nrd, woss::ShdData::Nrr, woss::ShdData_v1::Nrr, woss::ShdData::Nrx_per_range, woss::ShdData_v1::Nrx_per_range, woss::ShdData::Nsd, woss::ShdData_v1::Nsd, woss::ShdData::Ntheta, woss::ShdData_v1::Ntheta, woss::ShdData::plot_type, woss::ShdData_v1::plot_type, woss::ShdData::press_values, woss::ShdData_v1::press_values, woss::ShdData::record_length, woss::ShdData_v1::record_length, woss::ShdData::rx_depths, woss::ShdData_v1::rx_depths, woss::ShdData::rx_ranges, woss::ShdData_v1::rx_ranges, shd_file, shd_file_v1, shd_header_collected, woss::ShdData::theta, woss::ShdData_v1::theta, woss::ShdData::tx_depths, woss::ShdData_v1::tx_depths, woss::Woss::usingDebug(), and woss::ResReader::woss_ptr.
Referenced by initialize().
|
virtual |
Initializes the ShdResReader object, reads SHD file, and stores read Pressure values
Implements woss::ResReader.
References woss::ResReader::file_name, getShdFile(), getShdHeader(), and woss::ResReader::woss_ptr.
|
virtual |
Gets the average Pressure value in given rx range-depth box
frequency | frequency [hZ] |
tx_depth | transmitter depth [m] |
start_rx_depth | start receiver depth [m] |
start_rx_range | start receiver range [m] |
end_rx_depth | end receiver depth [m] |
end_rx_range | end receiver range [m] |
Implements woss::ResReader.
References woss::Pressure::create(), woss::Pressure::createNotValid(), woss::Singleton< T >::instance(), readMapAvgPressure(), and shd_file_collected.
|
protected |
Gets the average Pressure value in given rx range-depth box from ShdData Pressure array
frequency | frequency [hZ] |
tx_depth | transmitter depth [m] |
start_rx_depth | start receiver depth [m] |
start_rx_range | start receiver range [m] |
end_rx_depth | end receiver depth [m] |
end_rx_range | end receiver range [m] |
theta | theta value |
References woss::BellhopWoss::getBellhopShdSyntax(), woss::ShdData::getPressureIndex(), woss::ShdData_v1::getPressureIndex(), woss::Woss::getWossId(), woss::ShdData::press_values, woss::ShdData_v1::press_values, shd_file, shd_file_v1, woss::Woss::usingDebug(), and woss::ResReader::woss_ptr.
Referenced by readAvgPressure().
|
virtual |
Gets a Pressure value of given range, depths
frequency | frequency [hZ] |
tx_depth | transmitter depth [m] |
rx_depth | receiver depth [m] |
rx_range | receiver range [m] |
Implements woss::ResReader.
References accessMap(), woss::Pressure::create(), woss::Pressure::createNotValid(), woss::Singleton< T >::instance(), and shd_file_collected.
|
virtual |
SHD files don't hold any time arrivals information. A special TimeArr is constructed from Pressure associated to given paramaters.
frequency | frequency [hZ] |
tx_depth | transmitter depth [m] |
rx_depth | receiver depth [m] |
rx_range | receiver range [m] |
Implements woss::ResReader.
References accessMap(), woss::TimeArr::create(), woss::Pressure::createNotValid(), woss::Singleton< T >::instance(), and shd_file_collected.
|
protected |
Input file stream
Referenced by getShdFile(), and getShdHeader().
|
protected |
Struct that holds Pressure data read from SHD file
Referenced by accessMap(), getShdFile(), getShdHeader(), and readMapAvgPressure().
|
protected |
Boolean associated to the reading of SHD file data
Referenced by getShdFile(), readAvgPressure(), readPressure(), and readTimeArr().
|
protected |
Struct that holds Pressure data read from SHD file with V1 syntax
Referenced by accessMap(), getShdFile(), getShdHeader(), and readMapAvgPressure().
|
protected |
Boolean associated to the reading of SHD file header
Referenced by getShdHeader().