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

class for storing data of any acoustic toolbox ARR file More...

#include <ac-toolbox-arr-asc-reader.h>

Collaboration diagram for woss::ArrData:
Collaboration graph

Public Member Functions

 ArrData ()=default
 ~ArrData ()=default
void initialize ()
int getTimeArrIndex (double tx_depth, double rx_depth, double rx_range) const
int getIndex (float value, float array[], int array_size) const

Public Attributes

float frequency = 0.0
int32_t Nsd = 0
std::unique_ptr< float[] > tx_depths = nullptr
int32_t Nrd = 0
std::unique_ptr< float[] > rx_depths = nullptr
int32_t Nrr = 0
std::unique_ptr< float[] > rx_ranges = nullptr
std::unique_ptr< TimeArr[] > arr_values = nullptr

Detailed Description

class for storing data of any acoustic toolbox ARR file

class ArrData stores TimeArr values provided by any acoustic toolbox ARR file

Constructor & Destructor Documentation

◆ ArrData()

woss::ArrData::ArrData ( )
default

◆ ~ArrData()

woss::ArrData::~ArrData ( )
default

Member Function Documentation

◆ getIndex()

int ArrData::getIndex ( float value,
float array[],
int array_size ) const

Returns the index of given array associated to given value

Parameters
valuetest value
arrayvalid pointer to an array
array_sizesize of passed array
Returns
valid array index value

Referenced by getTimeArrIndex().

◆ getTimeArrIndex()

int ArrData::getTimeArrIndex ( double tx_depth,
double rx_depth,
double rx_range ) const

Returns the arr_values index associated to given parameters

Parameters
tx_depthtransmitter depth [m]
rx_depthreceiver depth [m]
rx_rangereceiver range [m]
Returns
valid arr_values index value

References getIndex(), Nrd, Nrr, Nsd, rx_depths, rx_ranges, and tx_depths.

Referenced by WossUnitTest::testArrDataAndReaders().

Here is the call graph for this function:

◆ initialize()

void woss::ArrData::initialize ( )
inline

Initializes the struct

References arr_values, frequency, Nrd, Nrr, Nsd, rx_depths, rx_ranges, and tx_depths.

Referenced by WossUnitTest::testArrDataAndReaders().

Member Data Documentation

◆ arr_values

std::unique_ptr< TimeArr[] > woss::ArrData::arr_values = nullptr

Pointer to an array of TimeArr values [m]

Referenced by initialize().

◆ frequency

float woss::ArrData::frequency = 0.0

Frequency value [Hz]

Referenced by initialize(), and WossUnitTest::testArrDataAndReaders().

◆ Nrd

int32_t woss::ArrData::Nrd = 0

Total number of receiver depths

Referenced by getTimeArrIndex(), initialize(), and WossUnitTest::testArrDataAndReaders().

◆ Nrr

int32_t woss::ArrData::Nrr = 0

Total number of receiver ranges

Referenced by getTimeArrIndex(), initialize(), and WossUnitTest::testArrDataAndReaders().

◆ Nsd

int32_t woss::ArrData::Nsd = 0

Total number of transmitter depths

Referenced by getTimeArrIndex(), initialize(), and WossUnitTest::testArrDataAndReaders().

◆ rx_depths

std::unique_ptr< float[] > woss::ArrData::rx_depths = nullptr

Pointer to an array of receiver depths [m]

Referenced by getTimeArrIndex(), initialize(), and WossUnitTest::testArrDataAndReaders().

◆ rx_ranges

std::unique_ptr< float[] > woss::ArrData::rx_ranges = nullptr

Pointer to an array of receiver ranges [m]

Referenced by getTimeArrIndex(), initialize(), and WossUnitTest::testArrDataAndReaders().

◆ tx_depths

std::unique_ptr< float[] > woss::ArrData::tx_depths = nullptr

Pointer to an array of transmitter depths [m]

Referenced by getTimeArrIndex(), initialize(), and WossUnitTest::testArrDataAndReaders().


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