/****************************************************************************/1// Eclipse SUMO, Simulation of Urban MObility; see https://eclipse.dev/sumo2// Copyright (C) 2001-2025 German Aerospace Center (DLR) and others.3// This program and the accompanying materials are made available under the4// terms of the Eclipse Public License 2.0 which is available at5// https://www.eclipse.org/legal/epl-2.0/6// This Source Code may also be made available under the following Secondary7// Licenses when the conditions for such availability set forth in the Eclipse8// Public License 2.0 are satisfied: GNU General Public License, version 29// or later which is available at10// https://www.gnu.org/licenses/old-licenses/gpl-2.0-standalone.html11// SPDX-License-Identifier: EPL-2.0 OR GPL-2.0-or-later12/****************************************************************************/13/// @file HelpersHarmonoise.h14/// @author Daniel Krajzewicz15/// @author Michael Behrisch16/// @date Mon, 10.05.200417///18// Helper methods for Harmonoise-based noise emission computation19/****************************************************************************/20#pragma once21#include <config.h>2223#include <vector>24#include <limits>25#include <cmath>26#include <utils/common/StdDefs.h>27#include <utils/common/SUMOVehicleClass.h>282930// ===========================================================================31// class definitions32// ===========================================================================33/**34* @class HelpersHarmonoise35* @brief Helper methods for Harmonoise-based noise emission computation36*37* The stored values compute the recepted noise of either passenger or heavy38* duty vehicles for a distance of 10m from the noise source.39*/40class HelpersHarmonoise {41public:42/** @brief Returns the noise produced by the a vehicle of the given type at the given speed43*44* @param[in] c The vehicle emission class45* @param[in] v The vehicle's current velocity46* @param[in] a The vehicle's current acceleration47* @return The noise produced by the vehicle of the given class running with v and a48*/49static double computeNoise(SUMOEmissionClass c, double v, double a);505152/** @brief Computes the resulting noise53*54* @param[in] val The sum of converted vehicle noises ( pow(10., (<NOISE>/10.)) )55* @return The resulting sum56*/57inline static double sum(double val) {58return double(10. * log10(val));59}606162private:63/// @name vehicle class noise emission coefficients64/// @{6566/// @brief rolling component, light vehicles, alpha67static double myR_A_C1_Parameter[27];6869/// @brief rolling component, light vehicles, beta70static double myR_B_C1_Parameter[27];7172/// @brief rolling component, heavy vehicles, alpha73static double myR_A_C3_Parameter[27];7475/// @brief rolling component, heavy vehicles, beta76static double myR_B_C3_Parameter[27];7778/// @brief traction component, light vehicles, alpha79static double myT_A_C1_Parameter[27];8081/// @brief traction component, light vehicles, beta82static double myT_B_C1_Parameter[27];8384/// @brief traction component, heavy vehicles, alpha85static double myT_A_C3_Parameter[27];8687/// @brief traction component, heavy vehicles, beta88static double myT_B_C3_Parameter[27];89/// @}9091/// @brief A-weighted correction for octave bands92static const double myAOctaveBandCorrection[27];9394/// @brief A-weighted correction for surface95static const double mySurfaceCorrection[27];96};979899