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

Utility class for emitter power and frequency. More...

#include <JAcousticsSupportkit.hh>

Public Member Functions

 JWaveform ()
 Default constructor.
 
 JWaveform (const double Q0, const double f_kHz)
 Constructor.
 
double getQ (const double D_m, const double d_m) const
 Get quality at given distance.
 

Static Public Member Functions

static double getDmin ()
 Get minimal distance.
 

Public Attributes

double Q0
 
double f_kHz
 

Friends

std::istream & operator>> (std::istream &in, JWaveform &waveform)
 Read waveform from input stream.
 
std::ostream & operator<< (std::ostream &out, const JWaveform &waveform)
 Write waveform to output stream.
 

Detailed Description

Utility class for emitter power and frequency.

Definition at line 103 of file JAcousticsSupportkit.hh.

Constructor & Destructor Documentation

◆ JWaveform() [1/2]

JACOUSTICS::JWaveform::JWaveform ( )
inline

Default constructor.

Definition at line 107 of file JAcousticsSupportkit.hh.

107 :
108 Q0 (0.0),
109 f_kHz(0.0)
110 {}

◆ JWaveform() [2/2]

JACOUSTICS::JWaveform::JWaveform ( const double Q0,
const double f_kHz )
inline

Constructor.

Note that the power corresponds to the minimal distance (see method JWaveform::getDmin()).

Parameters
Q0power [quality]
f_kHzfrequency [kHz]

Definition at line 121 of file JAcousticsSupportkit.hh.

122 :
123 Q0 (Q0),
124 f_kHz(f_kHz)
125 {}

Member Function Documentation

◆ getDmin()

static double JACOUSTICS::JWaveform::getDmin ( )
inlinestatic

Get minimal distance.

Returns
distance [m]

Definition at line 133 of file JAcousticsSupportkit.hh.

134 {
135 return 1.0;
136 }

◆ getQ()

double JACOUSTICS::JWaveform::getQ ( const double D_m,
const double d_m ) const
inline

Get quality at given distance.

Parameters
D_mdepth [m]
d_mdistance [m]
Returns
quality

Definition at line 146 of file JAcousticsSupportkit.hh.

148 {
149 if (d_m > getDmin())
150 return Q0 * JPP::getQ(D_m, this->f_kHz, d_m) / JPP::getQ(D_m, this->f_kHz, getDmin());
151 else
152 return Q0;
153 }
double getQ(const double D_m, const double f_kHz, const double d_m)
Get relative quality for given frequency at given distance.
static double getDmin()
Get minimal distance.

Friends And Related Symbol Documentation

◆ operator>>

std::istream & operator>> ( std::istream & in,
JWaveform & waveform )
friend

Read waveform from input stream.

Parameters
ininput stream
waveformwaveform
Returns
input stream

Definition at line 163 of file JAcousticsSupportkit.hh.

164 {
165 return in >> waveform.Q0 >> waveform.f_kHz;
166 }

◆ operator<<

std::ostream & operator<< ( std::ostream & out,
const JWaveform & waveform )
friend

Write waveform to output stream.

Parameters
outoutput stream
waveformwaveform
Returns
output stream

Definition at line 176 of file JAcousticsSupportkit.hh.

177 {
178 return out << waveform.Q0 << ' ' << waveform.f_kHz;
179 }

Member Data Documentation

◆ Q0

double JACOUSTICS::JWaveform::Q0

Definition at line 181 of file JAcousticsSupportkit.hh.

◆ f_kHz

double JACOUSTICS::JWaveform::f_kHz

Definition at line 182 of file JAcousticsSupportkit.hh.


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