# A Novel LOS Decision Technique Reflecting 3D DTED for Modeling an Electronic Warfare Environment
## 3 LOS Decision Technique
### Proposed Method: Sign Counting  
For a given jammer-object position, using all the points in the dataset is unnecessary. In order to reduce the points that may be used in the LOS decision, a triangular plane including the LOS path is formed. The three vertices of the triangular plane are the jammer point in the 3D space and two fictitious points near the object reflecting the DTED information. If any of the DTED points within the triangular area is higher than this triangular plane, the jammer-object path is considered to be non-LOS (NLOS). The two points are created at \(\delta\) distance apart from the object in a direction perpendicular to the LOS path. The distance \(\delta\) may be set in consideration of the beam width of the jammer antenna. The equation of the plane containing the triangle may be expressed as follows:  
\[ax+by+cz=d \tag{1}\]  
and for the three points \(A(x_{1},y_{1})\), \(B(x_{2},y_{2})\), and \(C(x_{3},y_{3})\), four coefficients in Equation (1) can be determined by following Equation (2):  
\[a=\left| \begin{array}{ccc}1&y_{1}&z_{1}\\ 1&y_{2}&z_{2}\\ 1&y_{3}&z_{3}\end{array} \right|,b=\left| \begin{array}{ccc}x_{1}&1&z_{1}\\ x_{2}&1&z_{2}\\ x_{3}&1&z_{3}\end{array} \right|,c=\left| \begin{array}{ccc}x_{1}&y_{1}&1\\ x_{2}&y_{2}&z_{2}\\ x_{3}&y_{3}&1\end{array} \right|,d=\left| \begin{array}{ccc}x_{1}&y_{1}&z_{1} \\ x_{2}&y_{2}&z_{2}\\ x_{3}&y_{3}&z_{3}\end{array} \right| \tag{2}\]  
The three vertices give a rough bounding box whose sides are parallel to the UTM axes. The points that are outside of this bounding box are excluded from the LOS decision calculations. The points within the bounding box are determined if they are within the triangle area called the LOS decision triangle. The sign-counting method is proposed to determine if the points are within the triangle. Figure 4 shows the LOS decision triangle and its bounding box as described below. Consider a point within the bounding box. The point is temporarily set as the origin. Four quadrants can be defined, according to the reference to the origin. Each quadrant is given a pair of two signs, as shown in Figure 5. The locations of the three vertices are determined in the four-quadrant space. Starting from one vertex, we move to the second vertex and count the sign change. The sign change is counted as we move from the second to the third, and from the third to the first. The sign change can range from 0 to 2. The sign change examples are shown in Figure 5.  
The cases where the sign changes in the quadrant are as follows:  
1. When moving within the same quadrant, the change of sign = 0;
2. When moving to the adjacent quadrant, the change of sign = 1;
3. When moving to the diagonal quadrant, the change of sign = 2. Figure 4: Line-of-sight (LOS) decision triangle and its bounding box. Figure 5: Judgment of test points for six cases. (**a**–**c**,**f**) Cases 1, 2, 3, and 6, origin is not included; (**d**,**e**) Cases 4 and 5, origin is included in the triangular area. For a given point to be included within the triangle, at least a sign change of 2 is necessary. These cases correspond to Figure 5c-f. For other cases, the test points are excluded from the LOS decision calculations. For the cases corresponding to Figure 5c-f, the outer product calculations are used to determine if the point is within the triangle. If the point is determined to be within the triangle, the height of the point from sea level can be determined from the following equation:  
\[z_{in}=\frac{1}{c}(d-ax_{in}-by_{in}) \tag{3}\]  
where \(x_{in}\) and \(y_{in}\) are the coordinates of the point in the LOS decision triangle. The distance from the triangular plane can be obtained from the following equation:  
\[D=\frac{(ax_{in}+by_{in}+cz_{dted}+d)}{\sqrt{a^{2}+b^{2}+c^{2}}} \tag{4}\]  
where \(z_{dted}\) is elevation data corresponding to \((x_{in},y_{in})\) in DTED. If this distance is positive, it interferes with the LOS. This is repeated for all the points within the triangular plane. If all the points have \(\max(D(x,y))\) < 0, the path is LOS.