diff --git a/noisemodelling-emission/src/main/java/org/noise_planet/noisemodelling/emission/road/cnossos/RoadCnossosParameters.java b/noisemodelling-emission/src/main/java/org/noise_planet/noisemodelling/emission/road/cnossos/RoadCnossosParameters.java index 72de0b8ba..4ffcbfc6b 100644 --- a/noisemodelling-emission/src/main/java/org/noise_planet/noisemodelling/emission/road/cnossos/RoadCnossosParameters.java +++ b/noisemodelling-emission/src/main/java/org/noise_planet/noisemodelling/emission/road/cnossos/RoadCnossosParameters.java @@ -34,7 +34,7 @@ public class RoadCnossosParameters { private double qStudRatio; // Average ratio of the total volume of light vehicles per hour equipped with studded tyres during the period Ts_stud (in months) - private double Junc_dist; // Distance to junction + private double Junc_dist = 250; // Distance to junction private int Junc_type; // Junction type (k=1 traffic lights, k=2 roundabout) private double slopePercentage = 0; // slope s (in %), In the case of a bi-directional traffic flow, it is necessary to split the flow into two components and correct half for uphill and half for downhill. diff --git a/noisemodelling-emission/src/main/java/org/noise_planet/noisemodelling/emission/road/cnossosvar/RoadVehicleCnossosvar.java b/noisemodelling-emission/src/main/java/org/noise_planet/noisemodelling/emission/road/cnossosvar/RoadVehicleCnossosvar.java index cdcf359fa..7fe4c4de5 100644 --- a/noisemodelling-emission/src/main/java/org/noise_planet/noisemodelling/emission/road/cnossosvar/RoadVehicleCnossosvar.java +++ b/noisemodelling-emission/src/main/java/org/noise_planet/noisemodelling/emission/road/cnossosvar/RoadVehicleCnossosvar.java @@ -71,8 +71,8 @@ public static double evaluate(RoadVehicleCnossosvarParameters parameters) throws // Rolling noise acceleration correction - // double coefficientJunctionDistance = Math.max(1 - Math.abs(Junc_dist) / 100, 0); - //RoadLvl = RoadLvl + getCr(veh_type, Junc_type, coeffVer) * coefficientJunctionDistance; + double coefficientJunctionDistance = Math.max(1 - Math.abs(Junc_dist) / 100, 0); + RoadLvl = RoadLvl + getCr(veh_type, Junc_type, coeffVer) * coefficientJunctionDistance; //Studied tyres @@ -102,9 +102,9 @@ public static double evaluate(RoadVehicleCnossosvarParameters parameters) throws double aMax; switch (acc_type) { case 1: - //if (veh_type.equals("1") || veh_type.equals("2") || veh_type.equals("3")) { - // MotorLvl = MotorLvl + getCp(veh_type, Junc_type, coeffVer) * coefficientJunctionDistance; - //} + if (veh_type.equals("1") || veh_type.equals("2") || veh_type.equals("3")) { + MotorLvl = MotorLvl + getCp(veh_type, Junc_type, coeffVer) * coefficientJunctionDistance; + } break; case 2: switch (veh_type) { diff --git a/noisemodelling-emission/src/test/java/org/noise_planet/noisemodelling/emission/road/RoadVehicleCnossosvarTest.java b/noisemodelling-emission/src/test/java/org/noise_planet/noisemodelling/emission/road/RoadVehicleCnossosvarTest.java index ed7d6b447..ce8679ae4 100644 --- a/noisemodelling-emission/src/test/java/org/noise_planet/noisemodelling/emission/road/RoadVehicleCnossosvarTest.java +++ b/noisemodelling-emission/src/test/java/org/noise_planet/noisemodelling/emission/road/RoadVehicleCnossosvarTest.java @@ -70,6 +70,7 @@ public void T02_OneVeh() throws IOException { rsParameters_dyn.setFrequency(FreqParam); rsParameters_dyn.setTemperature(Temperature); rsParameters_dyn.setRoadSurface(RoadSurface); + rsParameters_dyn.setJunc_dist(250); double res = RoadVehicleCnossosvar.evaluate(rsParameters_dyn); double res2 = RoadCnossos.evaluate(rsParameters_stat); assertEquals(res2, res, EPSILON_TEST1);