# Spatial Grid-Based Position Calculation Method for Satellite-Ground Communication Links
## 2 Materials and Methods
### Calculation of Satellite-Ground Visibility
the position analysis of the ground terminal centroid projection and the satellite can convert the three-dimensional position calculation into a two-dimensional plane. Compared with judging the spatial relationship between the satellite and the terminal by calculating the angle of the satellite relative to the terminal, this paper makes a judgment of the relative position and motion state of both by the change in distance \(L\), i.e.,  
\[L=Grid_{satellite}-Grid_{central} \tag{5}\]  
\[L<H\times\frac{tan\theta}{L_{Grid}} \tag{6}\]  
\[\Delta L<L_{t}-L_{t+1} \tag{7}\]  
\(\theta\) is the maximum elevation angle fixed by the terminal, \(H\) is the altitude of the current satellite and \(t\) is the current satellite time. (1) \(L\) is the distance between the grid-calculated satellite and the center point; (2) it indicates a rough judgment method within the acceptance range of the terminal, as long as \(L\) is less than the coverage boundary; and (3) it can indicate the motion state of the satellite relative to the center point. In the GeoSOT model, the grids at the same level have the same volume size, so the distance between two grids can be represented by the number of grids. We represent the distance between satellites by the difference in the distance between grids, thus we can judge the movement of the satellite's position in the receiving area. As shown in Figure 5, after the satellite space is gridded, the number of grid differences between the satellite grid and the grid where the center point is located is calculated using the grid where the satellite is located, representing the position of the satellite. Because the satellite is in dynamic motion, as shown in Figure 6, the grid in which the satellite is in motion will also change, and the number of grids away from the centroid will also change. In the GeoSOT grid calculation model we can obtain the following rules:  
1. The closer the position grid is to the edge of the receiving range, the greater the grid distance. 2. The grid difference in two time intervals \(\Delta t\) can indicate the motion state. The number of grids at moment t from the center point is greater than the number of grids at moment \(t+1\), i.e., \(N_{t}>N_{t}+1\), which roughly means that the satellite is moving to a position close to the center point. Figure 5: Schematic diagram of 2D grid calculation. Suppose the initial selection time is \(t\), and the grid distance of satellite \(A\) at this time is \(N_{A-t}\). By analyzing the grid number from the center point during the motion of different satellites, we can set the following judgment model:  
1. If \(N_{t}>N_{t}+1\), the larger \(N_{t}\) is, the longer it stays in the receiving area, and the higher priority we set. 2. If \(N_{t}<N_{t}+1\), the smaller \(N_{t}\) is, the longer it stays in the acceptance area, and the higher priority we set;
3. The \(N_{t}>N_{t}+1\) case is overall higher than the \(N_{t}<N_{t}+1\) motion case. The GeoSOT grid code is an integer binary three-dimensional code, and its bit operation between codes is faster, which can meet the demand of fast response between multiple objects. With the position calculation model proposed in this section, we can use the grid bit operation to directly express the position relationship between the satellite and the terminal, and achieve the goal of fast calculation of the satellite-ground position relationship.