00001 /****************************************************************************/ 00007 // Helper methods for Harmonoise-based noise emission computation 00008 /****************************************************************************/ 00009 // SUMO, Simulation of Urban MObility; see http://sumo.sourceforge.net/ 00010 // Copyright 2001-2010 DLR (http://www.dlr.de/) and contributors 00011 /****************************************************************************/ 00012 // 00013 // This program is free software; you can redistribute it and/or modify 00014 // it under the terms of the GNU General Public License as published by 00015 // the Free Software Foundation; either version 2 of the License, or 00016 // (at your option) any later version. 00017 // 00018 /****************************************************************************/ 00019 #ifndef HelpersHarmonoise_h 00020 #define HelpersHarmonoise_h 00021 00022 00023 // =========================================================================== 00024 // included modules 00025 // =========================================================================== 00026 #ifdef _MSC_VER 00027 #include <windows_config.h> 00028 #else 00029 #include <config.h> 00030 #endif 00031 00032 #include <vector> 00033 #include <cassert> 00034 #include "StdDefs.h" 00035 #include "SUMOVehicleClass.h" 00036 #include <limits> 00037 #include <cmath> 00038 00039 00040 // =========================================================================== 00041 // class definitions 00042 // =========================================================================== 00050 class HelpersHarmonoise { 00051 public: 00059 static SUMOReal computeNoise(SUMOEmissionClass c, double v, double a) throw(); 00060 00061 00067 inline static SUMOReal sum(SUMOReal val) throw() { 00068 return SUMOReal(10. * log10(val)); 00069 } 00070 00071 00072 private: 00075 00077 static double myR_A_C1_Parameter[27]; 00078 00080 static double myR_B_C1_Parameter[27]; 00081 00083 static double myR_A_C3_Parameter[27]; 00084 00086 static double myR_B_C3_Parameter[27]; 00087 00089 static double myT_A_C1_Parameter[27]; 00090 00092 static double myT_B_C1_Parameter[27]; 00093 00095 static double myT_A_C3_Parameter[27]; 00096 00098 static double myT_B_C3_Parameter[27]; 00100 00101 00103 static double myAOctaveBandCorrection[27]; 00104 00105 00106 }; 00107 00108 00109 #endif 00110 00111 /****************************************************************************/ 00112
1.5.6