Jpp test-rotations-new
the software that should make you happy
Loading...
Searching...
No Matches
JACOUSTICS::JMatch3D Class Reference

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

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

Public Types

typedef JClonable< JClonable_t >::clone_type clone_type
 

Public Member Functions

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

Public Attributes

const JAbstractSoundVelocityV
 
const double Tmax_s
 

Private Attributes

const double V
 
const double Dmax_m
 

Detailed Description

3D match criterion for acoustic signals.

Definition at line 94 of file JBillabong.cc.

Member Typedef Documentation

◆ clone_type

template<class JClonable_t , class JDerived_t >
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

◆ JMatch3D() [1/2]

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

Constructor.

Parameters
Vsound velocity
Tmax_smaximal extra time [s]

Definition at line 109 of file JAcousticsTriggerProcessor.cc.

109 :
110 V(V),
112 {}
const JAbstractSoundVelocity & V

◆ JMatch3D() [2/2]

JACOUSTICS::JMatch3D::JMatch3D ( const double V,
const double Dmax_m,
const double Tmax_s )
inline

Constructor.

Parameters
Vsound velocity [m/s]
Dmax_mmaximal distance [m]
Tmax_smaximal extra time [s]

Definition at line 105 of file JBillabong.cc.

105 :
106 V(V),
107 Dmax_m(Dmax_m),
109 {}
const double Dmax_m

Member Function Documentation

◆ operator()() [1/2]

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 122 of file JAcousticsTriggerProcessor.cc.

123 {
124 using namespace JPP;
125
126 const double t1 = V.getTime(getDistance(first.getPosition(), second.getPosition()),
127 first .getZ(),
128 second.getZ());
129 const double dt = fabs(first.getToA() - second.getToA());
130
131 return dt <= t1 + Tmax_s;
132 }
const JPosition3D & getPosition() const
Get position.
double getZ() const
Get z position.
Definition JVector3D.hh:115
double getDistance(const JFirst_t &first, const JSecond_t &second)
Get distance between objects.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
virtual double getTime(const double D_m, const double z1, const double z2) const =0
Get propagation time of sound.
double getToA() const
Get calibrated time of arrival.

◆ operator()() [2/2]

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 119 of file JBillabong.cc.

120 {
121 using namespace JPP;
122
123 const double D = getDistance(first.getPosition(), second.getPosition());
124
125 if (D <= Dmax_m)
126 return fabs(first.getToA() - second.getToA()) <= D / V + Tmax_s;
127 else
128 return false;
129 }

◆ clone()

template<class JClonable_t , class JDerived_t >
virtual clone_type JLANG::JClonable< JClonable_t, JDerived_t >::clone ( ) const
inlineoverridevirtualinherited

Member Data Documentation

◆ V [1/2]

const JAbstractSoundVelocity& JACOUSTICS::JMatch3D::V

Definition at line 135 of file JAcousticsTriggerProcessor.cc.

◆ Tmax_s

const double JACOUSTICS::JMatch3D::Tmax_s

Definition at line 136 of file JAcousticsTriggerProcessor.cc.

◆ V [2/2]

const double JACOUSTICS::JMatch3D::V
private

Definition at line 132 of file JBillabong.cc.

◆ Dmax_m

const double JACOUSTICS::JMatch3D::Dmax_m
private

Definition at line 133 of file JBillabong.cc.


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