World Ocean Simulation System (WOSS) library
|
Class for reading and manipulating results provided by any acoustic toolbox textual ARR file. More...
#include <ac-toolbox-arr-asc-reader.h>
Public Member Functions | |
ArrAscResReader () | |
ArrAscResReader (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 | |
TimeArr * | accessMap (double frequency, double tx_depth, double rx_depth, double rx_range) const |
::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) |
bool | getArrAscHeader () |
bool | getArrAscFile () |
Protected Attributes | |
bool | arr_asc_header_collected |
bool | arr_asc_file_collected |
::std::ifstream | file_reader |
::std::streampos | skip_header |
ArrData | arr_file |
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 textual ARR file.
Class ArrAscResReader stores TimeArr provided by any acoustic toolbox textual ARR file in a ArrData. It also offers TimeArr manipulation and Pressure conversion methods.
ArrAscResReader::ArrAscResReader | ( | ) |
ArrAscResReader default constructor
ArrAscResReader::ArrAscResReader | ( | const Woss *const | woss | ) |
ArrAscResReader constructor
woss | const pointer to a const Woss object |
|
inlineprotected |
Gets the TimeArr value from ArrData TimeArr array associated to given parameters
frequency | [hZ] |
tx_depth | transmitter depth [m] |
rx_depth | start receiver depth [m] |
rx_range | start receiver range [m] |
References arr_file, woss::ArrData::arr_values, and woss::ArrData::getTimeArrIndex().
Referenced by readTimeArr().
|
protected |
Process the ARR file data
References arr_asc_file_collected, arr_asc_header_collected, arr_file, woss::ArrData::arr_values, woss::BELLHOP_CREATOR_ARR_FILE_SYNTAX_0, woss::BELLHOP_CREATOR_ARR_FILE_SYNTAX_1, woss::BELLHOP_CREATOR_ARR_FILE_SYNTAX_2, woss::ResReader::file_name, file_reader, woss::ArrData::frequency, woss::BellhopWoss::getBellhopArrSyntax(), woss::Pressure::getTxLossDb(), woss::Woss::getWossId(), woss::ArrData::Nrd, woss::ArrData::Nrr, woss::ArrData::Nsd, woss::ArrData::rx_depths, woss::ArrData::rx_ranges, skip_header, woss::TimeArr::sumValue(), woss::ArrData::tx_depths, woss::Woss::usingDebug(), and woss::ResReader::woss_ptr.
Referenced by initialize().
|
protected |
Process the ARR file header
References arr_asc_header_collected, arr_file, woss::ArrData::arr_values, woss::BELLHOP_CREATOR_ARR_FILE_SYNTAX_2, woss::TimeArr::createArray(), woss::ResReader::file_name, file_reader, woss::ArrData::frequency, woss::BellhopWoss::getBellhopArrSyntax(), woss::Woss::getWossId(), woss::Singleton< T >::instance(), woss::ArrData::Nrd, woss::ArrData::Nrr, woss::ArrData::Nsd, woss::ArrData::rx_depths, woss::ArrData::rx_ranges, skip_header, woss::ArrData::tx_depths, woss::Woss::usingDebug(), and woss::ResReader::woss_ptr.
Referenced by initialize().
|
virtual |
Initializes the ArrAscResReader object, reads ARR file, and stores read TimeArr values
Implements woss::ResReader.
References woss::ResReader::file_name, getArrAscFile(), getArrAscHeader(), and woss::ResReader::woss_ptr.
|
virtual |
Gets the average Pressure value in given rx range-depth box. Returned Pressure is the coherent sum of the computed average TimeArr
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 arr_asc_file_collected, woss::Pressure::create(), woss::Pressure::createNotValid(), woss::Singleton< T >::instance(), and readMapAvgPressure().
|
protected |
Gets the average Pressure value in given rx range-depth box converted from ArrData TimeArr 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] |
References arr_file, woss::ArrData::arr_values, woss::ArrData::getTimeArrIndex(), woss::Woss::getWossId(), woss::Woss::usingDebug(), and woss::ResReader::woss_ptr.
Referenced by readAvgPressure().
|
virtual |
Gets a Pressure value for given range, depths. Returned Pressure is the coherent sum of the computed TimeArr
frequency | frequency [hZ] |
tx_depth | transmitter depth [m] |
rx_depth | receiver depth [m] |
rx_range | receiver range [m] |
Implements woss::ResReader.
References woss::Singleton< T >::instance(), and readTimeArr().
|
virtual |
Gets a TimeArr value for 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(), arr_asc_file_collected, woss::TimeArr::createNotValid(), and woss::Singleton< T >::instance().
Referenced by readPressure().
|
protected |
Boolean associated to the reading of ARR file data
Referenced by getArrAscFile(), readAvgPressure(), and readTimeArr().
|
protected |
Boolean associated to the reading of ARR file header
Referenced by getArrAscFile(), and getArrAscHeader().
|
protected |
Struct that holds TimeArr data read from ARR file
Referenced by accessMap(), getArrAscFile(), getArrAscHeader(), and readMapAvgPressure().
|
protected |
Input file stream
Referenced by getArrAscFile(), and getArrAscHeader().
|
protected |
Total lines to skip if ARR file header has already been read
Referenced by getArrAscFile(), and getArrAscHeader().