Jpp  19.1.0
the software that should make you happy
JTransceiver.hh
Go to the documentation of this file.
1 #ifndef __JACOUSTICS__JTRANSCEIVER__
2 #define __JACOUSTICS__JTRANSCEIVER__
3 
4 #include "JAcoustics/JToA.hh"
5 #include "JAcoustics/JEmitter.hh"
9 
10 
11 /**
12  * \file
13  *
14  * Acoustic transceiver.
15  * \author mdejong
16  */
17 namespace JACOUSTICS {}
18 namespace JPP { using namespace JACOUSTICS; }
19 
20 namespace JACOUSTICS {
21 
22  /**
23  * Acoustic transceiver.
24  */
25  struct JTransceiver :
26  public JEmitter,
27  public JReceiver
28  {
29  /**
30  * Default constructor.
31  */
33  emitter (),
34  receiver()
35  {}
36 
37 
38  /**
39  * Constructor.
40  *
41  * \param emitter emitter
42  * \param receiver receiver
43  */
45  const JReceiver& receiver) :
46  emitter (emitter),
48  {}
49 
50 
51  /**
52  * Get transmission.
53  *
54  * \param data time-of-arrival
55  * \param V sound velocity
56  * \return transmission
57  */
59  const JAbstractSoundVelocity& V) const
60  {
61  const double toa = receiver.getT(data.TOA_S());
62  const double t1 = V.getTime(this->getDistance(),
63  this->emitter .getZ(),
64  this->receiver.getZ());
65 
66  return JTransmission(data.RUN,
67  this->receiver.getID(),
68  data.QUALITYFACTOR,
69  data.QUALITYNORMALISATION,
70  toa,
71  toa - t1);
72  }
73 
74 
75  /**
76  * Get distance between emitter and receiver.
77  *
78  * \return distance
79  */
80  inline double getDistance() const
81  {
83  }
84 
87  };
88 }
89 
90 #endif
Acoustic emitter.
Acoustic receiver.
Sound velocity.
Acoustic event.
Acoustic transmission.
double getDistance(const JVector3D &pos) const
Get distance to point.
Definition: JVector3D.hh:270
double getZ() const
Get z position.
Definition: JVector3D.hh:115
Auxiliary classes and methods for acoustic position calibration.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Interface for depth dependend velocity of sound.
virtual double getTime(const double D_m, const double z1, const double z2) const =0
Get propagation time of sound.
Acoustic emitter.
Definition: JEmitter.hh:30
Acoustic receiver.
Definition: JReceiver.hh:30
double getT(const double t_s) const
Get corrected time.
Definition: JReceiver.hh:72
Time-of-arrival data from acoustic piezo sensor or hydrophone.
Definition: JToA.hh:26
Acoustic transceiver.
Definition: JTransceiver.hh:28
JTransmission getTransmission(const JToA &data, const JAbstractSoundVelocity &V) const
Get transmission.
Definition: JTransceiver.hh:58
JTransceiver()
Default constructor.
Definition: JTransceiver.hh:32
double getDistance() const
Get distance between emitter and receiver.
Definition: JTransceiver.hh:80
JTransceiver(const JEmitter &emitter, const JReceiver &receiver)
Constructor.
Definition: JTransceiver.hh:44
Acoustic transmission.