Jpp 19.3.0-rc.1
the software that should make you happy
Loading...
Searching...
No Matches
JACOUSTICS Namespace Reference

Auxiliary classes and methods for acoustic position calibration. More...

Namespaces

namespace  JGEOMETRY
 Auxiliary namespace to encapsulate different geometries.
 
namespace  JMODEL
 Auxiliary namespace to encapsulate different model parameters.
 

Classes

struct  event_type
 Event. More...
 
struct  getEvt
 Auxiliary data structure to convert model to event. More...
 
struct  getModel
 Auxiliary data structure to convert event to model. More...
 
struct  getSuperEvt
 Auxiliary data structure to convert model to super event. More...
 
struct  hit_type
 Acoustic hit. More...
 
struct  JAbstractSoundVelocity
 Interface for depth dependend velocity of sound. More...
 
struct  JAttenuationLength
 Auxiliary data structure for calculation of attenuation length. More...
 
struct  JCheck
 Auxiliary data structure for final check on event. More...
 
struct  JConstantSoundVelocity
 Implementation for depth independend velocity of sound. More...
 
struct  JCounter
 Acoustic counter. More...
 
struct  JDetectorMechanics
 Auxiliary data structure for mechanical model parameters of strings in a given detector. More...
 
struct  JEKey
 Emitter key. More...
 
struct  JEmitter
 Acoustic emitter. More...
 
struct  JEmitterID
 Auxiliary class for emitter identification. More...
 
struct  JEvent
 Acoustic event. More...
 
struct  JEventOverlap
 Match of two events considering overlap in time and position. More...
 
struct  JEvt
 Acoustic event fit. More...
 
struct  JFilenames
 Auxiliary data structure for handling of file names. More...
 
struct  JFit
 Acoustic single fit. More...
 
struct  JFitParameters
 Fit parameters. More...
 
class  JFremantle
 Thread pool for global fits. More...
 
class  JGandalf
 Place holder for custom implementation. More...
 
struct  JGlobalfit
 Global fit of prameterised detector geometry to acoustics data. More...
 
struct  JHead
 Acoustic event header. More...
 
struct  JHit
 Acoustics hit. More...
 
struct  JKatoomba
 Template definition of fit function of acoustic model. More...
 
struct  JKatoomba< JAbstractMinimiser >
 Template specialisation of fit function of acoustic model based on JAbstractMinimiser minimiser. More...
 
struct  JKatoomba< JEstimator >
 Template specialisation of fit function of acoustic model based on linear approximation. More...
 
struct  JKatoomba< JGandalf >
 Template specialisation of fit function of acoustic model based on JGandalf minimiser. More...
 
struct  JKatoomba< JSimplex >
 Template specialisation of fit function of acoustic model based on JSimplex minimiser. More...
 
struct  JKatoomba< JType >
 Auxiliary base class for fit function of acoustic model. More...
 
class  JMatch1D
 1D match criterion for acoustic signals. More...
 
class  JMatch3D
 3D match criterion for acoustic signals. More...
 
struct  JMechanics
 Auxiliary data structure for parameters of mechanical model. More...
 
struct  JModel
 Model for fit to acoustics data. More...
 
class  JPlatypus
 Thread pool for global fits using super events. More...
 
struct  JReceiver
 Acoustic receiver. More...
 
struct  JSetup
 Auxiliary data structure for setup of complete system. More...
 
struct  JSoundVelocity
 Implementation for depth dependend velocity of sound. More...
 
struct  JSuperEvt
 Acoustic super event fit. More...
 
struct  JSydney
 Main class for pre-calibration using acoustics data. More...
 
struct  JToA
 Time-of-arrival data from acoustic piezo sensor or hydrophone. More...
 
struct  JTransceiver
 Acoustic transceiver. More...
 
struct  JTransmission
 Acoustic transmission. More...
 
struct  JTransmission_t
 Acoustic transmission identifier. More...
 
class  JTriggerOutput
 Set of acoustics events. More...
 
struct  JTriggerParameters
 Trigger parameters. More...
 
struct  JVelo
 Vertex locator. More...
 
struct  JWaveform
 Utility class for emitter power and frequency. More...
 
struct  JWeight
 Auxiliary data structure to unify weights of acoustics data according to the number of pings per emitter. More...
 
struct  TMatrixDS
 Auxiliary data structure for compatibility of symmetric matrix. More...
 
struct  vertex_type
 Vertex. More...
 

Typedefs

typedef JGEOMETRY::JDetector JGeometry
 Type definition of detector geometry.
 
typedef JContainer< std::vector< JTripod > > tripods_container
 
typedef JContainer< std::vector< JHydrophone > > hydrophones_container
 
typedef JContainer< std::vector< JTransmitter > > transmitters_container
 
typedef JTOOLS::JRange< double > JTimeRange
 Type definition for time range (unit [s]).
 
typedef JAbstractHistogram< double > JHistogram_t
 Type definition for scan along axis.
 

Enumerations

enum  JMatrix_t { SVD_t = 1 , LDU_t = 2 }
 Algorithm for matrix inversion. More...
 

Functions

double getQ (const double D_m, const double f_kHz, const double d_m)
 Get relative quality for given frequency at given distance.
 
int getWaveformID (int id)
 Get waveform identifier.
 
template<class T , class JTypename_t , class JComparator_t >
JVector3D getPosition (T __begin, T __end, const JPredicate< JTypename_t, JComparator_t > &predicate)
 Get position from element in data which corresponds to given predicate.
 
template<class T , class JTypename_t , class JComparator_t >
JVector3D getPosition (T __begin, T __end, const JPredicate< JTypename_t, JComparator_t > &predicate, const JVector3D &position)
 Get position from element in data which corresponds to given predicate.
 
double getUNIXTime (const KM3NETDAQ::JDAQChronometer &chronometer)
 Get UNIX time of given DAQ object.
 
double getQuality (const JEvent &evt)
 Get average quality.
 
static bool operator< (const JCounter &first, const JCounter &second)
 Less-than operator for two counters.
 
static bool operator== (const JCounter &first, const JCounter &second)
 Equals operator for two counters.
 
bool operator< (const JHead &first, const JHead &second)
 Less than operator for acoustics event headers.
 
double getQuality (const double chi2, const int NDF)
 Get quality of fit.
 
template<class T >
size_t getNumberOfEmitters (T __begin, T __end)
 Get number of emitters.
 
template<class T >
size_t getMinimumNumberOfEmitters (T __begin, T __end)
 Get minimum number of emitters for any string in data.
 
JMODEL::JString getString (const JFit &fit)
 Get model parameters of string.
 
JFit getFit (const int id, const JMODEL::JString &string)
 Get fit parameters of string.
 
template<class T >
double getWeight (T __begin, T __end)
 Get total weight of data points.
 
JTreeParameters getTreeParameters (const JType< JToA > &type)
 
JTreeParameters getTreeParameters (const JType< JEvent > &type)
 
JTreeParameters getTreeParameters (const JType< JEvt > &type)
 
JTreeParameters getTreeParameters (const JType< JSuperEvt > &type)
 
static bool operator< (const JTransmission &first, const JTransmission &second)
 Less-than operator for two transmissions.
 
static bool operator== (const JTransmission &first, const JTransmission &second)
 Equals operator for two transmissions.
 
double getGravity (const double phi)
 Get gravitational constant.
 
double getVelocityMackenzie (const double D, const double S, const double T)
 Get sound velocity.
 
double getVelocityCoppens (const double D, const double S, const double T)
 Get sound velocity.
 
double getVelocityUNESCO (const double P, const double S, const double T)
 Get sound velocity.
 
double getVelocityDelGrosso (const double p, const double S, const double T)
 Get sound velocity.
 
double getDepth (const double P, const double phi, const bool option=true)
 Get depth.
 
double getPressure (const double z, const double phi, const bool option=true)
 Get pressure.
 
void print (std::ostream &out, const JEvent &event)
 Print event.
 

Variables

static const double TOAMIN_S = 0.0000000
 Minimal allowed time-of-arrival [s].
 
static const double TOAMAX_S = 0.6310912
 Maximal allowed time-of-arrival [s].
 
static const JAttenuationLength getAttenuationLength (13.2, 38.0, 8.0)
 Function object to calculate attenutation length.
 
static JEmitterID getEmitterID
 Function object for emitter identification.
 
static JDetectorMechanics getMechanics
 Function object to get string mechanics.
 
static const JSoundVelocity getSoundVelocity (1541.0, -17.0e-3, -2000.0)
 Function object for velocity of sound.
 
static const char skip_t = '#'
 Script commands.
 
static const std::string initialise_t = "initialise"
 initialise
 
static const std::string fix_t = "fix"
 fix objects
 
static const std::string string_t = "string"
 string
 
static const std::string tripod_t = "tripod"
 tripod
 
static const std::string stage_t = "stage"
 fit stage
 
constexpr double ONE_TICK_IN_NS = 16E-9
 
constexpr double SECOND_IN_NANOSECOND = 1E-9
 
constexpr double SECOND_IN_MICROSECOND = 1E-6
 
constexpr int64_t NANOSECONDS_IN_ONE_SECOND = 1000000000LL
 
constexpr int64_t NANOSECONDS_IN_ONE_TICK = 16LL
 

Detailed Description

Auxiliary classes and methods for acoustic position calibration.

Author
mdejong

Typedef Documentation

◆ JGeometry

Type definition of detector geometry.

Definition at line 639 of file JGeometry.hh.

◆ tripods_container

Definition at line 79 of file JSydney.cc.

◆ hydrophones_container

◆ transmitters_container

◆ JTimeRange

Type definition for time range (unit [s]).

Definition at line 19 of file JAcoustics/JTimeRange.hh.

◆ JHistogram_t

Type definition for scan along axis.

Definition at line 61 of file JBillabong.cc.

Enumeration Type Documentation

◆ JMatrix_t

Algorithm for matrix inversion.

Enumerator
SVD_t 

SVD.

LDU_t 

LDU.

Definition at line 345 of file JKatoomba_t.hh.

345 {
346 SVD_t = 1, //!< SVD
347 LDU_t = 2 //!< LDU
348 };

Function Documentation

◆ getQ()

double JACOUSTICS::getQ ( const double D_m,
const double f_kHz,
const double d_m )
inline

Get relative quality for given frequency at given distance.

Parameters
D_mdepth [m]
f_kHzfrequency [kHz]
d_mdistance [m]
Returns
quality

Definition at line 92 of file JAcousticsSupportkit.hh.

95 {
96 return exp(-0.5 * d_m / getAttenuationLength(D_m, f_kHz)) / d_m;
97 }
static const JAttenuationLength getAttenuationLength(13.2, 38.0, 8.0)
Function object to calculate attenutation length.

◆ getWaveformID()

int JACOUSTICS::getWaveformID ( int id)
inline

Get waveform identifier.

Conform TriDASManager configuration of acoustic data filter (DAQ_ADF_DOM_configuration), private communication Cristiano Bozza.

Parameters
idwaveform identifier
Returns
waveform identifier

Definition at line 39 of file JAcousticsToolkit.hh.

40 {
41 if (id < 0)
42 return -id - 1;
43 else
44 return id;
45 }

◆ getPosition() [1/2]

template<class T , class JTypename_t , class JComparator_t >
JVector3D JACOUSTICS::getPosition ( T __begin,
T __end,
const JPredicate< JTypename_t, JComparator_t > & predicate )
inline

Get position from element in data which corresponds to given predicate.

Parameters
__beginbegin of data
__endend of data
predicatepredicate
Returns
position

Definition at line 149 of file JAcousticsToolkit.hh.

152 {
153 T p = std::find_if(__begin, __end, predicate);
154
155 if (p != __end)
156 return p->getPosition();
157 else
158 THROW(JValueOutOfRange, "No element in container which corresponds to given predicate.");
159 }
#define THROW(JException_t, A)
Marco for throwing exception with std::ostream compatible message.
Exception for accessing a value in a collection that is outside of its range.

◆ getPosition() [2/2]

template<class T , class JTypename_t , class JComparator_t >
JVector3D JACOUSTICS::getPosition ( T __begin,
T __end,
const JPredicate< JTypename_t, JComparator_t > & predicate,
const JVector3D & position )
inline

Get position from element in data which corresponds to given predicate.

Parameters
__beginbegin of data
__endend of data
predicatepredicate
positiondefault position
Returns
position

Definition at line 172 of file JAcousticsToolkit.hh.

176 {
177 try {
178 return getPosition(__begin, __end, predicate);
179 }
180 catch(const std::exception&) {
181 return position;
182 }
183 }
JPosition3D getPosition(const Vec &pos)
Get position.

◆ getUNIXTime()

double JACOUSTICS::getUNIXTime ( const KM3NETDAQ::JDAQChronometer & chronometer)
inline

Get UNIX time of given DAQ object.

Parameters
chronometerchronometer
Returns
UNIX time [s]

Definition at line 192 of file JAcousticsToolkit.hh.

193 {
194 return chronometer.getTimesliceStart().getTimeNanoSecond() * 1.0e-9;
195 }
JDAQUTCExtended getTimesliceStart() const
Get start of timeslice.
double getTimeNanoSecond() const
Get time (limited to 16 ns cycles).

◆ getQuality() [1/2]

double JACOUSTICS::getQuality ( const JEvent & evt)
inline

Get average quality.

Parameters
evtevent
Returns
quality

Definition at line 424 of file JAcousticsTriggerProcessor.cc.

425 {
426 double Q = 0.0;
427
428 if (!evt.empty()) {
429
430 for (const auto& i : evt) {
431 Q += i.getQ();
432 }
433
434 Q /= evt.size();
435 }
436
437 return Q;
438 }

◆ operator<() [1/3]

static bool JACOUSTICS::operator< ( const JCounter & first,
const JCounter & second )
inlinestatic

Less-than operator for two counters.

Parameters
firstfirst counter
secondsecond counter
Returns
true if first counter less than second; else false

Definition at line 99 of file JAcoustics/JCounter.hh.

100 {
101 return first.getCounter() < second.getCounter();
102 }
int getCounter() const
Get counter.

◆ operator==() [1/2]

static bool JACOUSTICS::operator== ( const JCounter & first,
const JCounter & second )
inlinestatic

Equals operator for two counters.

Parameters
firstfirst counter
secondsecond counter
Returns
true if first counter equal to second; else false

Definition at line 112 of file JAcoustics/JCounter.hh.

113 {
114 return first.getCounter() == second.getCounter();
115 }

◆ operator<() [2/3]

bool JACOUSTICS::operator< ( const JHead & first,
const JHead & second )
inline

Less than operator for acoustics event headers.

The less than operator is applied to the object identifier, the UNIX start time and the UNIX stop time, respectively.

Parameters
firstfirst header
secondsecond header
Returns
true if first event header earliear than second; else false

Definition at line 282 of file JAcoustics/JEvt.hh.

283 {
284 if (first.detid == second.detid) {
285
286 if (first.UNIXTimeStart == second.UNIXTimeStart) {
287
288 return first.UNIXTimeStop < second.UNIXTimeStop;
289
290 } else {
291
292 return first.UNIXTimeStart < second.UNIXTimeStart;
293 }
294
295 } else {
296
297 return first.detid < second.detid;
298 }
299 }
double UNIXTimeStop
stop time
int detid
detector identifier
double UNIXTimeStart
start time

◆ getQuality() [2/2]

double JACOUSTICS::getQuality ( const double chi2,
const int NDF )
inline

Get quality of fit.


The larger the quality, the better the fit.

Parameters
chi2chi2
NDFnumber of degrees of freedom
Returns
quality

Definition at line 31 of file JAcoustics/JEvtToolkit.hh.

32 {
33 return NDF - 0.25 * chi2 / NDF;
34 }

◆ getNumberOfEmitters()

template<class T >
size_t JACOUSTICS::getNumberOfEmitters ( T __begin,
T __end )
inline

Get number of emitters.

Parameters
__beginbegin of events
__endend of events
Returns
number of emitters

Definition at line 45 of file JAcoustics/JEvtToolkit.hh.

46 {
47 using namespace std;
48
49 set<int> buffer;
50
51 for (T i = __begin; i != __end; ++i) {
52 if (!i->empty()) {
53 buffer.insert(i->getID());
54 }
55 }
56
57 return buffer.size();
58 }

◆ getMinimumNumberOfEmitters()

template<class T >
size_t JACOUSTICS::getMinimumNumberOfEmitters ( T __begin,
T __end )
inline

Get minimum number of emitters for any string in data.

Parameters
__beginbegin of events
__endend of events
Returns
number of emitters

Definition at line 69 of file JAcoustics/JEvtToolkit.hh.

70 {
71 using namespace std;
72
73 map<int, set<int> > buffer;
74
75 for (T i = __begin; i != __end; ++i) {
76 buffer[i->getString()].insert(i->getID());
77 }
78
79 if (!buffer.empty()) {
80
81 size_t n = numeric_limits<size_t>::max();
82
83 for (map<int, set<int> >::const_iterator i = buffer.begin(); i != buffer.end(); ++i) {
84 if (i->second.size() < n) {
85 n = i->second.size();
86 }
87 }
88
89 return n;
90 }
91
92 return 0;
93 }
const int n
Definition JPolint.hh:791

◆ getString()

JMODEL::JString JACOUSTICS::getString ( const JFit & fit)
inline

Get model parameters of string.

Parameters
fitfit parameters
Returns
model parameters

Definition at line 102 of file JAcoustics/JEvtToolkit.hh.

103 {
104 return JMODEL::JString(fit.tx, fit.ty, fit.tx2, fit.ty2, fit.vs);
105 }
double tx
slope dx/dz
double vs
stretching factor
double ty
slope dy/dz
double ty2
2nd order correction of slope dy/dz
double tx2
2nd order correction of slope dx/dz

◆ getFit()

JFit JACOUSTICS::getFit ( const int id,
const JMODEL::JString & string )
inline

Get fit parameters of string.

Parameters
ididentifier
stringmodel parameters
Returns
fit parameters

Definition at line 115 of file JAcoustics/JEvtToolkit.hh.

116 {
117 return JFit(id, string.tx, string.ty, string.tx2, string.ty2, string.vs);
118 }
Acoustic single fit.

◆ getWeight()

template<class T >
double JACOUSTICS::getWeight ( T __begin,
T __end )
inline

Get total weight of data points.

Parameters
__beginbegin of data
__endend of data
Returns
total weight

Definition at line 60 of file JKatoomba_t.hh.

61 {
62 double W = 0;
63
64 for (T i = __begin; i != __end; ++i) {
65 W += i->getWeight();
66 }
67
68 return W;
69 }

◆ getTreeParameters() [1/4]

JTreeParameters JACOUSTICS::getTreeParameters ( const JType< JToA > & type)
inline
Parameters
typedata type
Returns
TTree parameters

Definition at line 36 of file JAcoustics/JSupport.hh.

37 {
38 return JTreeParameters("TOA", "toa", "", 2);
39 }
Data structure for TTree parameters.

◆ getTreeParameters() [2/4]

JTreeParameters JACOUSTICS::getTreeParameters ( const JType< JEvent > & type)
inline
Parameters
typedata type
Returns
TTree parameters

Definition at line 46 of file JAcoustics/JSupport.hh.

47 {
48 return JTreeParameters("ACOUSTICS", "acoustics_event", "", 2, 65536, 2);
49 }

◆ getTreeParameters() [3/4]

JTreeParameters JACOUSTICS::getTreeParameters ( const JType< JEvt > & type)
inline
Parameters
typedata type
Returns
TTree parameters

Definition at line 55 of file JAcoustics/JSupport.hh.

56 {
57 return JTreeParameters("ACOUSTICS_FIT", "acoustics_fit", "", 2, 65536, 2);
58 }

◆ getTreeParameters() [4/4]

JTreeParameters JACOUSTICS::getTreeParameters ( const JType< JSuperEvt > & type)
inline
Parameters
typedata type
Returns
TTree parameters

Definition at line 64 of file JAcoustics/JSupport.hh.

65 {
66 return JTreeParameters("ACOUSTICS_SUPER_FIT", "acoustics_super_fit", "", 2, 65536, 2);
67 }

◆ operator<() [3/3]

static bool JACOUSTICS::operator< ( const JTransmission & first,
const JTransmission & second )
inlinestatic

Less-than operator for two transmissions.

The less-than operator is first applied to the time-of-emission and then to the identifier.

Parameters
firstfirst transmission
secondsecond transmission
Returns
true if first transmission earlier than second; else false

Definition at line 288 of file JTransmission.hh.

289 {
290 if (first.getToE() == second.getToE())
291 return first.getID() < second.getID();
292 else
293 return first.getToE() < second.getToE();
294 }
double getToE() const
Get estimated time of emission.
int getID() const
Get identifier.

◆ operator==() [2/2]

static bool JACOUSTICS::operator== ( const JTransmission & first,
const JTransmission & second )
inlinestatic

Equals operator for two transmissions.

The equal operator is applied to the time-of-emission and the identifier.

Parameters
firstfirst transmission
secondsecond transmission
Returns
true if first transmission equal to second; else false

Definition at line 306 of file JTransmission.hh.

307 {
308 return (first.getID() == second.getID() &&
309 first.getToE() == second.getToE());
310 }

◆ getGravity()

double JACOUSTICS::getGravity ( const double phi)
inline

Get gravitational constant.

Parameters
philatitude [deg]
Returns
g [m/s^2]

Definition at line 25 of file JUNESCO.hh.

26 {
27 const double sd = sin(phi * PI / 180.0);
28 const double s2 = sd*sd;
29 const double s4 = s2*s2;
30
31 return 9.780318 * (1.0 + 5.2788e-3*s2 + 2.36e-5*s4);
32 }

◆ getVelocityMackenzie()

double JACOUSTICS::getVelocityMackenzie ( const double D,
const double S,
const double T )
inline

Get sound velocity.

K.V. Mackenzie, Nine-term equation for the sound speed in the oceans (1981)
J. Acoust. Soc. Am. 70(3), pp 807-812

Parameters
Ddepth [m]
Ssalinity [ppk]
Ttemperature [C]
Returns
sound velocity [m/s]

Definition at line 46 of file JUNESCO.hh.

47 {
48 return (1448.96
49 + 4.591 * T
50 - 5.304e-2 * T*T
51 + 2.374e-4 * T*T*T
52 + 1.340 * (S - 35)
53 + 1.630e-2 * D
54 + 1.675e-7 * D*D
55 - 1.025e-2 * T * (S - 35)
56 - 7.139e-13 * T*D*D*D);
57 }

◆ getVelocityCoppens()

double JACOUSTICS::getVelocityCoppens ( const double D,
const double S,
const double T )
inline

Get sound velocity.

A.B. Coppens, Simple equations for the speed of sound in Neptunian waters (1981)
J. Acoust. Soc. Am. 69(3), pp 862-863

Parameters
Ddepth [m]
Ssalinity [ppk]
Ttemperature [C]
Returns
sound velocity [m/s]

Definition at line 71 of file JUNESCO.hh.

72 {
73 const double t = T * 0.1;
74 const double d = D * 1.0e-3;
75 const double c = 1449.05 + 45.7 * t - 5.21 * t*t + 0.23 * t*t*t + (1.333 - 0.126*t + 0.009 * t*t)*(S - 35);
76
77 return (c +
78 (16.23 + 0.253*t) * d +
79 (0.213 - 0.1*t) * d*d +
80 (0.016 + 0.0002*(S-35))*(S - 35)*t*d);
81 }

◆ getVelocityUNESCO()

double JACOUSTICS::getVelocityUNESCO ( const double P,
const double S,
const double T )
inline

Get sound velocity.

C-T. Chen and F.J. Millero, Speed of sound in seawater at high pressures (1977)
J. Acoust. Soc. Am. 62(5) pp 1129-1135

Parameters
Ppressure [bar]
Ssalinity [ppk]
Ttemperature [C]
Returns
sound velocity [m/s]

Definition at line 95 of file JUNESCO.hh.

96 {
97 const double A00 = 1.389;
98 const double A01 = -1.262E-2;
99 const double A02 = 7.166E-5;
100 const double A03 = 2.008E-6;
101 const double A04 = -3.21E-8;
102 const double A10 = 9.4742E-5;
103 const double A11 = -1.2583E-5;
104 const double A12 = -6.4928E-8;
105 const double A13 = 1.0515E-8;
106 const double A14 = -2.0142E-10;
107 const double A20 = -3.9064E-7;
108 const double A21 = 9.1061E-9;
109 const double A22 = -1.6009E-10;
110 const double A23 = 7.994E-12;
111 const double A30 = 1.100E-10;
112 const double A31 = 6.651E-12;
113 const double A32 = -3.391E-13;
114 const double B00 = -1.922E-2;
115 const double B01 = -4.42E-5;
116 const double B10 = 7.3637E-5;
117 const double B11 = 1.7950E-7;
118 const double C00 = 1402.388;
119 const double C01 = 5.03830;
120 const double C02 = -5.81090E-2;
121 const double C03 = 3.3432E-4;
122 const double C04 = -1.47797E-6;
123 const double C05 = 3.1419E-9;
124 const double C10 = 0.153563;
125 const double C11 = 6.8999E-4;
126 const double C12 = -8.1829E-6;
127 const double C13 = 1.3632E-7;
128 const double C14 = -6.1260E-10;
129 const double C20 = 3.1260E-5;
130 const double C21 = -1.7111E-6;
131 const double C22 = 2.5986E-8;
132 const double C23 = -2.5353E-10;
133 const double C24 = 1.0415E-12;
134 const double C30 = -9.7729E-9;
135 const double C31 = 3.8513E-10;
136 const double C32 = -2.3654E-12;
137 const double D00 = 1.727E-3;
138 const double D10 = -7.9836E-6;
139
140 const double T2 = T * T;
141 const double T3 = T2 * T;
142 const double T4 = T3 * T;
143 const double T5 = T4 * T;
144
145 const double P2 = P * P;
146 const double P3 = P2 * P;
147
148 const double Cw =
149 (C00 + C01 * T + C02 * T2 + C03 * T3 + C04 * T4 + C05 * T5) +
150 (C10 + C11 * T + C12 * T2 + C13 * T3 + C14 * T4) * P +
151 (C20 + C21 * T + C22 * T2 + C23 * T3 + C24 * T4) * P2 +
152 (C30 + C31 * T + C32 * T2) * P3;
153
154 const double A =
155 (A00 + A01 * T + A02 * T2 + A03 * T3 + A04 * T4) +
156 (A10 + A11 * T + A12 * T2 + A13 * T3 + A14 * T4) * P +
157 (A20 + A21 * T + A22 * T2 + A23 * T3) * P2 +
158 (A30 + A31 * T + A32 * T2) * P3;
159
160 const double B = B00 + B01 * T + (B10 + B11 * T) * P;
161
162 const double D = D00 + D10 * P;
163
164 return Cw + A*S + B*S*sqrt(S) + D*S*S;
165 }

◆ getVelocityDelGrosso()

double JACOUSTICS::getVelocityDelGrosso ( const double p,
const double S,
const double T )
inline

Get sound velocity.

V.A. Del Grosso, New equation for the speed of sound in natural waters (with comparisons to other equations) (1974)
J. Acoust. Soc. Am 56(4) pp 1084-1091

G.S.K. Wong and S Zhu, Speed of sound in seawater as a function of salinity, temperature and pressure (1995)
J. Acoust. Soc. Am. 97(3) pp 1732-1736

Parameters
ppressure [bar]
Ssalinity [ppk]
Ttemperature [C]
Returns
sound velocity [m/s]

Definition at line 182 of file JUNESCO.hh.

183 {
184 const double C000 = 1402.392;
185 const double CT1 = 0.5012285E1;
186 const double CT2 = -0.551184E-1;
187 const double CT3 = 0.221649E-3;
188 const double CS1 = 0.1329530E1;
189 const double CS2 = 0.1288598E-3;
190 const double CP1 = 0.1560592;
191 const double CP2 = 0.2449993E-4;
192 const double CP3 = -0.8833959E-8;
193 const double CST = -0.1275936E-1;
194 const double CTP = 0.6353509E-2;
195 const double CT2P2 = 0.2656174E-7;
196 const double CTP2 = -0.1593895E-5;
197 const double CTP3 = 0.5222483E-9;
198 const double CT3P = -0.4383615E-6;
199 const double CS2P2 = -0.1616745E-8;
200 const double CST2 = 0.9688441E-4;
201 const double CS2TP = 0.4857614E-5;
202 const double CSTP = -0.3406824E-3;
203
204 // 1 bar = 100 kPa = 1.019716 kg/cm^2.
205
206 const double f = 1.019716;
207 const double P = p * f;
208
209 const double T2 = T * T;
210 const double T3 = T2 * T;
211
212 const double S2 = S * S;
213
214 const double P2 = P * P;
215 const double P3 = P2 * P;
216
217 const double DCT = CT1 * T + CT2 * T2 + CT3 * T3;
218 const double DCS = CS1 * S + CS2 * S2;
219 const double DCP = CP1 * P + CP2 * P2 + CP3 * P3;
220 const double DCSTP = CTP * T*P + CT3P * T3*P + CTP2 * T*P2 + CT2P2 * T2*P2 + CTP3 * T*P3 + CST * S*T + CST2 * S*T2 + CSTP * S*T*P + CS2TP * S2*T*P + CS2P2 * S2*P2;
221
222 return C000 + DCT + DCS + DCP + DCSTP;
223 }

◆ getDepth()

double JACOUSTICS::getDepth ( const double P,
const double phi,
const bool option = true )
inline

Get depth.

Claude C. Leroy and Francois Parthiot, Depth-pressure relationships in the oceans and seas
J. Acoust. Soc. Am. 103(3), pp 1346-1352

Parameters
Ppressure [MPa]
philatitude [deg]
optionoption for Mediterranean
Returns
depth [m]

Definition at line 237 of file JUNESCO.hh.

238 {
239 const double sd = sin(phi * PI / 180.0);
240 const double g = 9.780318 * (1.0 + 5.2788e-3 * sd*sd + 2.363e-5 * sd*sd*sd*sd);
241 const double z = (9.72659e2 * P - 2.2512e-1 * P*P + 2.279e-4 * P*P*P - 1.82e-7 * P*P*P*P) / (g + 1.092e-4 * P);
242 const double dz = -7e-2 * P + 2e-3* (P*P);
243
244 return z + (option ? dz : 0.0);
245 }

◆ getPressure()

double JACOUSTICS::getPressure ( const double z,
const double phi,
const bool option = true )
inline

Get pressure.

Claude C. Leroy and Francois Parthiot, Depth-pressure relationships in the oceans and seas
J. Acoust. Soc. Am. 103(3), pp 1346-1352

Parameters
zdepth [m]
philatitude [deg]
optionoption for Mediterranean
Returns
pressure [MPa]

Definition at line 259 of file JUNESCO.hh.

260 {
261 const double sd = sin(phi * PI / 180.0);
262 const double g = 9.78031 * (1.0 + 5.3e-3 * sd*sd);
263 const double h45 = 1.00818e-2 * z + 2.465e-8 * z*z - 1.25e-13 * z*z*z + 2.8e-19 * z*z*z*z;
264 const double k = (g - 2e-5*z) / (9.80612 - 2e-5 * z);
265 const double dp = -8.5e-6 * z + 1.4e-9 * z*z;
266
267 return h45 * k - (option ? dp : 0.0);
268 }

◆ print()

void JACOUSTICS::print ( std::ostream & out,
const JEvent & event )
inline

Print event.

Parameters
outoutput stream
eventevent

Definition at line 296 of file JBillabong.cc.

297 {
298 using namespace std;
299
300 out << "event: " << setw(6) << event.getCounter() << ' ' << FIXED(12,2) << 0.5 * (event.begin()->getToA() + event.rbegin()->getToA()) << " [s] " << setw(4) << event.size() << endl;
301 }
Auxiliary data structure for floating point format specification.
Definition JManip.hh:448

Variable Documentation

◆ TOAMIN_S

const double JACOUSTICS::TOAMIN_S = 0.0000000
static

Minimal allowed time-of-arrival [s].

Definition at line 20 of file JAcousticsSupportkit.hh.

◆ TOAMAX_S

const double JACOUSTICS::TOAMAX_S = 0.6310912
static

Maximal allowed time-of-arrival [s].

Definition at line 21 of file JAcousticsSupportkit.hh.

◆ getAttenuationLength

const JAttenuationLength JACOUSTICS::getAttenuationLength(13.2, 38.0, 8.0) ( 13. 2,
38. 0,
8. 0 )
static

Function object to calculate attenutation length.

◆ getEmitterID

JEmitterID JACOUSTICS::getEmitterID
static

Function object for emitter identification.

Definition at line 119 of file JEmitterID.hh.

◆ getMechanics

JDetectorMechanics JACOUSTICS::getMechanics
static

Function object to get string mechanics.

Definition at line 242 of file JMechanics.hh.

◆ getSoundVelocity

const JSoundVelocity JACOUSTICS::getSoundVelocity(1541.0, -17.0e-3, -2000.0) ( 1541. 0,
-17.0e- 3,
-2000. 0 )
static

Function object for velocity of sound.

◆ skip_t

const char JACOUSTICS::skip_t = '#'
static

Script commands.

skip line

Definition at line 87 of file JSydney.cc.

◆ initialise_t

const std::string JACOUSTICS::initialise_t = "initialise"
static

initialise

Definition at line 88 of file JSydney.cc.

◆ fix_t

const std::string JACOUSTICS::fix_t = "fix"
static

fix objects

Definition at line 89 of file JSydney.cc.

◆ string_t

const std::string JACOUSTICS::string_t = "string"
static

string

Definition at line 90 of file JSydney.cc.

◆ tripod_t

const std::string JACOUSTICS::tripod_t = "tripod"
static

tripod

Definition at line 91 of file JSydney.cc.

◆ stage_t

const std::string JACOUSTICS::stage_t = "stage"
static

fit stage

Definition at line 92 of file JSydney.cc.

◆ ONE_TICK_IN_NS

double JACOUSTICS::ONE_TICK_IN_NS = 16E-9
constexpr

Definition at line 27 of file JToAImp.cc.

◆ SECOND_IN_NANOSECOND

double JACOUSTICS::SECOND_IN_NANOSECOND = 1E-9
constexpr

Definition at line 28 of file JToAImp.cc.

◆ SECOND_IN_MICROSECOND

double JACOUSTICS::SECOND_IN_MICROSECOND = 1E-6
constexpr

Definition at line 29 of file JToAImp.cc.

◆ NANOSECONDS_IN_ONE_SECOND

int64_t JACOUSTICS::NANOSECONDS_IN_ONE_SECOND = 1000000000LL
constexpr

Definition at line 30 of file JToAImp.cc.

◆ NANOSECONDS_IN_ONE_TICK

int64_t JACOUSTICS::NANOSECONDS_IN_ONE_TICK = 16LL
constexpr

Definition at line 31 of file JToAImp.cc.