Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PathFinder.computeReflexion is using 2d coordinates as it was 3d coordinates #676

Open
nicolas-f opened this issue Jul 30, 2024 · 2 comments
Labels

Comments

@nicolas-f
Copy link
Member

nicolas-f commented Jul 30, 2024

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

@nicolas-f nicolas-f added the bug label Jul 30, 2024
@nicolas-f nicolas-f changed the title PathFinder.public List<CnossosPath> computeReflexion(Coordinate rcvCoord, Coordinate srcCoord, boolean favorable, Orientation orientation, MirrorReceiversCompute receiverMirrorIndex) { PathFinder.computeReflexion is using 2d coordinates as it was 3d coordinates Jul 30, 2024
@nicolas-f
Copy link
Member Author

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);

@MaguetteD
Copy link
Collaborator

MaguetteD commented Aug 6, 2024

rays

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.

rays2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants