Jpp
 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  t1_s(0.0)
37  {}
38 
39 
40  /**
41  * Constructor.
42  *
43  * \param id identifier
44  * \param pos position
45  * \param t0_s time offset of clock [s]
46  * \param t1_s time delay of sensor [s]
47  */
48  JReceiver(const int id,
49  const JVector3D& pos,
50  const double t0_s,
51  const double t1_s) :
52  JObjectID (id),
53  JPosition3D(pos),
54  t0_s (t0_s),
55  t1_s (t1_s)
56  {}
57 
58 
59  /**
60  * Get time offset of clock.
61  *
62  * \return time offset [s]
63  */
64  double getT0() const
65  {
66  return t0_s;
67  }
68 
69 
70  /**
71  * Get time delay of sensor.
72  *
73  * \return time delay [s]
74  */
75  double getDelayTime() const
76  {
77  return t1_s;
78  }
79 
80 
81  /**
82  * Get corrected time.
83  *
84  * \param t_s time [s]
85  * \return time [s]
86  */
87  double getT(const double t_s) const
88  {
89  return t_s + t0_s - t1_s;
90  }
91 
92 
93  /**
94  * Get uncorrected time.
95  *
96  * \param t_s time [s]
97  * \return time [s]
98  */
99  double putT(const double t_s) const
100  {
101  return t_s - t0_s + t1_s;
102  }
103 
104  protected:
105  double t0_s;
106  double t1_s;
107  };
108 }
109 
110 #endif
Acoustic receiver.
Definition: JReceiver.hh:27
double getDelayTime() const
Get time delay of sensor.
Definition: JReceiver.hh:75
Data structure for vector in three dimensions.
Definition: JVector3D.hh:33
double getT0() const
Get time offset of clock.
Definition: JReceiver.hh:64
double getT(const double t_s) const
Get corrected time.
Definition: JReceiver.hh:87
JReceiver(const int id, const JVector3D &pos, const double t0_s, const double t1_s)
Constructor.
Definition: JReceiver.hh:48
Auxiliary class for object identification.
Definition: JObjectID.hh:27
double putT(const double t_s) const
Get uncorrected time.
Definition: JReceiver.hh:99
Data structure for position in three dimensions.
Definition: JPosition3D.hh:35
JReceiver()
Default constructor.
Definition: JReceiver.hh:34