Jpp 20.0.0-rc.9-29-gccc23c492-D
the software that should make you happy
Loading...
Searching...
No Matches
JTransceiver.hh
Go to the documentation of this file.
1#ifndef __JACOUSTICS__JTRANSCEIVER__
2#define __JACOUSTICS__JTRANSCEIVER__
3
4#include "JAcoustics/JToA.hh"
9
10
11/**
12 * \file
13 *
14 * Acoustic transceiver.
15 * \author mdejong
16 */
17namespace JACOUSTICS {}
18namespace JPP { using namespace JACOUSTICS; }
19
20namespace 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 */
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,
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 {
82 return emitter.getDistance(receiver);
83 }
84
87 };
88}
89
90#endif
Acoustic emitter.
Acoustic receiver.
Sound velocity.
Acoustic event.
Acoustic transmission.
Auxiliary classes and methods for acoustic position calibration.
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:28
uint32_t QUALITYFACTOR
The ticks (16ns) part of the DAQ frame timestamp.
Definition JToA.hh:39
uint32_t QUALITYNORMALISATION
A measure of how good the waveform match was to the signal.
Definition JToA.hh:40
int32_t RUN
detector identifier
Definition JToA.hh:33
double TOA_S() const
Time of Arrival, expressed in seconds relative to Unix epoch (1 January 1970 00:00:00 UTC)
Definition JToAImp.cc:40
Acoustic transceiver.
JTransmission getTransmission(const JToA &data, const JAbstractSoundVelocity &V) const
Get transmission.
JTransceiver()
Default constructor.
double getDistance() const
Get distance between emitter and receiver.
JTransceiver(const JEmitter &emitter, const JReceiver &receiver)
Constructor.
Acoustic transmission.