40#ifndef TIME_ARRIVAL_DEFINITIONS_H
41#define TIME_ARRIVAL_DEFINITIONS_H
57 typedef std::map < PDouble , std::complex<double> >
TimeArrMap;
58 typedef TimeArrMap::iterator TimeArrIt;
59 typedef TimeArrMap::const_iterator TimeArrCIt;
60 typedef TimeArrMap::reverse_iterator TimeArrRIt;
61 typedef TimeArrMap::const_reverse_iterator TimeArrCRIt;
67 #define TIMEARR_CUSTOM_DELAY_PRECISION (1.0e-7)
73 #define TIMEARR_PRESSURE_CONVERSION_DELAY (-INT_MAX)
92 TimeArr(
long double custom_delay_prec = TIMEARR_CUSTOM_DELAY_PRECISION );
99 TimeArr(
TimeArrMap& map,
long double custom_delay_prec = TIMEARR_CUSTOM_DELAY_PRECISION );
107 TimeArr(
const Pressure& pressure,
double delay = TIMEARR_PRESSURE_CONVERSION_DELAY,
long double custom_delay_prec = TIMEARR_CUSTOM_DELAY_PRECISION );
122 virtual operator std::complex<double>()
const;
130 virtual TimeArr*
create(
long double custom_delay_prec = TIMEARR_CUSTOM_DELAY_PRECISION )
const {
return new TimeArr(custom_delay_prec); }
139 return new TimeArr( map, custom_delay_prec); }
148 virtual TimeArr*
create(
const Pressure& pressure,
double delay = TIMEARR_PRESSURE_CONVERSION_DELAY,
long double custom_delay_prec = TIMEARR_CUSTOM_DELAY_PRECISION )
const {
149 return new TimeArr(pressure, delay, custom_delay_prec ); }
239 virtual TimeArr*
crop(
double time_start,
double time_end );
280 TimeArrCIt
at(
const int i )
const ;
606 assert( delay >= 0.0 );
608 time_arr_map.insert( std::make_pair( delay, pressure ) );
616 assert( delay >= 0.0 );
620 else it->second += std::complex<double>( pressure );
627 <<
"; max time_arr = " << instance.
time_arr_map.rbegin()->first
634 if ( &left == &right )
return true;
640 if ( &left == &right )
return false;
bool operator!=(const Altimetry &left, const Altimetry &right)
Definition altimetry-definitions.h:846
std::ostream & operator<<(std::ostream &os, const Altimetry &instance)
Definition altimetry-definitions.h:826
Altimetry & operator*=(Altimetry &left, double right)
Definition altimetry-definitions.cpp:367
const Altimetry operator/(const Altimetry &left, const double right)
Definition altimetry-definitions.cpp:285
bool operator==(const Altimetry &left, const Altimetry &right)
Definition altimetry-definitions.h:840
Altimetry & operator+=(Altimetry &left, const Altimetry &right)
Definition altimetry-definitions.cpp:327
const Altimetry operator+(const Altimetry &left, const Altimetry &right)
Definition altimetry-definitions.cpp:257
const Altimetry operator*(const Altimetry &left, const double right)
Definition altimetry-definitions.cpp:292
Altimetry & operator-=(Altimetry &left, const Altimetry &right)
Definition altimetry-definitions.cpp:335
const Altimetry operator-(const Altimetry &left, const Altimetry &right)
Definition altimetry-definitions.cpp:264
Altimetry & operator/=(Altimetry &left, double right)
Definition altimetry-definitions.cpp:359
Custom precision long double class.
Definition custom-precision-double.h:67
Complex attenuated pressure class.
Definition pressure-definitions.h:59
virtual bool isValid() const
Definition pressure-definitions.h:187
static const ::std::complex< double > createNotValid()
Definition pressure-definitions.h:148
double getTxLossDb() const
Definition pressure-definitions.h:202
Channel power delay profile class.
Definition time-arrival-definitions.h:82
friend const TimeArr operator-(const double left, const TimeArr &right)
friend const TimeArr operator+(const TimeArr &left, const TimeArr &right)
virtual TimeArr * create(const TimeArr ©) const
Definition time-arrival-definitions.h:156
TimeArrCIt findValue(double delay) const
Definition time-arrival-definitions.h:205
virtual TimeArr * incoherentSumSample(double time_delay)
Definition time-arrival-definitions.cpp:172
TimeArrCIt begin() const
Definition time-arrival-definitions.h:255
TimeArrCIt end() const
Definition time-arrival-definitions.h:261
TimeArr & operator=(const TimeArr ©)
Definition time-arrival-definitions.cpp:97
TimeArrCIt lowerBoundTxLoss(double threshold_db) const
Definition time-arrival-definitions.cpp:116
virtual TimeArr * create(long double custom_delay_prec=TIMEARR_CUSTOM_DELAY_PRECISION) const
Definition time-arrival-definitions.h:130
virtual TimeArr * create(const Pressure &pressure, double delay=TIMEARR_PRESSURE_CONVERSION_DELAY, long double custom_delay_prec=TIMEARR_CUSTOM_DELAY_PRECISION) const
Definition time-arrival-definitions.h:148
TimeArr & insertValue(double delay, const Pressure &pressure)
Definition time-arrival-definitions.h:604
friend TimeArr & operator+=(TimeArr &left, const TimeArr &right)
friend const TimeArr operator*(const double left, const TimeArr &right)
TimeArrCRIt rend() const
Definition time-arrival-definitions.h:273
friend const TimeArr operator+(const TimeArr &left, const double right)
double getMaxDelayValue() const
Definition time-arrival-definitions.h:328
friend TimeArr & operator-=(TimeArr &left, double right)
TimeArrCIt at(const int i) const
Definition time-arrival-definitions.cpp:105
friend const TimeArr operator-(const TimeArr &left, const TimeArr &right)
static TimeArrMap & createNotValid()
Definition time-arrival-definitions.h:588
friend TimeArr & operator/=(TimeArr &left, double right)
TimeArr & setDelayPrecision(long double precision)
Definition time-arrival-definitions.cpp:135
virtual bool isConvertedFromPressure() const
Definition time-arrival-definitions.h:354
friend const TimeArr operator-(const TimeArr &left, const double right)
double getMinDelayValue() const
Definition time-arrival-definitions.h:334
virtual TimeArr * coherentSumSample(double time_delay)
Definition time-arrival-definitions.cpp:160
TimeArr & eraseValue(double delay)
Definition time-arrival-definitions.h:213
virtual TimeArr * crop(double time_start, double time_end)
Definition time-arrival-definitions.cpp:188
friend TimeArr & operator+=(TimeArr &left, double right)
virtual bool isValid() const
Definition time-arrival-definitions.cpp:90
friend const TimeArr operator/(const double left, const TimeArr &right)
static void setDebug(bool flag)
Definition time-arrival-definitions.h:321
friend bool operator!=(const TimeArr &left, const TimeArr &right)
Definition time-arrival-definitions.h:639
static bool debug
Definition time-arrival-definitions.h:530
long double delay_precision
Definition time-arrival-definitions.h:536
friend const TimeArr operator*(const TimeArr &left, const double right)
virtual TimeArr * create(TimeArrMap &map, long double custom_delay_prec=TIMEARR_CUSTOM_DELAY_PRECISION) const
Definition time-arrival-definitions.h:138
friend TimeArr & operator-=(TimeArr &left, const TimeArr &right)
friend const TimeArr operator+(const double left, const TimeArr &right)
friend std::ostream & operator<<(std::ostream &os, const TimeArr &instance)
Definition time-arrival-definitions.h:624
static TimeArrMap & createImpulse()
Definition time-arrival-definitions.h:596
friend const TimeArr operator/(const TimeArr &left, const double right)
TimeArrCRIt rbegin() const
Definition time-arrival-definitions.h:267
friend TimeArr & operator*=(TimeArr &left, double right)
virtual bool checkPressureAttenuation(double distance, double frequency)
Definition time-arrival-definitions.cpp:147
virtual TimeArr * clone() const
Definition time-arrival-definitions.h:162
bool empty() const
Definition time-arrival-definitions.h:299
int size() const
Definition time-arrival-definitions.h:293
void clear()
Definition time-arrival-definitions.h:305
long double getDelayPrecision() const
Definition time-arrival-definitions.h:340
friend bool operator==(const TimeArr &left, const TimeArr &right)
Definition time-arrival-definitions.h:633
virtual TimeArr * createArray(unsigned int array_size) const
Definition time-arrival-definitions.h:169
TimeArrMap time_arr_map
Definition time-arrival-definitions.h:542
void sumValue(double delay, const Pressure &pressure)
Definition time-arrival-definitions.h:614
Provides the interface for the woss::PDouble class.
Definitions and library for woss::Pressure class.
std::map< PDouble, std::complex< double > > TimeArrMap
Definition time-arrival-definitions.h:57