World Ocean Simulation System (WOSS) library
woss::ACToolboxWoss Class Reference

base class for implementing acoustic-toolbox channel simulators (Bellhop, Kraken, etc...) More...

#include <ac-toolbox-woss.h>

Inheritance diagram for woss::ACToolboxWoss:
Inheritance graph
Collaboration diagram for woss::ACToolboxWoss:
Collaboration graph

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
 
ACToolboxWosssetRangeSteps (int steps)
 
ACToolboxWosssetSSPDepthPrecision (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 PressuregetAvgPressure (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 PressuregetPressure (double frequency, double tx_depth, double rx_depth, double rx_range) const =0
 
virtual TimeArrgetTimeArr (double frequency, double tx_depth, double rx_depth, double rx_range) const =0
 
WosssetDebug (bool flag)
 
WosssetCleanWorkDir (bool flag)
 
WosssetWorkDirPath (const ::std::string &path)
 
WosssetWossDbManager (const WossDbManager *const ptr)
 
WossinsertFrequency (double freq)
 
WossinsertFrequencies (double freq_start, double freq_end, double freq_step)
 
WosssetFrequencies (const FreqSet &freq_set)
 
WosseraseFrequency (double freq)
 
WossclearFrequencies ()
 
WosssetTotalRuns (int runs)
 
WosssetTxCoordZ (const CoordZ &coordz)
 
WosssetRxCoordZ (const CoordZ &coordz)
 
WosssetStartTime (const Time &start_t)
 
WosssetEndTime (const Time &end_t)
 
WosssetEvolutionTimeQuantum (double value)
 
int getWossId () const
 
::std::string getWorkDirPath () const
 
const FreqSetgetFrequencies () 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 ()
 

Protected Attributes

long double ssp_depth_precision
 
double min_bathymetry_depth
 
double max_bathymetry_depth
 
double min_altimetry_depth
 
double max_altimetry_depth
 
::std::set< double > min_ssp_depth_set
 
::std::set< double > max_ssp_depth_set
 
int min_ssp_depth_steps
 
int max_ssp_depth_steps
 
int total_range_steps
 
CoordZVector coordz_vector
 
RangeVector range_vector
 
SSPVector ssp_vector
 
::std::set< int > ssp_unique_indexes
 
Sedimentsediment_value
 
Altimetryaltimetry_value
 
bool is_ssp_vector_transformable
 
- Protected Attributes inherited from woss::WossResReader
ResReaderMap res_reader_map
 
- Protected Attributes inherited from woss::Woss
int woss_id
 
::std::string work_dir_path
 
const WossDbManagerdb_manager
 
Time start_time
 
Time current_time
 
Time end_time
 
double evolution_time_quantum
 
CoordZ tx_coordz
 
CoordZ rx_coordz
 
FreqSet frequencies
 
double bearing
 
double total_great_circle_distance
 
double total_distance
 
int total_runs
 
bool debug
 
bool has_run_once
 
volatile bool is_running
 
bool clean_workdir
 

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
 

Detailed Description

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...)

Constructor & Destructor Documentation

◆ ACToolboxWoss() [1/2]

ACToolboxWoss::ACToolboxWoss ( )

ACToolboxWoss default constructor. Default constructed objects are not valid

◆ ACToolboxWoss() [2/2]

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

Parameters
txconst reference to a valid CoordZ object ( transmitter )
rxconst reference to a valid CoordZ object ( receiver )
start_tconst reference to a valid Time object for SSP's averaging purposes ( start date time )
end_tconst reference to a valid Time object for SSP's averaging purposes ( end date time )
start_freqstart frequency [Hz]
end_freqend frequency [Hz]
freq_stepfrequency step [Hz]

◆ ~ACToolboxWoss()

ACToolboxWoss::~ACToolboxWoss ( )
virtual

Destructor. It properly delete all pointers involved

References altimetry_value, resetSSPVector(), and sediment_value.

Here is the call graph for this function:

Member Function Documentation

◆ checkSSPUnicity()

bool ACToolboxWoss::checkSSPUnicity ( SSP *&  ptr)
protectedvirtual

Checks if the given SSP is not equal to previous values

Parameters
valuepointer to a valid SSP object
Returns
true if input is unique, false otherwise

References ssp_unique_indexes, and ssp_vector.

Referenced by initSSPVector().

◆ getMaxBathymetryDepth()

double woss::ACToolboxWoss::getMaxBathymetryDepth ( ) const
inline

Gets the maximum depth of bathymetry in use

Returns
maximum bathymetry depth [m]

References max_bathymetry_depth.

◆ getMaxSSPDepth()

double woss::ACToolboxWoss::getMaxSSPDepth ( ) const
inline

Gets the maximum depth of all SSP currently in use

Returns
maximum SSP depth [m]

References max_ssp_depth_set.

◆ getMaxSSPDepthSteps()

int woss::ACToolboxWoss::getMaxSSPDepthSteps ( ) const
inline

Gets the maximum number depth steps of all SSP currently in use

Returns
maximum SSP depth steps

References max_ssp_depth_steps.

◆ getMinBathymteryDepth()

double woss::ACToolboxWoss::getMinBathymteryDepth ( ) const
inline

Gets the minimum depth of bathymetry in use

Returns
mimimum bathymetry depth [m]

References min_bathymetry_depth.

◆ getMinSSPDepth()

double woss::ACToolboxWoss::getMinSSPDepth ( ) const
inline

Gets the minimum depth of all SSP currently in use

Returns
mimimum SSP depth [m]

References min_ssp_depth_set.

◆ getMinSSPDepthSteps()

int woss::ACToolboxWoss::getMinSSPDepthSteps ( ) const
inline

Gets the minimum number depth steps of all SSP currently in use

Returns
mimimum SSP depth steps

References min_ssp_depth_steps.

◆ getRangeSteps()

int woss::ACToolboxWoss::getRangeSteps ( ) const
inline

Gets the total number of range steps

Returns
total number of range steps

References total_range_steps.

◆ getSSPDepthPrecision()

long double woss::ACToolboxWoss::getSSPDepthPrecision ( ) const
inline

Gets the depth precision for all SSP that will be created

Returns
depth precision [m]

References ssp_depth_precision.

◆ initAltimetry()

◆ initCoordZVector()

bool ACToolboxWoss::initCoordZVector ( )
protectedvirtual

◆ initialize()

bool ACToolboxWoss::initialize ( )
virtual

Initializes the enviroment for acoustic-toolbox channel simulator

Returns
true if method was successful, false otherwise

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().

Here is the call graph for this function:

◆ initRangeVector()

bool ACToolboxWoss::initRangeVector ( )
protectedvirtual

Initializes range_vector

Returns
true if method succeeded, false otherwise

References woss::Woss::debug, range_vector, woss::Woss::total_great_circle_distance, total_range_steps, and woss::Woss::woss_id.

Referenced by initialize().

◆ initSediment()

bool ACToolboxWoss::initSediment ( )
protectedvirtual

Initializes sediment_value

Returns
true if method succeeded, false otherwise

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().

Here is the call graph for this function:

◆ initSSPVector()

◆ isValid()

bool ACToolboxWoss::isValid ( ) const
virtual

Checks the validity of ACToolboxWoss

Returns
true if it's valid, false otherwise

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().

Here is the call graph for this function:

◆ resetSSPVector()

void ACToolboxWoss::resetSSPVector ( )
protectedvirtual

Resets ssp_vector

References ssp_vector.

Referenced by initialize(), and ~ACToolboxWoss().

◆ setRangeSteps()

ACToolboxWoss & woss::ACToolboxWoss::setRangeSteps ( int  steps)
inline

Sets the total number of range steps

Parameters
stepstotal number of range steps

References coordz_vector, range_vector, ssp_vector, and total_range_steps.

Referenced by woss::BellhopCreator::initializeBhWoss().

◆ setSSPDepthPrecision()

ACToolboxWoss & woss::ACToolboxWoss::setSSPDepthPrecision ( long double  precision)
inline

Sets the depth precision for all SSP that will be created

Parameters
precisiondepth precision [m]

References ssp_depth_precision.

Referenced by woss::BellhopCreator::initializeBhWoss().

Member Data Documentation

◆ altimetry_value

◆ coordz_vector

CoordZVector woss::ACToolboxWoss::coordz_vector
protected

◆ is_ssp_vector_transformable

bool woss::ACToolboxWoss::is_ssp_vector_transformable
protected

True if ssp_vector is transformable

See also
SSP::isTransformable()

Referenced by initSSPVector(), and woss::BellhopWoss::normalizeDbSSP().

◆ max_altimetry_depth

double woss::ACToolboxWoss::max_altimetry_depth
protected

Maximum altimetry depth [m]

Referenced by initAltimetry(), initialize(), and woss::BellhopWoss::writeAltimetryFile().

◆ max_bathymetry_depth

double woss::ACToolboxWoss::max_bathymetry_depth
protected

◆ max_ssp_depth_set

::std::set< double > woss::ACToolboxWoss::max_ssp_depth_set
protected

Set of all maximum SSP depth [m] currently in use

Referenced by getMaxSSPDepth(), initSSPVector(), and woss::BellhopWoss::normalizeDbSSP().

◆ max_ssp_depth_steps

int woss::ACToolboxWoss::max_ssp_depth_steps
protected

Maximum number of currently in use SSP depth steps

Referenced by getMaxSSPDepthSteps(), initSSPVector(), and woss::BellhopWoss::normalizeDbSSP().

◆ min_altimetry_depth

double woss::ACToolboxWoss::min_altimetry_depth
protected

◆ min_bathymetry_depth

double woss::ACToolboxWoss::min_bathymetry_depth
protected

Minimum bathymetry depth [m]

Referenced by getMinBathymteryDepth(), initCoordZVector(), and initialize().

◆ min_ssp_depth_set

::std::set< double > woss::ACToolboxWoss::min_ssp_depth_set
protected

Set of all minimum SSP depth [m] currently in use

Referenced by getMinSSPDepth(), initSSPVector(), and woss::BellhopWoss::normalizeDbSSP().

◆ min_ssp_depth_steps

int woss::ACToolboxWoss::min_ssp_depth_steps
protected

Miminum number of currently in use SSP depth steps

Referenced by getMinSSPDepthSteps(), initSSPVector(), and woss::BellhopWoss::normalizeDbSSP().

◆ range_vector

RangeVector woss::ACToolboxWoss::range_vector
protected

◆ sediment_value

Sediment* woss::ACToolboxWoss::sediment_value
protected

◆ ssp_depth_precision

long double woss::ACToolboxWoss::ssp_depth_precision
protected

Depth precision of all SSP that will be created [m]

Referenced by getSSPDepthPrecision(), and setSSPDepthPrecision().

◆ ssp_unique_indexes

::std::set< int > woss::ACToolboxWoss::ssp_unique_indexes
protected

Set of of ssp_vector indexes that link to unique SSP

Referenced by checkSSPUnicity(), initSSPVector(), and woss::BellhopWoss::normalizeDbSSP().

◆ ssp_vector

SSPVector woss::ACToolboxWoss::ssp_vector
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().

◆ total_range_steps

int woss::ACToolboxWoss::total_range_steps
protected

The documentation for this class was generated from the following files: