Class Utils
- java.lang.Object
-
- org.noise_planet.noisemodelling.emission.utils.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()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static double
computeSlope(double beginZ, double endZ, double road_length_2d)
Compute the slope between to z points (for a road or rail segment)static double
dbaToW(double dBA)
Convert dB to W Equivalent to dbToWstatic double[]
dbaToW(double[] dBA)
Convert an array of dB values to Wstatic double
dbToW(double dB)
Convert dB to Wstatic Double
sumDb5(Double dB1, Double dB2, Double dB3, Double dB4, Double dB5)
Energetic sum of 5 dB valuesstatic double[]
sumDbArray(double[] array1, double[] array2)
Energetic sum of dBA arraystatic Double
sumDbValues(Double dB1, Double dB2)
Energetic sum of 2 dB valuesstatic double[]
trainLWmperFreq(double[] LWi, double nBUnit, double deltaT)
trainpWperFreqstatic Double
Vperhour2NoiseLevel(double LWim, double Qm, double vm)
Compute Noise Level from flow_rate and speed Eq 2.2.1 from Directive 2015static double[]
Vperhour2NoiseLevelAllFreq(double[] LWimf, double Qm, double vm)
Compute Noise Level from flow_rate and speed Eq 2.2.1 from Directive 2015static double
wToDb(double w)
Convert W to dBstatic double
wToDba(double w)
Convert W to dB Equivalent to wToDbstatic double[]
wToDba(double[] w)
Convert an array of W values to dB
-
-
-
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 startendZ
- Z endroad_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 freqQm
- 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 dBdB2
- 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 dBdB2
- value in dBdB3
- value in dBdB4
- value in dBdB5
- value in dB- Returns:
-
trainLWmperFreq
public static double[] trainLWmperFreq(double[] LWi, double nBUnit, double deltaT) throws IOException
trainpWperFreq- Throws:
IOException
-
-