Jpp  test_elongated_shower_pde
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
JReceiver.hh
Go to the documentation of this file.
1 #ifndef __JACOUSTICS__JRECEIVER__
2 #define __JACOUSTICS__JRECEIVER__
3 
4 #include "JLang/JObjectID.hh"
6 
7 
8 /**
9  * \file
10  *
11  * Acoustic receiver.
12  * \author mdejong
13  */
14 namespace JACOUSTICS {}
15 namespace JPP { using namespace JACOUSTICS; }
16 
17 namespace JACOUSTICS {
18 
19  using JLANG::JObjectID;
22 
23 
24  /**
25  * Acoustic receiver.
26  */
27  struct JReceiver :
28  public JObjectID,
29  public JPosition3D
30  {
31  /**
32  * Default constructor.
33  */
35  t0_s(0.0)
36  {}
37 
38 
39  /**
40  * Constructor.
41  *
42  * \param id identifier
43  * \param pos position
44  * \param t0_s time offset of clock [s]
45  */
46  JReceiver(const int id,
47  const JVector3D& pos,
48  const double t0_s) :
49  JObjectID (id),
50  JPosition3D(pos),
51  t0_s (t0_s)
52  {}
53 
54 
55  /**
56  * Get time offset of clock.
57  *
58  * \return time offset [s]
59  */
60  double getT0() const
61  {
62  return t0_s;
63  }
64 
65 
66  /**
67  * Get corrected time.
68  *
69  * \param t_s time [s]
70  * \return time [s]
71  */
72  double getT(const double t_s) const
73  {
74  return t_s + t0_s;
75  }
76 
77 
78  /**
79  * Get uncorrected time.
80  *
81  * \param t_s time [s]
82  * \return time [s]
83  */
84  double putT(const double t_s) const
85  {
86  return t_s - t0_s;
87  }
88 
89  protected:
90  double t0_s;
91  };
92 }
93 
94 #endif
Acoustic receiver.
Definition: JReceiver.hh:27
Data structure for vector in three dimensions.
Definition: JVector3D.hh:34
double getT0() const
Get time offset of clock.
Definition: JReceiver.hh:60
double getT(const double t_s) const
Get corrected time.
Definition: JReceiver.hh:72
Auxiliary class for object identification.
Definition: JObjectID.hh:22
double putT(const double t_s) const
Get uncorrected time.
Definition: JReceiver.hh:84
Data structure for position in three dimensions.
Definition: JPosition3D.hh:36
JReceiver()
Default constructor.
Definition: JReceiver.hh:34
JReceiver(const int id, const JVector3D &pos, const double t0_s)
Constructor.
Definition: JReceiver.hh:46