Open nicolas-f opened 2 months ago
interpolate y reflection coordinate
// A diffraction point may have offset in height the reflection coordinate
final Coordinate p0 = points.get(i - 1).coordinate;
final Coordinate p1 = points.get(i).coordinate;
final Coordinate p2 = points.get(i + 1).coordinate;
// compute Y value (altitude) by interpolating the Y values of the two neighboring points
points.get(i).coordinate = new CoordinateXY(p1.x, (p1.x-p0.x)/(p2.x-p0.x)*(p2.y-p0.y)+p0.y);
The image on the right shows the 3d rays of TC18 on Google Earth, while the image on the left shows the TC18 scenario on CNOSSOS. Note that the red ray on the right image does not touch the wall, unlike the CNOSSOS image. To check whether the error was ours or not, I tried modifying the image below by adding a straight line between S and R, and the right-hand ray doesn't touch the wall.
https://github.com/Universite-Gustave-Eiffel/NoiseModelling/blob/4.X/noisemodelling-pathfinder/src/main/java/org/noise_planet/noisemodelling/pathfinder/ComputeCnossosRays.java#L1219
computeFreeField computeHEdgeDiffraction and computeVEdgeDiffraction return points in 2 dimensions (only x,y given) but ComputeCnossosRays.computeReflexion use Z value of the coordinates