# Clustering Method of Large-Scale Battlefield Airspace Based on Multi A * in Airspace Grid System
## 4 Airspace Clustering Steps Based on Multi-A \({}^{*}\) Algorithm
### Clustering Data Processing
#### 4.4.2 Internal Element Identification of Airspace Cluster  
The main task of the internal identification of airspace clusters is to identify which airspace is contained in each airspace cluster, gather the task airspace in the same cluster and match the corresponding airspace cluster. It can be confirmed that after clustering, any part of each airspace can be guaranteed to be in the cluster. Using this feature, this section selects the center point of each airspace to represent the entire airspace. Finally, the airspace cluster to which each airspace belongs is determined by judging the position relationship between the center point of the airspace and the vertex of the airspace cluster. Each airspace cluster is composed of multiple vertices, which can be connected to form an irregular polygon. The above problem can be abstracted as judging the position relationship between the center point of the airspace domain and the vertex polygon. There are many methods to judge the positions of points and polygons, including ray intersection method [74] (as shown in the Figure 13a), circle number method [75] (as shown in the Figure 13b) and angle addition method [76] (as shown in the Figure 14). In essence, the ray intersection method and the circle number method both use the target point as the origin of the ray, and they judge the position relationship between the point and the polygon by judging the  
\begin{table}
\begin{tabular}{c c c c} \hline \hline
**Serial Number** & **Variable Name** & **Variable Meaning** & **Data Type** \\ \hline
1 & \(Code\_ID\) & Grid code & Unsigned Int \\
2 & \(L_{1\_Set}\) & The object grid coding set in the clustering line \(L_{1}\) & BLOB \\
3 & \(L_{2\_Set}\) & The object grid coding set in the clustering line \(L_{2}\) & BLOB \\ \hline \hline \end{tabular}
\end{table}
Table 4: Grid coding data structure.  
Figure 12: Airspace clustering line grid coding detection diagram.  
number of intersections between the ray and the polygon. This method has to go beyond the convexity and convexity of the polygon and has poor applicability. The angle addition method sets the target point as the starting point of the ray, and constructs multiple rays with the vertex of the airspace cluster as a point on the ray. If the sum of the ray angles is \(360^{\circ}\), the target point is inside the polygon; otherwise, the target point is outside the polygon. This method has low requirements on the shape and concavity of the polygon, and is more suitable for solving the problems in this paper.  
Take the airspace cluster \(\copyright\) of the airspace clustering diagram in the case as an example, judge the affiliation between airspace 11 and airspace cluster \(\copyright\), and introduce the methods and steps of element identification inside the airspace cluster. First, locally enlarge the part of airspace clustering diagram about airspace cluster \(\copyright\), and at the same time, grid identify the corner points of the clustering line and the geometric center points of mission airspace 11, as shown in the Figure 15.  
It is not difficult to find \(\theta_{1}+\theta_{2}+\theta_{3}+\theta_{4}=360^{\circ}\) through calculation, and then it can be judged that the geometric center of mission 11 airspace is located in airspace cluster \(\copyright\), and it can further be inferred that mission 11 airspace belongs to airspace cluster \(\copyright\). According to the above steps, we can judge the ownership relationship of all airspace clusters to get the final airspace clustering result, as shown in the Figure 16.  
Figure 14: Schematic Diagram of Angle Addition.  
Figure 13: Schematic Diagram of Radiographic Testing Method. (**a**) Schematic diagram of ray intersection method; (**b**) Schematic Diagram of Surrounding Number Method.