Commit cb09057f authored by Philipp Schäfer's avatar Philipp Schäfer
Browse files

ART - EigenrayEngine

- calculation of spreading loss now also includes wind vector and wavefront normal in accordance to Blockhintzev invariant
parent 76cd2254
......@@ -232,10 +232,12 @@ void EigenraySearch::CAdaptiveWorker::SetEigenrayEndPoint()
}
void EigenraySearch::CAdaptiveWorker::CalculateEigenraySpreadingLoss(const ITAGeo::CStratifiedAtmosphere& atmosphere)
{
const double zRef = std::abs(m_pMinDistanceRay->SourcePoint()[Vista::Z]);
const VistaVector3D& nRef = m_pMinDistanceRay->InitialDirection();
const double& time = m_pMinDistanceRay->back().timeStamp;
const double zReceiver = std::abs( m_pMinDistanceRay->back().position[Vista::Z] );
const double zRef = std::abs( m_pMinDistanceRay->SourcePoint()[Vista::Z] );
const VistaVector3D& nReceiver = m_pMinDistanceRay->back().wavefrontNormal;
if (m_adaptiveRayGrid.MaxAngularResolution() > m_rayAdaptationSettings.accuracy.maxAngleForGeomSpreading || !m_adaptiveRayGrid.Is2D())
{
......@@ -248,10 +250,22 @@ void EigenraySearch::CAdaptiveWorker::CalculateEigenraySpreadingLoss(const ITAGe
m_adaptiveRayGrid.SetToSurroundingGrid(m_pMinDistanceRay);
const double surfaceReceiver = m_adaptiveRayGrid.WavefrontSurface(time);
const double surfaceRef = m_adaptiveRayGrid.WavefrontSurfaceReference();
const double cReceiver = atmosphere.SpeedOfSound(zReceiver);
const VistaVector3D vReceiver = atmosphere.WindVector(zReceiver);
const double dEnergyProportionReceiver = CalculateEnergyProportion(surfaceReceiver, cReceiver, nReceiver, vReceiver);
const double surfaceRef = m_adaptiveRayGrid.WavefrontSurfaceReference();
const double cRef = atmosphere.SpeedOfSound(zRef);
const VistaVector3D vRef = atmosphere.WindVector(zRef);
const double dEnergyProportionRef = CalculateEnergyProportion(surfaceRef, cRef, nRef, vRef);
m_pMinDistanceRay->SetSpreadingLoss( std::sqrt(surfaceRef/surfaceReceiver * cReceiver/cRef) );
m_pMinDistanceRay->SetSpreadingLoss( std::sqrt(dEnergyProportionReceiver / dEnergyProportionRef) );
}
double EigenraySearch::CAdaptiveWorker::CalculateEnergyProportion(const double& A, const double& c, const VistaVector3D& vecN, const VistaVector3D& vecV)
{
const double dRelVToC = (double)(vecN * vecV) / c;
const double vSquared = vecV.GetLengthSquared();
const double dDenominator = A * (1 + dRelVToC) * std::sqrt( 1 + 2*dRelVToC + vSquared/(c*c) );
return c / dDenominator;
}
#pragma endregion
\ No newline at end of file
......@@ -145,6 +145,7 @@ namespace ITAPropagationPathSim
void PostProcessEigenray(const ITAGeo::CStratifiedAtmosphere& atmosphere);
void SetEigenrayEndPoint();
void CalculateEigenraySpreadingLoss(const ITAGeo::CStratifiedAtmosphere& atmosphere);
double CalculateEnergyProportion(const double& A, const double& c, const VistaVector3D& vecN, const VistaVector3D& vecV);
};
}
}
......
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