World Ocean Simulation System (WOSS) library
|
base class for implementing acoustic-toolbox channel simulators (Bellhop, Kraken, etc...) More...
#include <ac-toolbox-woss.h>
Public Member Functions | |
ACToolboxWoss () | |
ACToolboxWoss (const CoordZ &tx, const CoordZ &rx, const Time &start_t, const Time &end_t, double start_freq, double end_freq, double freq_step) | |
virtual | ~ACToolboxWoss () |
virtual bool | initialize () |
virtual bool | isValid () const |
ACToolboxWoss & | setRangeSteps (int steps) |
ACToolboxWoss & | setSSPDepthPrecision (long double precision) |
int | getRangeSteps () const |
long double | getSSPDepthPrecision () const |
int | getMinSSPDepthSteps () const |
int | getMaxSSPDepthSteps () const |
double | getMinSSPDepth () const |
double | getMaxSSPDepth () const |
double | getMinBathymteryDepth () const |
double | getMaxBathymetryDepth () const |
Public Member Functions inherited from woss::WossResReader | |
WossResReader () | |
WossResReader (const CoordZ &tx, const CoordZ &rx, const Time &start_t, const Time &end_t, double start_freq, double end_freq, double freq_step) | |
virtual bool | initResReader (double curr_frequency)=0 |
Public Member Functions inherited from woss::Woss | |
Woss () | |
Woss (const CoordZ &tx, const CoordZ &rx, const Time &start_t, const Time &end_t, double start_freq, double end_freq, double freq_step) | |
virtual bool | run ()=0 |
virtual bool | timeEvolve (const Time &time_value)=0 |
virtual Pressure * | getAvgPressure (double frequency, double tx_depth, double start_rx_depth=WOSS_MIN_DEPTH, double start_rx_range=WOSS_MIN_RANGE, double end_rx_depth=WOSS_MAX_DEPTH, double end_rx_range=WOSS_MAX_RANGE) const =0 |
virtual Pressure * | getPressure (double frequency, double tx_depth, double rx_depth, double rx_range) const =0 |
virtual TimeArr * | getTimeArr (double frequency, double tx_depth, double rx_depth, double rx_range) const =0 |
Woss & | setDebug (bool flag) |
Woss & | setCleanWorkDir (bool flag) |
Woss & | setWorkDirPath (const ::std::string &path) |
Woss & | setWossDbManager (const WossDbManager *const ptr) |
Woss & | insertFrequency (double freq) |
Woss & | insertFrequencies (double freq_start, double freq_end, double freq_step) |
Woss & | setFrequencies (const FreqSet &freq_set) |
Woss & | eraseFrequency (double freq) |
Woss & | clearFrequencies () |
Woss & | setTotalRuns (int runs) |
Woss & | setTxCoordZ (const CoordZ &coordz) |
Woss & | setRxCoordZ (const CoordZ &coordz) |
Woss & | setStartTime (const Time &start_t) |
Woss & | setEndTime (const Time &end_t) |
Woss & | setEvolutionTimeQuantum (double value) |
int | getWossId () const |
::std::string | getWorkDirPath () const |
const FreqSet & | getFrequencies () const |
double | getMinFrequency () const |
double | getMaxFrequency () const |
FreqSCIt | freq_begin () const |
FreqSCIt | freq_end () const |
FreqSCRIt | freq_rbegin () const |
FreqSCRIt | freq_rend () const |
FreqSCIt | freq_lower_bound (double frequency) const |
FreqSCIt | freq_upper_bound (double frequency) const |
int | getTotalRuns () const |
CoordZ | getTxCoordZ () const |
CoordZ | getRxCoordZ () const |
Time | getStartTime () const |
Time | getCurrentTime () const |
Time | getEndTime () const |
double | getEvolutionTimeQuantum () const |
double | getGreatCircleDistance () const |
double | getDistance () const |
double | getBearing () const |
bool | usingDebug () const |
virtual bool | isRunning () const |
Protected Member Functions | |
virtual bool | checkSSPUnicity (SSP *&ptr) |
virtual bool | initRangeVector () |
virtual bool | initCoordZVector () |
virtual bool | initSediment () |
virtual bool | initAltimetry () |
virtual bool | initSSPVector () |
virtual void | resetSSPVector () |
Protected Member Functions inherited from woss::WossResReader | |
void | clearResReaderMap () |
Protected Member Functions inherited from woss::Woss | |
virtual bool | mkWorkDir (double curr_frequency, int curr_run=0) |
virtual bool | rmWorkDir (double curr_frequency, int curr_run=0) |
virtual bool | rmWorkDir () |
Additional Inherited Members | |
Static Protected Attributes inherited from woss::Woss | |
static pthread_spinlock_t | woss_mutex = woss::initWossSpinlock( &Woss::woss_mutex , 0 ) |
static int | woss_counter = 0 |
base class for implementing acoustic-toolbox channel simulators (Bellhop, Kraken, etc...)
Class ACToolboxWoss should be the base class of any Woss that wants to implement any acoustic-toolbox channel simulator (Bellhop, Kraken, Fields, Sparc, etc...)
ACToolboxWoss::ACToolboxWoss | ( | ) |
ACToolboxWoss default constructor. Default constructed objects are not valid
ACToolboxWoss::ACToolboxWoss | ( | const CoordZ & | tx, |
const CoordZ & | rx, | ||
const Time & | start_t, | ||
const Time & | end_t, | ||
double | start_freq, | ||
double | end_freq, | ||
double | freq_step | ||
) |
ACToolboxWoss constructor
tx | const reference to a valid CoordZ object ( transmitter ) |
rx | const reference to a valid CoordZ object ( receiver ) |
start_t | const reference to a valid Time object for SSP's averaging purposes ( start date time ) |
end_t | const reference to a valid Time object for SSP's averaging purposes ( end date time ) |
start_freq | start frequency [Hz] |
end_freq | end frequency [Hz] |
freq_step | frequency step [Hz] |
|
virtual |
Destructor. It properly delete all pointers involved
References altimetry_value, resetSSPVector(), and sediment_value.
|
protectedvirtual |
Checks if the given SSP is not equal to previous values
value | pointer to a valid SSP object |
References ssp_unique_indexes, and ssp_vector.
Referenced by initSSPVector().
|
inline |
Gets the maximum depth of bathymetry in use
References max_bathymetry_depth.
|
inline |
Gets the maximum depth of all SSP currently in use
References max_ssp_depth_set.
|
inline |
Gets the maximum number depth steps of all SSP currently in use
References max_ssp_depth_steps.
|
inline |
Gets the minimum depth of bathymetry in use
References min_bathymetry_depth.
|
inline |
Gets the minimum depth of all SSP currently in use
References min_ssp_depth_set.
|
inline |
Gets the minimum number depth steps of all SSP currently in use
References min_ssp_depth_steps.
|
inline |
Gets the total number of range steps
References total_range_steps.
|
inline |
Gets the depth precision for all SSP that will be created
References ssp_depth_precision.
|
protectedvirtual |
Initializes altimetry_value
References altimetry_value, woss::Woss::db_manager, woss::Woss::debug, woss::WossDbManager::getAltimetry(), woss::Coord::getGreatCircleDistance(), woss::Altimetry::getMaxAltimetryValue(), woss::Altimetry::getMinAltimetryValue(), woss::Altimetry::getRange(), woss::Altimetry::getTotalRangeSteps(), woss::Altimetry::initialize(), woss::Altimetry::isValid(), max_altimetry_depth, max_bathymetry_depth, min_altimetry_depth, woss::Woss::rx_coordz, woss::Altimetry::setDepth(), woss::Altimetry::setRange(), woss::Altimetry::setTotalRangeSteps(), total_range_steps, woss::Woss::tx_coordz, and woss::Woss::woss_id.
Referenced by initialize().
|
protectedvirtual |
Initializes coordz_vector
References woss::Woss::bearing, coordz_vector, woss::Woss::db_manager, woss::Woss::debug, woss::WossDbManager::getBathymetry(), woss::Coord::getCoordFromBearing(), woss::CoordZ::isValid(), max_bathymetry_depth, min_bathymetry_depth, range_vector, woss::Woss::rx_coordz, woss::CoordZ::setDepth(), total_range_steps, woss::Woss::tx_coordz, and woss::Woss::woss_id.
Referenced by initialize().
|
virtual |
Initializes the enviroment for acoustic-toolbox channel simulator
Implements woss::Woss.
Reimplemented in woss::BellhopWoss.
References altimetry_value, coordz_vector, initAltimetry(), initCoordZVector(), woss::Woss::initialize(), initRangeVector(), initSediment(), initSSPVector(), max_altimetry_depth, max_bathymetry_depth, min_altimetry_depth, min_bathymetry_depth, range_vector, resetSSPVector(), and sediment_value.
Referenced by woss::BellhopWoss::initialize().
|
protectedvirtual |
Initializes range_vector
References woss::Woss::debug, range_vector, woss::Woss::total_great_circle_distance, total_range_steps, and woss::Woss::woss_id.
Referenced by initialize().
|
protectedvirtual |
Initializes sediment_value
References coordz_vector, woss::Woss::db_manager, woss::Woss::debug, woss::WossDbManager::getSediment(), woss::Sediment::isValid(), sediment_value, woss::Woss::tx_coordz, and woss::Woss::woss_id.
Referenced by initialize().
|
protectedvirtual |
Initializes ssp_vector
References checkSSPUnicity(), coordz_vector, woss::Woss::current_time, woss::Woss::db_manager, woss::Woss::debug, woss::SSP::getMaxDepthValue(), woss::SSP::getMinDepthValue(), woss::WossDbManager::getSSP(), is_ssp_vector_transformable, woss::SSP::isTransformable(), woss::SSP::isValid(), max_ssp_depth_set, max_ssp_depth_steps, min_ssp_depth_set, min_ssp_depth_steps, woss::SSP::size(), ssp_unique_indexes, ssp_vector, total_range_steps, woss::Woss::tx_coordz, and woss::Woss::woss_id.
Referenced by initialize().
|
virtual |
Checks the validity of ACToolboxWoss
Implements woss::Woss.
Reimplemented in woss::BellhopWoss.
References woss::Woss::end_time, woss::Woss::frequencies, woss::CoordZ::isValid(), woss::Time::isValid(), woss::Woss::rx_coordz, woss::Woss::start_time, and woss::Woss::tx_coordz.
Referenced by woss::BellhopWoss::isValid().
|
protectedvirtual |
|
inline |
Sets the total number of range steps
steps | total number of range steps |
References coordz_vector, range_vector, ssp_vector, and total_range_steps.
Referenced by woss::BellhopCreator::initializeBhWoss().
|
inline |
Sets the depth precision for all SSP that will be created
precision | depth precision [m] |
References ssp_depth_precision.
Referenced by woss::BellhopCreator::initializeBhWoss().
|
protected |
|
protected |
Vector of all CoordZ involved. Its size is equal to total_range_steps
Referenced by woss::BellhopWoss::checkDepthOffsets(), initCoordZVector(), initialize(), initSediment(), initSSPVector(), setRangeSteps(), and woss::BellhopWoss::writeBathymetryFile().
|
protected |
True if ssp_vector is transformable
Referenced by initSSPVector(), and woss::BellhopWoss::normalizeDbSSP().
|
protected |
Maximum altimetry depth [m]
Referenced by initAltimetry(), initialize(), and woss::BellhopWoss::writeAltimetryFile().
|
protected |
Maximum bathymetry depth [m]
Referenced by woss::BellhopWoss::checkDepthOffsets(), getMaxBathymetryDepth(), initAltimetry(), initCoordZVector(), initialize(), woss::BellhopWoss::initialize(), and woss::BellhopWoss::normalizeDbSSP().
|
protected |
Set of all maximum SSP depth [m] currently in use
Referenced by getMaxSSPDepth(), initSSPVector(), and woss::BellhopWoss::normalizeDbSSP().
|
protected |
Maximum number of currently in use SSP depth steps
Referenced by getMaxSSPDepthSteps(), initSSPVector(), and woss::BellhopWoss::normalizeDbSSP().
|
protected |
Minimum altimetry depth [m]
Referenced by initAltimetry(), initialize(), woss::BellhopWoss::normalizeDbSSP(), and woss::BellhopWoss::writeAltimetryFile().
|
protected |
Minimum bathymetry depth [m]
Referenced by getMinBathymteryDepth(), initCoordZVector(), and initialize().
|
protected |
Set of all minimum SSP depth [m] currently in use
Referenced by getMinSSPDepth(), initSSPVector(), and woss::BellhopWoss::normalizeDbSSP().
|
protected |
Miminum number of currently in use SSP depth steps
Referenced by getMinSSPDepthSteps(), initSSPVector(), and woss::BellhopWoss::normalizeDbSSP().
|
protected |
Vector of all ranges [m] involved. Its size is equal to total_range_steps
Referenced by initCoordZVector(), initialize(), initRangeVector(), woss::BellhopWoss::normalizeDbSSP(), setRangeSteps(), woss::BellhopWoss::writeAltimetryFile(), and woss::BellhopWoss::writeBathymetryFile().
|
protected |
Sediment in use
Referenced by initialize(), initSediment(), woss::BellhopWoss::writeSediment(), and ~ACToolboxWoss().
|
protected |
Depth precision of all SSP that will be created [m]
Referenced by getSSPDepthPrecision(), and setSSPDepthPrecision().
|
protected |
Set of of ssp_vector indexes that link to unique SSP
Referenced by checkSSPUnicity(), initSSPVector(), and woss::BellhopWoss::normalizeDbSSP().
|
protected |
Vector of all SSP involved. Its size is less or equal to total_range_steps
Referenced by checkSSPUnicity(), initSSPVector(), woss::BellhopWoss::normalizeDbSSP(), resetSSPVector(), and setRangeSteps().
|
protected |
Number of range steps
Referenced by getRangeSteps(), initAltimetry(), initCoordZVector(), initRangeVector(), initSSPVector(), woss::BellhopWoss::isValid(), and setRangeSteps().