MATLAB Answers

How to calculate the Line of sight (LOS) between two points in a Eucleidean appraoch?

44 ビュー (過去 30 日間)
Kaleesh Bala
Kaleesh Bala 2018 年 6 月 29 日
コメント済み: Kaleesh Bala 2018 年 7 月 5 日
-Line of sight? -Sensor placements -10*10 grid _Eucleidean method

  5 件のコメント

表示 2 件の古いコメント
Kaleesh Bala
Kaleesh Bala 2018 年 7 月 2 日
I think I can use euclidean distance between two points as A(x1,y1) and B(x2,y2) as d = sqrt((x2-x1)^2+(y2-y1)^2)).
But is there any meaning to Line of sight with this?
Kaitlyn Keil
Kaitlyn Keil 2018 年 7 月 2 日
Line of sight doesn't matter unless you have some sort of obstacle or direction to something else. Are there objects on the grid besides the 2 points?
Kaleesh Bala
Kaleesh Bala 2018 年 7 月 2 日
Yeah some times a hole ,or some mass in between.

サインイン to comment.

回答 (1 件)

Mridul G
Mridul G 2018 年 7 月 3 日
Assuming you know the coordinates of all the points and obstacles (and holes?), you can follow the below steps.
Points P1(x1,y1) and P2(x2,y2). Let obstacle be O(x3,y3).
Check the distance between P1 and P2. Compare it with that of P1->O + O->P2. if both are the same, them O lies between P1 and P2 and is in LoS.
Euclidean distance between two points -> sqrt((x2-x1)^2+(y2-y1)^2))

  1 件のコメント

サインイン to comment.

サインイン してこの質問に回答します。

製品


Translated by