Why does raytrace() between one RX and one TX sometimes return a single ray and sometimes 24?
1 次查看(过去 30 天)
显示 更早的评论
I have a function that defines a txsite, an rxsite and a propagation model.
With these parameters, I call the raytrace() function, which returns me a 1x1 cell with a 1x1 Ray, which I save in the "rays" variable. When I display this using plot(), it displays one ray, the LoS ray.
However, when I execute this function with the same parameters while the first siteviewer window is still open, my "rays" variable is now filled with a 1x24 Ray within the 1x1 cell. The plot() function displays 24 rays with different amounts of bounces and path loss.
This only happens whenever there are one or multiple other site viewers open. I have tried to set MaxRelativePathLoss to Inf alongside MaxAbsolutePathLoss, which did not help.
Why is this happening?
Bonus points if you can tell me why the default value for amount of rays seems to be 24.
Calling the function with: [chan, rays, rx, tx, pm] = myRaytrace(1, [-1.46; -1.42; 2.1], 5.8e9, 1, [.3; .3; .85], [0;90]);
0 个评论
回答(1 个)
Vijeta
2023-6-15
Hi,
It is possible that the additional rays you are seeing in `plot()` when executing the function a second time are due to the previously opened `siteviewer` sessions. When you open a `siteviewer` window, it loads and visualizes the map file specified by `mapFileName` in your function. This map file can contain information about the environment that is used by the raytracing algorithm to compute the paths of the rays.
When you call `raytrace()` the first time, a `propagationModel` is created with the specified parameters and used to compute a single ray that satisfies those conditions. When you call `raytrace()` the second time with the same parameters while keeping the `siteviewer` window open, the raytracing algorithm may use additional information about the environment contained in the map file loaded by the `siteviewer` to compute more rays that satisfy the same conditions.
Regarding the bonus question, the default value of 24 rays is specified by the `propagationModel` object when the "raytracing" method is used. According to the documentation, "The ray tracing algorithm creates a default of 24 rays emanating uniformly from the Tx antenna". You can change this behavior by setting the `NumRays` property of the `propagationModel` object to a different value.
One way to resolve the issue might be to close all `siteviewer` windows before calling `raytrace()` to ensure that the algorithm only uses the specified conditions and environment. Another option might be to modify the `propagationModel` settings to match your desired conditions more precisely, such as setting `NumRays` to 1.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Propagation and Channel Models 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!