Commit d56670a8 authored by Armin Erraji's avatar Armin Erraji

Changed speed of sound value 344.0f to ITAConstants::SPEED_OF_SOUND_F.

parent 8eb40b23
......@@ -47,7 +47,7 @@
using namespace std;
using namespace ITAPropagationModels;
float g_fSpeedOfSound = 344.0f;
float g_fSpeedOfSound = ITAConstants::SPEED_OF_SOUND_F;
float g_fSampleRate = 44.1e3;
int g_iFilterLength = 64;
......
......@@ -132,7 +132,7 @@ namespace ITAPropagationModels
const double m_dHumidity = 80.0;
const double m_dTemperature = 20.0;
const float m_fSpeedOfSound = 344.0f;
const float m_fSpeedOfSound = ITAConstants::SPEED_OF_SOUND_F;
static struct m_DefaultDiffractionModel //!< Default values for diffractions
......
......@@ -49,7 +49,7 @@ namespace ITAPropagationModels
*
* @sa GetMinimumWavefrontDelayTime, GetMaximumWavefrontDelayTime
*/
ITA_PROPAGATION_MODELS_API bool CalculateDiffractionIR( const VistaVector3D& v3SourcePos, const VistaVector3D& v3TargetPos, std::shared_ptr< const ITAGeo::CITADiffractionWedgeAperture > pApex, ITABase::CFiniteImpulseResponse& oEffectiveDiffractionIR, const float fSpeedOfSound = 344.0f );
ITA_PROPAGATION_MODELS_API bool CalculateDiffractionIR( const VistaVector3D& v3SourcePos, const VistaVector3D& v3TargetPos, std::shared_ptr< const ITAGeo::CITADiffractionWedgeAperture > pApex, ITABase::CFiniteImpulseResponse& oEffectiveDiffractionIR, const float fSpeedOfSound = ITAConstants::SPEED_OF_SOUND_F );
}
}
......
......@@ -78,7 +78,7 @@ namespace ITAPropagationModels
* @param[in] iMethod Approximation algorithm
* @param[in] fSpeedOfSound Sound speed
*/
ITA_PROPAGATION_MODELS_API void CalculateDiffractionFilter( const VistaVector3D& v3SourcePos, const VistaVector3D& v3TargetPos, std::shared_ptr< const ITAGeo::CITADiffractionWedgeAperture > pApex, ITABase::CHDFTSpectrum& oTF, const int iMethod = UTD_APPROX_KAWAI_KOUYOUMJIAN, const float fSpeedOfSound = 344.0f );
ITA_PROPAGATION_MODELS_API void CalculateDiffractionFilter( const VistaVector3D& v3SourcePos, const VistaVector3D& v3TargetPos, std::shared_ptr< const ITAGeo::CITADiffractionWedgeAperture > pApex, ITABase::CHDFTSpectrum& oTF, const int iMethod = UTD_APPROX_KAWAI_KOUYOUMJIAN, const float fSpeedOfSound = ITAConstants::SPEED_OF_SOUND_F );
}
}
......
......@@ -24,7 +24,7 @@ float SvenssonHelperBeta( const float nu, const float theta_s, const float theta
//! Plus-minus variant for beta values in geometrical functions
float SvenssonHelperBetaEval( const float nu, const float alpha, const float gamma, const float fPMVariant );
bool Svensson::CalculateDiffractionIR( const VistaVector3D& v3SourcePos, const VistaVector3D& v3TargetPos, std::shared_ptr< const ITAGeo::CITADiffractionWedgeAperture > pApex, ITABase::CFiniteImpulseResponse& oEffectiveDiffractionIR, const float fSpeedOfSound /* = 344.0f */ )
bool Svensson::CalculateDiffractionIR( const VistaVector3D& v3SourcePos, const VistaVector3D& v3TargetPos, std::shared_ptr< const ITAGeo::CITADiffractionWedgeAperture > pApex, ITABase::CFiniteImpulseResponse& oEffectiveDiffractionIR, const float fSpeedOfSound /* = ITAConstants::SPEED_OF_SOUND_F */ )
{
if( fSpeedOfSound <= 0.0f )
ITA_EXCEPT_INVALID_PARAMETER( "Speed of sound must be greate zero" );
......
......@@ -30,7 +30,7 @@ float UTDHelperFunction_a_plus( const float fBeta, const float n );
float UTDHelperFunction_a_minus( const float fBeta, const float n );
void UTD::CalculateDiffractionFilter( const VistaVector3D& v3SourcePos, const VistaVector3D& v3TargetPos, std::shared_ptr< const ITAGeo::CITADiffractionWedgeAperture > pApex, ITABase::CHDFTSpectrum& oTF, const int iMethod /* = UTD_APPROX_KAWAI_KOUYOUMJIAN */, const float fSpeedOfSound /* = 344.0f */ )
void UTD::CalculateDiffractionFilter( const VistaVector3D& v3SourcePos, const VistaVector3D& v3TargetPos, std::shared_ptr< const ITAGeo::CITADiffractionWedgeAperture > pApex, ITABase::CHDFTSpectrum& oTF, const int iMethod /* = UTD_APPROX_KAWAI_KOUYOUMJIAN */, const float fSpeedOfSound /* = ITAConstants::SPEED_OF_SOUND_F */ )
{
std::complex< float > cfCoeff;
oTF.SetCoeffRI( 0, 1.0f, 0.0f ); // DC
......
......@@ -37,7 +37,7 @@ using namespace ITAGeo;
using namespace ITAPropagationModels;
static const float g_fSampleRate = 44.1e3f;
static const float g_fSpeedOfSound = 344.0f;
static const float g_fSpeedOfSound = ITAConstants::SPEED_OF_SOUND_F;
//! Tests running the Svensson model functions
/**
......
......@@ -36,7 +36,7 @@ using namespace ITAPropagationModels;
static const float g_fSampleRate = 44.1e3f;
static const int g_iFilterLength = 128;
static const float g_fSpeedOfSound = 344.0f;
static const float g_fSpeedOfSound = ITAConstants::SPEED_OF_SOUND_F;
//! Tests running the UTD model functions
/**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment