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 () override=default
virtual bool initialize () override
virtual bool isValid () const override
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 ()=default
 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 ~WossResReader () override=default
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 ~Woss ()
virtual bool run ()=0
virtual bool timeEvolve (const Time &time_value)=0
virtual std::unique_ptr< 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 std::unique_ptr< PressuregetPressure (double frequency, double tx_depth, double rx_depth, double rx_range) const =0
virtual std::unique_ptr< 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 std::shared_ptr< WossDbManager > &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 (const SSP &ptr) const
virtual bool checkSedimentUnicity (const Sediment &ptr) const
virtual bool initRangeVector ()
virtual bool initCoordZVector ()
virtual bool initSedimentMap ()
virtual void resetSedimentMap ()
virtual bool initAltimetry ()
virtual bool initSSPMap ()
virtual void resetSSPMap ()
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
SSPMap ssp_map
SedimentMap sediment_map
std::unique_ptr< Altimetryaltimetry_value
bool is_ssp_map_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
std::shared_ptr< 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
std::atomic< bool > has_run_once
std::atomic< bool > is_running
bool has_run_once
volatile bool is_running
bool clean_workdir

Additional Inherited Members

Static Protected Attributes inherited from woss::Woss
static std::atomic< int > woss_counter = 0
static int woss_counter

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() [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]

References altimetry_value, coordz_vector, is_ssp_map_transformable, max_altimetry_depth, max_bathymetry_depth, max_ssp_depth_set, max_ssp_depth_steps, min_altimetry_depth, min_bathymetry_depth, min_ssp_depth_set, min_ssp_depth_steps, range_vector, sediment_map, ssp_depth_precision, ssp_map, total_range_steps, and woss::WossResReader::WossResReader().

Here is the call graph for this function:

◆ ~ACToolboxWoss()

virtual woss::ACToolboxWoss::~ACToolboxWoss ( )
overridevirtualdefault

Member Function Documentation

◆ checkSedimentUnicity()

bool ACToolboxWoss::checkSedimentUnicity ( const Sediment & ptr) const
protectedvirtual

Checks if the given Sediment is not equal to previous values

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

References sediment_map.

Referenced by initSedimentMap().

◆ checkSSPUnicity()

bool ACToolboxWoss::checkSSPUnicity ( const SSP & ptr) const
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_map.

Referenced by initSSPMap().

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

bool ACToolboxWoss::initAltimetry ( )
protectedvirtual

◆ initCoordZVector()

bool ACToolboxWoss::initCoordZVector ( )
protectedvirtual

◆ initialize()

bool ACToolboxWoss::initialize ( )
overridevirtual

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(), initSedimentMap(), initSSPMap(), max_altimetry_depth, max_bathymetry_depth, min_altimetry_depth, min_bathymetry_depth, range_vector, resetSedimentMap(), and resetSSPMap().

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

◆ initSedimentMap()

bool ACToolboxWoss::initSedimentMap ( )
protectedvirtual

Initializes sediment_map

Returns
true if method succeeded, false otherwise

References checkSedimentUnicity(), coordz_vector, woss::Woss::db_manager, woss::Woss::debug, range_vector, sediment_map, woss::Woss::tx_coordz, and woss::Woss::woss_id.

Referenced by initialize().

Here is the call graph for this function:

◆ initSSPMap()

bool ACToolboxWoss::initSSPMap ( )
protectedvirtual

◆ isValid()

bool ACToolboxWoss::isValid ( ) const
overridevirtual

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::Woss::rx_coordz, woss::Woss::start_time, and woss::Woss::tx_coordz.

Referenced by woss::BellhopWoss::isValid().

◆ resetSedimentMap()

void ACToolboxWoss::resetSedimentMap ( )
protectedvirtual

Resets sediment_map

References sediment_map.

Referenced by initialize().

◆ resetSSPMap()

void ACToolboxWoss::resetSSPMap ( )
protectedvirtual

Resets ssp_map

References ssp_map.

Referenced by initialize().

◆ setRangeSteps()

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

Sets the total number of range steps

Parameters
stepstotal number of range steps

References ACToolboxWoss(), coordz_vector, range_vector, and total_range_steps.

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

Here is the call graph for this function:

◆ 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 ACToolboxWoss(), and ssp_depth_precision.

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

Here is the call graph for this function:

Member Data Documentation

◆ altimetry_value

◆ coordz_vector

CoordZVector woss::ACToolboxWoss::coordz_vector
protected

◆ is_ssp_map_transformable

bool woss::ACToolboxWoss::is_ssp_map_transformable
protected

True if ssp_map is transformable

See also
SSP::isTransformable()

Referenced by ACToolboxWoss(), ACToolboxWoss(), initSSPMap(), and woss::BellhopWoss::normalizeDbSSP().

◆ max_altimetry_depth

double woss::ACToolboxWoss::max_altimetry_depth
protected

◆ max_bathymetry_depth

◆ 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 ACToolboxWoss(), ACToolboxWoss(), getMaxSSPDepth(), initSSPMap(), 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 ACToolboxWoss(), ACToolboxWoss(), getMaxSSPDepthSteps(), initSSPMap(), 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 ACToolboxWoss(), ACToolboxWoss(), 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 ACToolboxWoss(), ACToolboxWoss(), getMinSSPDepth(), initSSPMap(), 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 ACToolboxWoss(), ACToolboxWoss(), getMinSSPDepthSteps(), initSSPMap(), and woss::BellhopWoss::normalizeDbSSP().

◆ range_vector

◆ sediment_map

SedimentMap woss::ACToolboxWoss::sediment_map
protected

◆ ssp_depth_precision

long double woss::ACToolboxWoss::ssp_depth_precision
protected

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

Referenced by ACToolboxWoss(), ACToolboxWoss(), getSSPDepthPrecision(), and setSSPDepthPrecision().

◆ ssp_map

SSPMap woss::ACToolboxWoss::ssp_map
protected

Map of all SSP involved. Its size is less or equal to total_range_steps

Referenced by ACToolboxWoss(), ACToolboxWoss(), checkSSPUnicity(), initSSPMap(), woss::BellhopWoss::normalizeDbSSP(), and resetSSPMap().

◆ total_range_steps

int woss::ACToolboxWoss::total_range_steps
protected

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