# Onboard Centralized ISL-Building Planning for LEO Satellite Constellation Networks
## 3 Visibility Calculation  
As the inter-plane satellites move at high speeds, the ISLs need to be constantly switched and, as such, the network topology varies. Therefore, the visibility calculation must be performed before link-building planning. The pre-requisite for establishing an ISL is that two antennas are visible to each other. Each satellite typically carries several ISL terminals in a large-scale low-orbit constellation network. Moreover, to ensure that the network can cover all satellite nodes, there is usually a situation where more than one ISL is built for one satellite simultaneously. Furthermore, ISL terminals are installed in different spots on the satellite, with varied installation directions, in order to form ISLs with satellites in different directions. As a result, to calculate the visibility more accurately and better meet the needs of engineering development, the antenna should be taken as the object of the visibility calculation rather than the satellite. Furthermore, the antenna installation direction and the turntable rotating threshold should be considered when the visibility calculation is performed, instead of viewing the satellite as a particle. As shown in Figure 3, an ISL terminal is represented as a sub-node, and the number of sub-nodes contained in a network node is the number of terminals carried by the satellite. Then, the onboard computer should calculate the visibility among the sub-nodes of different nodes and build ISLs among the visible sub-nodes. Figure 2: Flow chart of onboard centralized ISL-building planning scheme. Before the visibility calculation, the satellite onboard computer calculates the period \(P\) of the relative positions of the nodes of the satellite constellation network, according to the orbit semi-major axis based on [PERSON]'s third law [28], as shown in (1):  
\[P=2\pi\sqrt{\frac{a^{3}}{G(M_{1}+M_{2})}}, \tag{1}\]  
where \(a\) is the semi-major axis of the satellite's elliptical orbit; \(G\) is the gravitational constant; \(M_{1}\) and \(M_{2}\) are the masses of the earth and the satellite, respectively; and \(P\) is also the planning period for the constellation network. The visibility is represented by a Boolean matrix \(V\), with the size of \(N\times N\times K\), where \(N\) is the number of antennas in the constellation and \(K\) is the number of time segments in the period \(P\). The antenna is the calculation object in the visibility calculation process. \(A\) denotes the set of all antennas in the constellation, and an antenna is written as \(i\in A=\{1,2,\ldots,N\}\). \(v_{i,j,k}=1\) indicates that the \(i\)th and \(j\)th antennas in the constellation are visible to each other at time segment \(k\) and the ISL can be built, while \(v_{i,j,k}=0\) indicates that the two antennas are not mutually visible. Furthermore, \(\mathbf{R}_{i}\) and \(\mathbf{S}_{i}\), for \(\forall i\in A\) are the position and velocity vectors of the satellite, respectively, where the antenna \(i\) is placed in the J2000 coordinate system, and the maximum rotation half-angle of the link terminal's turntable is \(\theta_{i}^{max}\). The first condition to be met in order to ensure visibility between \(\forall i\in A\) and \(\forall j\in A\) is that the earth does not block the connection between the two antennas. In this case, the distance between the connection and the center of the earth, as shown in Figure 4, should be greater than the radius of the earth, as which is represented by (2):  
\[d=\sqrt{\left(\left|\mathbf{R}_{j}\right|\right)^{2}-\left(\frac{\left|\mathbf{ R}_{j}\times\left(\mathbf{R}_{j}-\mathbf{R}_{i}\right)\right|}{\left|\mathbf{R}_{j}- \mathbf{R}_{i}\right|}\right)^{2}}>r_{E}, \tag{2}\]  
where \(r_{E}\) is the radius of the Earth. Another factor that needs to be considered is that, after the ISL is built, the rotation angles of the two antenna turntables should be smaller than their turntable rotation capabilities.