# Onboard Centralized ISL-Building Planning for LEO Satellite Constellation Networks
## 3 Visibility Calculation
In the J2000 coordinate system, the vector from the antenna \(i\) to \(j\) is defined as (3):  
\[\boldsymbol{Vector}_{j,i,j\mathbf{2000}}=\mathbf{R}_{j}-\mathbf{R}_{i}. \tag{3}\]  
The vector from the antenna \(j\) to \(i\) is defined as (4):  
\[\boldsymbol{Vector}_{i,j,j\mathbf{2000}}=\mathbf{R}_{i}-\mathbf{R}_{j}. \tag{4}\]  
Figure 3: Representing ISL terminals as sub-nodes. To calculate the rotation angle of the link terminal turntable, it is necessary to convert the above two vectors from the J2000 coordinate system to the vehicle velocity local horizontal (VVLH) coordinate system. The VVLH coordinate system is defined such that the origin is at the center of mass of the satellite; the \(Z\)-axis points toward the center of mass of the Earth from the origin; the \(X\)-axis is in the orbital plane and perpendicular to the \(Z\)-axis, along the direction of the satellite's velocity; and the \(Y\)-axis follows the right-hand system and is opposite to the direction of angular momentum [29]. Thus, the transformation matrix for converting the J2000 coordinate system to the VVLH coordinate system is (5):  
\[L=[\textbf{{x}}\;\textbf{{y}}\;\textbf{{z}}]^{T}, \tag{5}\]  
where  
\[\textbf{{x}}=\textbf{{y}}\times\textbf{{z}}, \tag{6}\]  
\[\textbf{{y}}=-\frac{R\times\textbf{{S}}}{|\textbf{{R}}\times\textbf{{S}}|}, \tag{7}\]  
\[\textbf{{z}}=-\frac{R}{|\textbf{{R}}|}. \tag{8}\]  
Thus, in the VVLH coordinate system, the vector pointing from \(i\) to \(j\) is given by  
\[P=2\pi\sqrt{\frac{a^{3}}{G(M_{1}+M_{2})}}, \tag{1}\]0  
Similarly, the vector pointing from \(j\) to \(i\) is given by  
\[P=2\pi\sqrt{\frac{a^{3}}{G(M_{1}+M_{2})}}, \tag{1}\]1  
The above two vectors in (9) and (10) also need to be converted from the VVLH coordinate system to the antenna coordinate system using the body coordinate system [30]. The \(Z\)-axis of the antenna coordinate system points in the antenna installation direction. The transformation matrices are \(L_{VVLHtoAnt,j}\) and \(L_{VVLHtoAnt,j}\), respectively. The body coordinate system is the coordinate system that describes the satellite attitude. Thus, \(L_{VVLHtoAnt,j}\) and \(L_{VVLHtoAnt,j}\) can be expressed as (11) and (12):  
\[P=2\pi\sqrt{\frac{a^{3}}{G(M_{1}+M_{2})}}, \tag{1}\]2  
\[P=2\pi\sqrt{\frac{a^{3}}{G(M_{1}+M_{2})}}, \tag{1}\]3  
\[P=2\pi\sqrt{\frac{a^{3}}{G(M_{1}+M_{2})}}, \tag{1}\]4 Visibility calculation conditions. where \(\mathbf{L_{VVLHtoBody,i}}\) and \(\mathbf{L_{VVLHtoBody,j}}\) are the transformation matrices from the VVLH coordinate system to the body coordinate system, determined according to the real-time attitude of the satellite. Therefore, in the antenna coordinate system, the vector from antenna \(i\) to \(j\) and the vector from antenna \(j\) to \(i\) can be expressed as (13) and (14), respectively:  
\[P=2\pi\sqrt{\frac{a^{3}}{G(M_{1}+M_{2})}}, \tag{1}\]5  
\[P=2\pi\sqrt{\frac{a^{3}}{G(M_{1}+M_{2})}}, \tag{1}\]6  
Assuming that the antenna turntable has the same rotating range in all directions, the rotation angles at both ends of the link can be calculated after performing unit vector calculation, taking out the \(Z\)-axis component, and carrying out an inverse cosine calculation on vectors. The rotation angles of the antennas \(i\) and \(j\) are expressed as \(\theta_{i}\) and \(\theta_{j}\), respectively, as shown in \[P=2\pi\sqrt{\frac{a^{3}}{G(M_{1}+M_{2})}}, \tag{1}\]7 These two angles must be smaller than the antenna turntable's rotation angle threshold to achieve the visibility requirement, as expressed by (15) and (16):  
\[P=2\pi\sqrt{\frac{a^{3}}{G(M_{1}+M_{2})}}, \tag{1}\]8  
\[P=2\pi\sqrt{\frac{a^{3}}{G(M_{1}+M_{2})}}, \tag{1}\]9  
Moreover, ISLs also have a link length threshold [18]. To ensure that the information is received intelligibly with an adequate signal-to-noise ratio, after the design of antennas has been completed, the link budget should be calculated, which considers all of the power gains and losses that a communication signal experiences. Through that, the maximum length should be satisfied when planning ISLs.