Jpp - the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Types | Public Member Functions | Public Attributes | List of all members
JACOUSTICS::JMatch3D Class Reference

3D match criterion for acoustic signals. More...

Inheritance diagram for JACOUSTICS::JMatch3D:
JLANG::JClonable< JClonable_t, JDerived_t >

Public Types

typedef JClonable< JClonable_t >
::clone_type 
clone_type
 

Public Member Functions

 JMatch3D (const JSoundVelocity &V, const double Tmax_s=0.0)
 Constructor. More...
 
virtual bool operator() (const hit_type &first, const hit_type &second) const override
 Match operator. More...
 
virtual clone_type clone () const override
 Get clone of this object. More...
 

Public Attributes

const JSoundVelocity V
 
const double Tmax_s
 

Detailed Description

3D match criterion for acoustic signals.

Definition at line 86 of file JAcousticsTriggerProcessor.cc.

Member Typedef Documentation

template<class JClonable_t, class JDerived_t = JNullType>
typedef JClonable<JClonable_t>::clone_type JLANG::JClonable< JClonable_t, JDerived_t >::clone_type
inherited

Definition at line 61 of file JClonable.hh.

Constructor & Destructor Documentation

JACOUSTICS::JMatch3D::JMatch3D ( const JSoundVelocity V,
const double  Tmax_s = 0.0 
)
inline

Constructor.

Parameters
Vsound velocity
Tmax_smaximal extra time [s]

Definition at line 96 of file JAcousticsTriggerProcessor.cc.

96  :
97  V(V),
98  Tmax_s(Tmax_s)
99  {}

Member Function Documentation

virtual bool JACOUSTICS::JMatch3D::operator() ( const hit_type first,
const hit_type second 
) const
inlineoverridevirtual

Match operator.

Parameters
firsthit
secondhit
Returns
match result

Definition at line 109 of file JAcousticsTriggerProcessor.cc.

110  {
111  using namespace JPP;
112 
113  const double t1 = V.getTime(getDistance(first.getPosition(), second.getPosition()),
114  first .getZ(),
115  second.getZ());
116 
117  const double dt = fabs(first.getToA() - second.getToA());
118 
119  return dt <= t1 + Tmax_s;
120  }
double getDistance(const JFirst_t &first, const JSecond_t &second)
Get distance between objects.
const JPosition3D & getPosition() const
Get position.
Definition: JPosition3D.hh:130
virtual double getTime(const double D_m, const double z1, const double z2) const override
Get propagation time of sound.
double getToA() const
Get calibrated time of arrival.
double getZ() const
Get z position.
Definition: JVector3D.hh:115
template<class JClonable_t, class JDerived_t = JNullType>
virtual clone_type JLANG::JClonable< JClonable_t, JDerived_t >::clone ( ) const
inlineoverridevirtualinherited

Member Data Documentation

const JSoundVelocity JACOUSTICS::JMatch3D::V

Definition at line 123 of file JAcousticsTriggerProcessor.cc.

const double JACOUSTICS::JMatch3D::Tmax_s

Definition at line 124 of file JAcousticsTriggerProcessor.cc.


The documentation for this class was generated from the following file: