NMPB08 Shared Libraries
SousCalculs/Diffraction.h
Go to the documentation of this file.
00001 
00008 #ifndef DIFFRACTION_H
00009 #define DIFFRACTION_H
00010 
00011 #include "GroundEffect.h"
00012 #include "Embankment.h"
00013 
00014 #ifndef _WIN32
00015 #define  Diffraction   _Local_PROPAN8_Diffraction_
00016 #endif
00017 
00018 using namespace GroundEffectNMPB;
00019 using namespace EmbankmentNMPB;
00020 
00021 namespace DiffractionNMPB
00022 {
00031         class Diffraction
00032     {
00033     public:
00034 
00038                 Diffraction()
00039                 {
00040                         _freq = 0;
00041                         _wavelength = 0;
00042                         ClearData();
00043                 }
00044 
00060                 Diffraction(vector<ProfilePointNMPB*> terrainItems, double freq, int freqPos, bool withEmbankment);
00061 
00078                 Diffraction(vector<ProfilePointNMPB*> terrainItems, double freq, int freqPos, int nbSideDiffractions);
00079 
00087                 void ReflectionAttenuation(vector<ProfilePointNMPB*> &terrainItems, int freqPos);
00088 
00098                 void CalculAttenuationDiffraction (bool withCh = true);
00099 
00119                 double CalculDiffractionPure (Position2D const* source2D, 
00120                                                   Position2D const* receiver2D, 
00121                                                                           vector<ProfilePointNMPB*> terrainItems, 
00122                                                                           bool favourableConditions, 
00123                                                                           bool totalPath, 
00124                                                                           bool withCh);
00125                 
00139                 double CalculDiffractionPure (Position2D const* source2D, 
00140                                                   Position2D const* receiver2D, 
00141                                                                           ProfilePointNMPB* reflectionItem);
00142 
00148                 double Get_pathDifferenceSR_h()
00149                 {
00150                         return _pathDifferenceSR_h;
00151                 }
00152 
00158                 double Get_pathDifferenceSR_f()
00159                 {
00160                         return _pathDifferenceSR_f;
00161                 }
00162 
00168                 double Get_diffractionAttenuation_h()
00169                 {
00170                         return _Adif_h;
00171                 }
00172 
00178                 double Get_diffractionAttenuation_f()
00179                 {
00180                         return _Adif_f;
00181                 }
00182 
00188                 double Get_DeltaDifSR_h()
00189                 {
00190                         return _DeltaDifSR_h;
00191                 }
00192 
00198                 double Get_DeltaDifSR_f()
00199                 {
00200                         return _DeltaDifSR_f;
00201                 }
00202 
00208                 double Get_DeltaSolSO_h()
00209                 {
00210                         return _DeltaSolSO_h;
00211                 }
00212 
00218                 double Get_DeltaSolSO_f()
00219                 {
00220                         return _DeltaSolSO_f;
00221                 }
00222 
00228                 double Get_DeltaSolOR_h()
00229                 {
00230                         return _DeltaSolOR_h;
00231                 }
00232 
00238                 double Get_DeltaSolOR_f()
00239                 {
00240                         return _DeltaSolOR_f;
00241                 }
00242 
00248                 double Get_DeltaTalusSO_h()
00249                 {
00250                         return _DeltaTalusSO_h;
00251                 }
00252 
00258                 double Get_DeltaTalusSO_f()
00259                 {
00260                         return _DeltaTalusSO_f;
00261                 }
00262 
00268                 double Get_AttsolSO_h()
00269                 {
00270                         return _aSolSO_h;
00271                 }
00272 
00278                 double Get_AttsolSO_f()
00279                 {
00280                         return _aSolSO_f;
00281                 }
00282 
00288                 double Get_absorptionAttenuation()
00289                 {
00290                         return _absorptionAttenuation;
00291                 }
00292 
00293         protected:
00297                 ProfilePointNMPB* _source; 
00301                 ProfilePointNMPB* _receiver; 
00305                 vector<ProfilePointNMPB*> _terrainItems;
00309                 double _freq;   
00310 
00314                 ProfilePointNMPB* _firstScreen;
00318                 ProfilePointNMPB* _lastScreen;
00319 
00323                 MeanPlane _meanPlaneSO;
00327                 MeanPlane _meanPlaneOR;
00328 
00332                 double _wavelength; 
00336                 double _totalDiffDist;
00340                 double _h0;
00341 
00345                 double _pathDifferenceSR_h;
00349                 double _pathDifferenceSR_f;
00353                 double _Adif_h;
00357                 double _Adif_f;
00361                 double _DeltaDifSR_h;
00365                 double _DeltaDifSR_f; 
00369                 double _DeltaSolSO_h;
00373                 double _DeltaSolSO_f;
00377                 double _AttTalusSO;
00381                 Position2D _embankmentSourceImage;
00385                 double _DeltaTalusSO_h;
00389                 double _DeltaTalusSO_f;
00393                 double _DeltaSolOR_h;
00397                 double _DeltaSolOR_f;
00401                 double _aSolSO_h;
00405                 double _aSolSO_f;
00406 
00410                 double _absorptionAttenuation;
00411                 
00425                 double SoundAbsorption(ProfilePointNMPB* pointNMBP, int posRef, int freqPos);
00426 
00433                 void MeanPlanesDataCalculation(bool withEmbankment);
00434 
00446                 double CalculDeltaSol(double aSol, double deltaDif1, double deltaDif2);
00447 
00451                 void ClearData()
00452                 {
00453                         _pathDifferenceSR_h = 0;
00454                         _pathDifferenceSR_f = 0;
00455                         _Adif_h = 0;
00456                         _Adif_f = 0;
00457                         _DeltaDifSR_h = 0;
00458                         _DeltaDifSR_f = 0;
00459                         _DeltaSolSO_h = 0;
00460                         _DeltaSolSO_f = 0;
00461                         _DeltaSolOR_h = 0;
00462                         _DeltaSolOR_f = 0;
00463                         _aSolSO_h = 0;
00464                         _aSolSO_f = 0;
00465                         _absorptionAttenuation = 0;
00466                         _totalDiffDist = 0;
00467                         _DeltaTalusSO_h = 0 ;
00468                         _DeltaTalusSO_f = 0 ;
00469                 }
00470 
00471         };
00472 }
00473 
00474 #endif
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines