Fixing propagation path type keyword, implementing DAFF content IR directivity...

Fixing propagation path type keyword, implementing DAFF content IR directivity interface (WIP) and removing an exception when exporting propagation path visualization in SketchUp, now continuing when two interaction points are equal
parent 0113e0a5
......@@ -353,7 +353,7 @@ namespace ITAGeo
static inline std::string GetTypeStr()
{
return "PropagationPath";
return "propagation_path";
};
//! Calculates the propagation path lenghts
......
......@@ -31,7 +31,17 @@ ITAGeo::Directivity::CDAFF_ImpulseResponse::~CDAFF_ImpulseResponse()
void ITAGeo::Directivity::CDAFF_ImpulseResponse::GetNearestNeighbourImpulseResponse( const ITAGeo::Coordinates::CSpherical& oDirection, ITABase::CFiniteImpulseResponse& oFIR, const int iChannelIndex ) const
{
ITA_EXCEPT_NOT_IMPLEMENTED;
auto p = dynamic_cast< DAFFContentIR* >( m_pDAFFReader->getContent() );
if( p->getSamplerate() != oFIR.GetSampleRate() )
ITA_EXCEPT_INVALID_PARAMETER( "DAFF impulse response and target finite impulse response filter have mismatching sampling ranges." );
if( p->getFilterLength() > oFIR.GetLength() )
ITA_EXCEPT_INVALID_PARAMETER( "DAFF impulse response is longer than target finite impulse response filter." );
int iRecordIndex = -1;
p->getNearestNeighbour( DAFF_VIEWS::DAFF_OBJECT_VIEW, oDirection.GetAzimuthDegree(), oDirection.GetElevationDegree(), iRecordIndex );
p->getFilterCoeffs( iRecordIndex, iChannelIndex, &oFIR[ 0 ] );
}
void ITAGeo::Directivity::CDAFF_ImpulseResponse::GetNearestNeighbourImpulseResponse( const ITAGeo::Coordinates::CSpherical& oDirection, ITABase::CMultichannelFiniteImpulseResponse& oFIR ) const
......
......@@ -425,7 +425,10 @@ bool CModel::Store( const std::string& sSKPFilePath, bool bOverwite/*=true*/ ) c
if( pSourceAnchor == pTargetAnchor )
ITA_EXCEPT_INVALID_PARAMETER( "A propagation path can not have the same anchors in a row." );
if( pSourceAnchor->v3InteractionPoint == pTargetAnchor->v3InteractionPoint )
ITA_EXCEPT_INVALID_PARAMETER( "Source and target anchor of propagation path have same interaction point." );
{
std::cout << "During SketchUp model export: source and target anchor of propagation path have same interaction point at " << pSourceAnchor->v3InteractionPoint << ", skipping this segment." << std::endl;
continue;
}
SUPoint3D v3SUStart = VistaVectorToSUPoint( pSourceAnchor->v3InteractionPoint );
SUPoint3D v3SUEnd = VistaVectorToSUPoint( pTargetAnchor->v3InteractionPoint );
......
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