World Ocean Simulation System (WOSS) library
|
Channel power delay profile class. More...
#include <time-arrival-definitions.h>
Public Member Functions | |
TimeArr (long double custom_delay_prec=TIMEARR_CUSTOM_DELAY_PRECISION) | |
TimeArr (TimeArrMap &map, long double custom_delay_prec=TIMEARR_CUSTOM_DELAY_PRECISION) | |
TimeArr (const Pressure &pressure, double delay=TIMEARR_PRESSURE_CONVERSION_DELAY, long double custom_delay_prec=TIMEARR_CUSTOM_DELAY_PRECISION) | |
TimeArr (const TimeArr ©) | |
virtual | operator std::complex< double > () const |
virtual TimeArr * | create (long double custom_delay_prec=TIMEARR_CUSTOM_DELAY_PRECISION) const |
virtual TimeArr * | create (TimeArrMap &map, long double custom_delay_prec=TIMEARR_CUSTOM_DELAY_PRECISION) const |
virtual TimeArr * | create (const Pressure &pressure, double delay=TIMEARR_PRESSURE_CONVERSION_DELAY, long double custom_delay_prec=TIMEARR_CUSTOM_DELAY_PRECISION) const |
virtual TimeArr * | create (const TimeArr ©) const |
virtual TimeArr * | clone () const |
virtual TimeArr * | createArray (unsigned int array_size) const |
TimeArr & | insertValue (double delay, const Pressure &pressure) |
void | sumValue (double delay, const Pressure &pressure) |
TimeArrCIt | findValue (double delay) const |
TimeArr & | eraseValue (double delay) |
virtual TimeArr * | coherentSumSample (double time_delay) |
virtual TimeArr * | incoherentSumSample (double time_delay) |
virtual TimeArr * | crop (double time_start, double time_end) |
virtual bool | checkPressureAttenuation (double distance, double frequency) |
TimeArrCIt | begin () const |
TimeArrCIt | end () const |
TimeArrCRIt | rbegin () const |
TimeArrCRIt | rend () const |
TimeArrCIt | at (const int i) const |
TimeArrCIt | lowerBoundTxLoss (double threshold_db) const |
int | size () const |
bool | empty () const |
void | clear () |
TimeArr & | setDelayPrecision (long double precision) |
double | getMaxDelayValue () const |
double | getMinDelayValue () const |
long double | getDelayPrecision () const |
virtual bool | isValid () const |
virtual bool | isConvertedFromPressure () const |
TimeArr & | operator= (const TimeArr ©) |
Static Public Member Functions | |
static TimeArrMap & | createNotValid () |
static TimeArrMap & | createImpulse () |
static void | setDebug (bool flag) |
Protected Attributes | |
long double | delay_precision |
TimeArrMap | time_arr_map |
Static Protected Attributes | |
static bool | debug = false |
Friends | |
bool | operator== (const TimeArr &left, const TimeArr &right) |
bool | operator!= (const TimeArr &left, const TimeArr &right) |
const TimeArr | operator+ (const TimeArr &left, const TimeArr &right) |
const TimeArr | operator- (const TimeArr &left, const TimeArr &right) |
const TimeArr | operator+ (const TimeArr &left, const double right) |
const TimeArr | operator- (const TimeArr &left, const double right) |
const TimeArr | operator/ (const TimeArr &left, const double right) |
const TimeArr | operator* (const TimeArr &left, const double right) |
const TimeArr | operator+ (const double left, const TimeArr &right) |
const TimeArr | operator- (const double left, const TimeArr &right) |
const TimeArr | operator/ (const double left, const TimeArr &right) |
const TimeArr | operator* (const double left, const TimeArr &right) |
TimeArr & | operator+= (TimeArr &left, const TimeArr &right) |
TimeArr & | operator-= (TimeArr &left, const TimeArr &right) |
TimeArr & | operator+= (TimeArr &left, double right) |
TimeArr & | operator-= (TimeArr &left, double right) |
TimeArr & | operator/= (TimeArr &left, double right) |
TimeArr & | operator*= (TimeArr &left, double right) |
std::ostream & | operator<< (std::ostream &os, const TimeArr &instance) |
Channel power delay profile class.
TimeArr class offers the possibility to store and manipulate channel power delay profiles, e.g. a collection of time delay values associated to a Pressure attenuation value.
TimeArr::TimeArr | ( | long double | custom_delay_prec = TIMEARR_CUSTOM_DELAY_PRECISION | ) |
Default TimeArr constructor
custom_delay_prec | delay precision [s] |
TimeArr::TimeArr | ( | TimeArrMap & | map, |
long double | custom_delay_prec = TIMEARR_CUSTOM_DELAY_PRECISION |
||
) |
TimeArr constructor
map | custom time arrival map |
custom_delay_prec | delay precision [s] |
References time_arr_map.
TimeArr::TimeArr | ( | const Pressure & | pressure, |
double | delay = TIMEARR_PRESSURE_CONVERSION_DELAY , |
||
long double | custom_delay_prec = TIMEARR_CUSTOM_DELAY_PRECISION |
||
) |
TimeArr constructor. Needed for Pressure to TimeArr conversion
pressure | Pressure value |
delay | delay value [s] |
custom_delay_prec | delay precision [s] |
References woss::Pressure::createNotValid(), woss::Pressure::isValid(), and time_arr_map.
TimeArr::TimeArr | ( | const TimeArr & | copy | ) |
TimeArr copy constructor
copy | TimeArr to be copied |
References delay_precision, and time_arr_map.
TimeArrCIt TimeArr::at | ( | const int | i | ) | const |
Returns a const iterator to the Pressure value at i-th position
i | integer should be between 0 and size() |
References time_arr_map.
|
inline |
Returns a const iterator to the beginning of the time arrival map
References time_arr_map.
Referenced by woss::Pressure::Pressure(), woss::ResTimeArrTxtDb::printScreenMap(), woss::ResTimeArrBinDb::writeMap(), and woss::ResTimeArrTxtDb::writeMap().
|
virtual |
Check the Pressure value of each delay. If amplitude is >= 1, it replaces with a new Pressure with same phase and new amplitude given by the Thorp absorption process at given frequency and along given distance
distance | given distance [m] |
frequency | given frequency [hz] |
References woss::Pressure::checkAttenuation(), and time_arr_map.
|
inline |
Erase all values of Pressure
References time_arr_map.
Referenced by woss::WossManagerResDb::getWossPressure(), woss::WossManagerResDbMT::getWossPressure(), woss::WossManagerResDb::getWossTimeArr(), and woss::WossManagerResDbMT::getWossTimeArr().
|
inlinevirtual |
TimeArr virtual factory method
Referenced by woss::DefHandler::operator=().
|
virtual |
Sample the TimeArr with sample-time delay. Pressure of the new TimeArr are the coherent sum of previous object with equal sampled delay.
delay | delay value [s] |
References create(), delay_precision, and time_arr_map.
|
inlinevirtual |
TimeArr virtual factory method
custom_delay_prec | delay precision [s] |
Referenced by coherentSumSample(), crop(), woss::ResTimeArrTxtDb::getValue(), woss::WossManagerResDb::getWossPressure(), woss::WossManagerResDbMT::getWossPressure(), incoherentSumSample(), woss::ArrBinResReader::readTimeArr(), and woss::ShdResReader::readTimeArr().
|
inlinevirtual |
|
inlinevirtual |
TimeArr virtual factory method
array_size | size of array |
Referenced by woss::ArrAscResReader::getArrAscHeader(), and woss::ArrBinResReader::getArrBinHeader().
|
inlinestatic |
Creates an impulsive instance
References time_arr_map.
Referenced by woss::WossManagerResDb::getWossTimeArr(), woss::WossManagerResDbMT::getWossTimeArr(), woss::WossManager::getWossTimeArr(), woss::WossManagerResDbMT::getWossTimeArr(), and woss::WossManager::getWossTimeArr().
|
inlinestatic |
Creates an instance not valid
References woss::Pressure::createNotValid(), and time_arr_map.
Referenced by woss::WossManagerResDb::dbGetTimeArr(), woss::WossDbManager::getTimeArr(), woss::ResTimeArrTxtDb::getValue(), woss::WossManager::getWossTimeArr(), woss::ArrAscResReader::readTimeArr(), and woss::ArrBinResReader::readTimeArr().
|
virtual |
Crops the TimeArr between given time values and returns a new heap-allocated object. The new object will have time values in [time_start, time_end)
time_start | start time value [s] |
time_end | end time value [s] |
References create(), delay_precision, and time_arr_map.
|
inline |
Checks if the instance has stored values
References time_arr_map.
|
inline |
Returns a const iterator to the end of the time arrival map
References time_arr_map.
Referenced by woss::Pressure::Pressure(), woss::ResTimeArrTxtDb::printScreenMap(), woss::ResTimeArrBinDb::writeMap(), and woss::ResTimeArrTxtDb::writeMap().
|
inline |
Erase the Pressure value with key == delay parameter
delay | delay value [s] |
References time_arr_map.
|
inline |
Returns a const iterator to the Pressure with key == delay parameter
delay | delay value [s] |
References time_arr_map.
|
inline |
|
inline |
|
inline |
|
virtual |
Sample the TimeArr with sample-time delay. Pressure of the new TimeArr are the incoherent sum of previous object with equal sampled delay.
delay | delay value [s] |
References create(), delay_precision, and time_arr_map.
Inserts and replace a Pressure value at given delay
delay | delay value [s] |
pressure | Pressure value |
References woss::Pressure::isValid(), and time_arr_map.
Referenced by woss::ResTimeArrBinDb::importMap(), and woss::ResTimeArrTxtDb::importMap().
|
inlinevirtual |
Checks if the TimeArr was constructed from a Pressure value, therefore not carrying a valid delay information
References time_arr_map.
|
virtual |
Checks the validity of TimeArr
References woss::Pressure::createNotValid(), and time_arr_map.
Referenced by woss::WossManagerResDb::getWossPressure(), woss::WossManagerResDbMT::getWossPressure(), woss::WossManagerResDb::getWossTimeArr(), woss::WossManagerResDbMT::getWossTimeArr(), and woss::Pressure::Pressure().
TimeArrCIt TimeArr::lowerBoundTxLoss | ( | double | threshold_db | ) | const |
Returns a const iterator to the Pressure that has txLoss >= threshold_db
i | threshold in db re upa |
References woss::Pressure::getTxLossDb(), and time_arr_map.
|
virtual |
complex<double> operator for implicit casting
Assignment operator
copy | const reference to a TimeArr object to be copied |
References delay_precision, and time_arr_map.
|
inline |
Returns a const reverse iterator to the reverse beginning of the time arrival map
References time_arr_map.
|
inline |
Returns a const reverse iterator to the reverse end of the time arrival map
References time_arr_map.
|
inlinestatic |
woss::TimeArr & TimeArr::setDelayPrecision | ( | long double | precision | ) |
Sets the delay precision for all PDouble delay values. If the given precision is different from current value, the profile will be modified accordingly
precision | delay precision [m] |
References time_arr_map.
|
inline |
Returns the number of Pressure stored
References time_arr_map.
Referenced by woss::ResTimeArrTxtDb::printScreenMap(), woss::ResTimeArrBinDb::writeMap(), and woss::ResTimeArrTxtDb::writeMap().
|
inline |
Inserts and (complex) sums a Pressure value at given delay
delay | delay value [s] |
pressure | Pressure value |
References woss::Pressure::isValid(), and time_arr_map.
Referenced by woss::ArrAscResReader::getArrAscFile(), and woss::ArrBinResReader::getArrBinFile().
Inequality operator
left | left operand const reference |
right | right operand const reference |
Multiplication operator
left | left operand const reference |
right | right operand const reference |
Multiplication operator
left | left operand const reference |
right | right operand const reference |
Compound assignment multiplication operator
left | left operand reference |
right | right operand const reference |
Sum operator
left | left operand const reference |
right | right operand const reference |
Sum operator
left | left operand const reference |
right | right operand const reference |
Sum operator
left | left operand const reference |
right | right operand const reference |
Compound assignment sum operator
left | left operand reference |
right | right operand const reference |
Compound assignment sum operator
left | left operand reference |
right | right operand const reference |
Subtraction operator
left | left operand const reference |
right | right operand const reference |
Subtraction operator
left | left operand const reference |
right | right operand const reference |
Subtraction operator
left | left operand const reference |
right | right operand const reference |
Compound assignment subtraction operator
left | left operand reference |
right | right operand const reference |
Compound assignment subtraction operator
left | left operand reference |
right | right operand const reference |
Division operator
left | left operand const reference |
right | right operand const reference |
Division operator
left | left operand const reference |
right | right operand const reference |
Compound assignment division operator
left | left operand reference |
right | right operand const reference |
|
friend |
<< operator
os | left operand ostream reference |
instance | right operand const Pressure reference |
Equality operator
left | left operand const reference |
right | right operand const reference |
|
staticprotected |
Debug flag
Referenced by setDebug().
|
protected |
Stores the precision of all PDouble delay instances [s]
Referenced by coherentSumSample(), crop(), getDelayPrecision(), incoherentSumSample(), operator=(), and TimeArr().
|
protected |
Pressure values map
Referenced by at(), begin(), checkPressureAttenuation(), clear(), coherentSumSample(), createImpulse(), createNotValid(), crop(), empty(), end(), eraseValue(), findValue(), getMaxDelayValue(), getMinDelayValue(), incoherentSumSample(), insertValue(), isConvertedFromPressure(), isValid(), lowerBoundTxLoss(), woss::operator*=(), woss::operator+=(), woss::operator+=(), woss::operator-=(), woss::operator-=(), woss::operator/=(), operator=(), rbegin(), rend(), setDelayPrecision(), size(), sumValue(), TimeArr(), TimeArr(), and TimeArr().