# Laser Inter-Satellite Link Visibility and Topology Optimization for Mega Constellation
## 3 Methodology and Analytical Approach
### Optimal Phasing Factor  
After the initial phase in the constellation is determined using Formula (1), the longitude and latitude coordinates of the satellite are determined using Formulas (8) and (9), and the distance between satellites in different orbits is calculated by the Formula (15), which is then substituted into Formula (16), to obtain the longest visible distance \(x\) between the two satellites. Using \(x\) as the criterion, if the maximum value is not exceeded, it means that the two satellites are within the visible range of each other and LISLs can be established [23]. From the above analysis, the phasing factor indicates the relative phase difference of satellites passing through the equatorial plane between adjacent orbits, which is the relative phase measured by the interval \(1/P\) of adjacent satellites in any one orbit. Therefore, the first step in simulation modeling is to solve the phase between satellites adopting an optimization algorithm. Two fundamental criteria govern the optimization process are: first, to maximize the shortest distance between any orbiting satellites; and second, in the case of establishing LISLs in cross orbital planes, no collision event between satellites in different orbital planes can occur [24]. The above rule is also acknowledged as the binomial criterion.  
This paper calculates the shortest distance between any two satellites at different times by simulating the situation under different phasing factors. Using an optimization algorithm to find the optimal solution that meets the conditions, its N Asset Coverage is analyzed, and the pros and cons of the constellation performance are compared [25].  
Figure 5: Establishment of instantaneous LISLs between different orbits.  
For the Walker constellation, a five-element parameter set can be applied to fully describe its configuration: \(\{M,P,F,h,i\}\), which indicates that the constellation consists of \(S\) satellites evenly distributed in \(P\) orbital planes, \(h\) is the orbital altitude, \(i\) is the orbital inclination, \(M\) is the number of satellites contained in each orbit. Accordingly, the total number of satellites is \(S=P\times M\), \(F\) indicating the phase value of the eastern orbit ahead of the western orbit, which is related to the total number of satellites, and the value range is \(0\leq F\leq P-1\). The pseudo code for the algorithm is shown in Algorithm 1.  
```
1:P
2:Output: Optimal Phasing Factor
3:Max \(\leftarrow\) 0, Min \(\leftarrow\) 0, BF \(\leftarrow\) 0
4:for F \(\leftarrow\) 0 To \(P_{i}-1\)
5:for M \(\leftarrow\) 1 To \(M_{j}\)
6:for N \(\leftarrow\) 1 To M
7:\(\text{d}_{12}\leftarrow\text{Calculate the distance of LISLs for }S_{1}\) and \(S_{2}\) using Equation (12)
8:if Min == 0 Then
9:\(\text{Min}\leftarrow\text{d}_{12}\)
10:else
11:if Min < d\({}_{12}\)hen Min \(\leftarrow\) d\({}_{12}\)End
12:end
13:Next N
14:Next M
15:if Max < Min Then
16:Max \(\leftarrow\) Min
17:end
18:Next P
19:\(\text{F}=\text{P}-1\)
20:Optimal Inter Spacing \(\leftarrow\text{F}\)
```  
**Algorithm 1** Pseudocode for optimal phasing factor solution algorithm