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

ART:added explicit type conversions to suppress warnings

parent 521c15e3
......@@ -107,9 +107,9 @@ namespace ITAPropagationPathSim
public:
inline const std::vector<double>& ThetaDeg() const { return m_vdThetaDeg; };
inline const std::vector<double>& PhiDeg() const { return m_vdPhiDeg; };
inline int NTheta() const { return m_vdThetaDeg.size(); };
inline int NPhi() const { return m_vdPhiDeg.size(); };
inline int NRays() const { return m_vpRays.size(); };
inline int NTheta() const { return (int)m_vdThetaDeg.size(); };
inline int NPhi() const { return (int)m_vdPhiDeg.size(); };
inline int NRays() const { return (int)m_vpRays.size(); };
inline const VistaVector3D& SourcePosition() const { return m_v3SourcePos; };
inline const std::set<std::shared_ptr<CRay>>& UniqueRays() const { return m_vpUniqueRays; };
inline const std::shared_ptr<CRay> At(int idxTheta, int idxPhi) const { return m_vvpRayMatrix[idxTheta][idxPhi]; };
......
......@@ -81,7 +81,7 @@ namespace ITAPropagationPathSim
inline const std::vector<int>& ReflectionIndices() const { return m_viReflectionIndices; };
inline int NumPoints() const { return size(); };
inline int NumPoints() const { return (int)size(); };
inline const VistaVector3D& SourcePoint() const { return front().position; };
inline const VistaVector3D& InitialDirection() const { return front().wavefrontNormal; };
......@@ -89,7 +89,7 @@ namespace ITAPropagationPathSim
inline const VistaVector3D& LastWavefrontNormal() const { return back().wavefrontNormal; };
inline const double& LastTimeStamp() const { return back().timeStamp; };
inline int ReflectionOrder() const { return m_viReflectionIndices.size(); };
inline int ReflectionOrder() const { return (int)m_viReflectionIndices.size(); };
//! Returns the reflection order of the ray element with given index
//int ReflectionOrder(const int idx) const;
......
......@@ -114,7 +114,7 @@ std::vector<CRayGrid> EigenraySearch::CInitialWorker::Run(const ITAGeo::CStratif
FindMinimumDistanceRays(rayGrid.UniqueRays());
return FinalizeResult(rayGrid);
}
CRayGrid EigenraySearch::CInitialWorker::InitRayGrid(const ITAGeo::CStratifiedAtmosphere& atmosphere)
CRayGrid EigenraySearch::CInitialWorker::InitRayGrid(const ITAGeo::CStratifiedAtmosphere&)
{
return CEquiangularRayDistribution(m_v3SourcePosition, 7, 10);
//TODO: Set limits for additional directions according to atmosphere if possible
......@@ -159,8 +159,8 @@ EigenraySearch::CAdaptiveWorker::CAdaptiveWorker(const CRayGrid& rayGrid, const
m_adaptiveRayGrid(rayGrid), m_iActiveReflexionOrder(activeReflectionOrder), m_rayAdaptationSettings(eigenraySettings.rayAdaptation)
{
const float sourceReceiverDistance = (VirtualReceiverPosition() - rayGrid.SourcePosition()).GetLength();
m_fReceiverRadius = tan(m_rayAdaptationSettings.accuracy.maxSourceReceiverAngle * M_PI/180.0) * sourceReceiverDistance;
m_fReceiverRadius = fmin(m_rayAdaptationSettings.accuracy.maxReceiverRadius, m_fReceiverRadius);
m_fReceiverRadius = (float)tan(m_rayAdaptationSettings.accuracy.maxSourceReceiverAngle * M_PI/180.0) * sourceReceiverDistance;
m_fReceiverRadius = fmin( (float)m_rayAdaptationSettings.accuracy.maxReceiverRadius, m_fReceiverRadius );
ReceiverDataVector receiverData = { CReceiverData(VirtualReceiverPosition(), m_iActiveReflexionOrder) };
m_pSimulationWatcher = std::make_shared<CEigenraySearchWatcher>(receiverData, m_rayTracingAbortSettings.maxTime, m_rayTracingAbortSettings.bAbortOnReceiverDistIncrease);
......
......@@ -312,7 +312,7 @@ int CRayGrid::GetIndex(const std::shared_ptr<CRay> pRay) const
if (it == m_vpRays.cend())
return -1;
return std::distance(m_vpRays.cbegin(), it);
return (int)std::distance(m_vpRays.cbegin(), it);
}
int CRayGrid::IndexToThetaIndex(const int idx) const
{
......
......@@ -42,7 +42,7 @@ class CWorker
ITA_EXCEPT_INVALID_PARAMETER("Both points are already at same altitude.");
const double portion = -r1[Vista::Z] / dr[Vista::Z];
rReflection = r1 + dr * portion;
rReflection = r1 + dr * (float)portion;
dtReflection = dt * portion;
};
inline void ExtendRayByOnePeriod()
......
......@@ -70,7 +70,7 @@ void Simulation::CAdaptiveSolver::AdaptiveIntegrationStep(const VistaVector3D& r
double Simulation::CAdaptiveSolver::EstimateIntegrationError(const double& rz1, const double& rz2, const VistaVector3D& n2, const ITAGeo::CStratifiedAtmosphere& atmosphere) const
{
const VistaVector3D windVectorError = atmosphere.WindVector(rz2) - atmosphere.WindVector(rz1) - atmosphere.WindVectorGradient(rz1) * (rz2 - rz1);
const VistaVector3D windVectorError = atmosphere.WindVector(rz2) - atmosphere.WindVector(rz1) - atmosphere.WindVectorGradient(rz1) * (float)(rz2 - rz1);
const double error = windVectorError[Vista::X] * n2[Vista::X] + windVectorError[Vista::Y] * n2[Vista::Y]; //Same as .Dot since z-component is zero
return std::abs(error);
}
......
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