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 woss::ArrAscResReader::accessMap(), woss::ArrBinResReader::accessMap(), woss::ArrAscResReader::readMapAvgPressure(), and woss::ArrBinResReader::readMapAvgPressure().

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.

Member Data Documentation

◆ arr_values

◆ frequency

◆ Nrd

◆ Nrr

◆ Nsd

◆ rx_depths

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

◆ rx_ranges

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

◆ tx_depths

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

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