Jpp test-rotations-old
the software that should make you happy
Loading...
Searching...
No Matches
JConstantSoundVelocity.hh
Go to the documentation of this file.
1#ifndef __JACOUSTICS__JCONSTANTSOUNDVELOCITY__
2#define __JACOUSTICS__JCONSTANTSOUNDVELOCITY__
3
5
6
7/**
8 * \file
9 *
10 * Sound velocity.
11 * \author mdejong
12 */
13namespace JACOUSTICS {}
14namespace JPP { using namespace JACOUSTICS; }
15
16namespace JACOUSTICS {
17
18 /**
19 * Implementation for depth independend velocity of sound.
20 */
23 {
24 /**
25 * Constructor.
26 *
27 * \param V velocity [m/s]
28 */
29 JConstantSoundVelocity(const double V) :
30 V(V)
31 {}
32
33
34 /**
35 * Get velocity of sound.
36 *
37 * \return velocity [m/s]
38 */
39 virtual double operator()() const override
40 {
41 return V;
42 }
43
44
45 /**
46 * Get velocity of sound at given depth relative to seabed.
47 *
48 * \param z depth [m]
49 * \return velocity [m/s]
50 */
51 virtual double operator()(const double z) const
52 {
53 return V;
54 }
55
56
57 /**
58 * Get distance travelled by sound.
59 *
60 * \param t_s time [s]
61 * \param z1 depth [m]
62 * \param z2 depth [m]
63 * \return distance [m]
64 */
65 virtual double getDistance(const double t_s,
66 const double z1,
67 const double z2) const override
68 {
69 return t_s * V;
70 }
71
72
73 /**
74 * Get propagation time of sound.
75 *
76 * \param D_m distance [m]
77 * \param z1 depth [m]
78 * \param z2 depth [m]
79 * \return time [s]
80 */
81 virtual double getTime(const double D_m,
82 const double z1,
83 const double z2) const override
84 {
85 return D_m / V;
86 }
87
88
89 /**
90 * Get inverse velocity of sound.
91 *
92 * \param D_m distance [m]
93 * \param z1 depth [m]
94 * \param z2 depth [m]
95 * \return inverse velocity [s/m]
96 */
97 virtual double getInverseVelocity(const double D_m,
98 const double z1,
99 const double z2) const override
100 {
101 return 1.0 / V;
102 }
103
104 const double V;
105 };
106}
107
108#endif
Abstract sound velocity.
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.
Implementation for depth independend velocity of sound.
virtual double getDistance(const double t_s, const double z1, const double z2) const override
Get distance travelled by sound.
virtual double operator()(const double z) const
Get velocity of sound at given depth relative to seabed.
virtual double getTime(const double D_m, const double z1, const double z2) const override
Get propagation time of sound.
JConstantSoundVelocity(const double V)
Constructor.
virtual double operator()() const override
Get velocity of sound.
virtual double getInverseVelocity(const double D_m, const double z1, const double z2) const override
Get inverse velocity of sound.