Class Utils


  • public class Utils
    extends Object
    Some basic tools useful for the emission module
    Author:
    Nicolas Fortin, Université Gustave Eiffel, Pierre Aumond, Université Gustave Eiffel
    • Constructor Summary

      Constructors 
      Constructor Description
      Utils()  
    • Constructor Detail

      • Utils

        public Utils()
    • Method Detail

      • dbToW

        public static double dbToW​(double dB)
        Convert dB to W
        Parameters:
        dB -
        Returns:
        W (double)
      • wToDb

        public static double wToDb​(double w)
        Convert W to dB
        Parameters:
        w -
        Returns:
        dB (double)
      • computeSlope

        public static double computeSlope​(double beginZ,
                                          double endZ,
                                          double road_length_2d)
        Compute the slope between to z points (for a road or rail segment)
        Parameters:
        beginZ - Z start
        endZ - Z end
        road_length_2d - Road length (projected to Z axis)
        Returns:
        Slope percentage
      • Vperhour2NoiseLevel

        public static Double Vperhour2NoiseLevel​(double LWim,
                                                 double Qm,
                                                 double vm)
                                          throws IOException
        Compute Noise Level from flow_rate and speed Eq 2.2.1 from Directive 2015
        Parameters:
        LWim - LW,i,m is the directional sound power of a single vehicle and is expressed in dB (re. 10–12 W/m).
        Qm - Traffic flow data Qm shall be expressed as yearly average per hour, per time period (day-evening-night), per vehicle class and per source line.
        vm - The speed vm is a representative speed per vehicle category: in most cases the lower of the maximum legal speed for the section of road and the maximum legal speed for the vehicle category. If measurement data is unavailable, the maximum legal speed for the vehicle category shall be used.
        Returns:
        emission sound level in dB/m
        Throws:
        IOException - if speed < 0 km/h
      • Vperhour2NoiseLevelAllFreq

        public static double[] Vperhour2NoiseLevelAllFreq​(double[] LWimf,
                                                          double Qm,
                                                          double vm)
                                                   throws IOException
        Compute Noise Level from flow_rate and speed Eq 2.2.1 from Directive 2015
        Parameters:
        LWimf - LW,i,m is the directional sound power of a single vehicle and is expressed in dB (re. 10–12 W/m) and for every freq
        Qm - Traffic flow data Qm shall be expressed as yearly average per hour, per time period (day-evening-night), per vehicle class and per source line.
        vm - The speed vm is a representative speed per vehicle category: in most cases the lower of the maximum legal speed for the section of road and the maximum legal speed for the vehicle category. If measurement data is unavailable, the maximum legal speed for the vehicle category shall be used.
        Returns:
        emission sound level in dB/m
        Throws:
        IOException - if speed < 0 km/h
      • sumDbArray

        public static double[] sumDbArray​(double[] array1,
                                          double[] array2)
        Energetic sum of dBA array
        Parameters:
        array1 -
        array2 -
        Returns:
        energetic sum of dBA array
      • dbaToW

        public static double dbaToW​(double dBA)
        Convert dB to W Equivalent to dbToW
        Parameters:
        dBA -
        Returns:
      • dbaToW

        public static double[] dbaToW​(double[] dBA)
        Convert an array of dB values to W
        Parameters:
        dBA - array of dB values
        Returns:
        array of W values
      • wToDba

        public static double wToDba​(double w)
        Convert W to dB Equivalent to wToDb
        Parameters:
        w -
        Returns:
      • wToDba

        public static double[] wToDba​(double[] w)
        Convert an array of W values to dB
        Parameters:
        w - array of w values
        Returns:
        array of dB values
      • sumDbValues

        public static Double sumDbValues​(Double dB1,
                                         Double dB2)
        Energetic sum of 2 dB values
        Parameters:
        dB1 - First value in dB
        dB2 - Second value in dB
        Returns:
      • sumDb5

        public static Double sumDb5​(Double dB1,
                                    Double dB2,
                                    Double dB3,
                                    Double dB4,
                                    Double dB5)
        Energetic sum of 5 dB values
        Parameters:
        dB1 - value in dB
        dB2 - value in dB
        dB3 - value in dB
        dB4 - value in dB
        dB5 - value in dB
        Returns:
      • trainLWmperFreq

        public static double[] trainLWmperFreq​(double[] LWi,
                                               double nBUnit,
                                               double deltaT)
                                        throws IOException
        trainpWperFreq
        Throws:
        IOException