1 /****************************************************************************/ 2 // Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.org/sumo 3 // Copyright (C) 2001-2019 German Aerospace Center (DLR) and others. 4 // This program and the accompanying materials 5 // are made available under the terms of the Eclipse Public License v2.0 6 // which accompanies this distribution, and is available at 7 // http://www.eclipse.org/legal/epl-v20.html 8 // SPDX-License-Identifier: EPL-2.0 9 /****************************************************************************/ 10 /// @file HelpersHarmonoise.h 11 /// @author Daniel Krajzewicz 12 /// @author Michael Behrisch 13 /// @date Mon, 10.05.2004 14 /// @version $Id$ 15 /// 16 // Helper methods for Harmonoise-based noise emission computation 17 /****************************************************************************/ 18 #ifndef HelpersHarmonoise_h 19 #define HelpersHarmonoise_h 20 21 22 // =========================================================================== 23 // included modules 24 // =========================================================================== 25 #include <config.h> 26 27 #include <vector> 28 #include <limits> 29 #include <cmath> 30 #include <utils/common/StdDefs.h> 31 #include <utils/common/SUMOVehicleClass.h> 32 33 34 // =========================================================================== 35 // class definitions 36 // =========================================================================== 37 /** 38 * @class HelpersHarmonoise 39 * @brief Helper methods for Harmonoise-based noise emission computation 40 * 41 * The stored values compute the recepted noise of either passenger or heavy 42 * duty vehicles for a distance of 10m from the noise source. 43 */ 44 class HelpersHarmonoise { 45 public: 46 /** @brief Returns the noise produced by the a vehicle of the given type at the given speed 47 * 48 * @param[in] c The vehicle emission class 49 * @param[in] v The vehicle's current velocity 50 * @param[in] a The vehicle's current acceleration 51 * @return The noise produced by the vehicle of the given class running with v and a 52 */ 53 static double computeNoise(SUMOEmissionClass c, double v, double a); 54 55 56 /** @brief Computes the resulting noise 57 * 58 * @param[in] val The sum of converted vehicle noises ( pow(10., (<NOISE>/10.)) ) 59 * @return The resulting sum 60 */ sum(double val)61 inline static double sum(double val) { 62 return double(10. * log10(val)); 63 } 64 65 66 private: 67 /// @name vehicle class noise emission coefficients 68 /// @{ 69 70 /// @brief rolling component, light vehicles, alpha 71 static double myR_A_C1_Parameter[27]; 72 73 /// @brief rolling component, light vehicles, beta 74 static double myR_B_C1_Parameter[27]; 75 76 /// @brief rolling component, heavy vehicles, alpha 77 static double myR_A_C3_Parameter[27]; 78 79 /// @brief rolling component, heavy vehicles, beta 80 static double myR_B_C3_Parameter[27]; 81 82 /// @brief traction component, light vehicles, alpha 83 static double myT_A_C1_Parameter[27]; 84 85 /// @brief traction component, light vehicles, beta 86 static double myT_B_C1_Parameter[27]; 87 88 /// @brief traction component, heavy vehicles, alpha 89 static double myT_A_C3_Parameter[27]; 90 91 /// @brief traction component, heavy vehicles, beta 92 static double myT_B_C3_Parameter[27]; 93 /// @} 94 95 96 /// @brief A-weighted correction for octave bands 97 static double myAOctaveBandCorrection[27]; 98 99 100 }; 101 102 103 #endif 104 105 /****************************************************************************/ 106 107