# Adaptive Access Selection Algorithm for Large-Scale Satellite Networks Based on Dynamic Domain
## 3 DAA Algorithm Design
### Access Switching Mechanism
#### 3.2.2 ESL Interruption or \(\bar{v}\) Failure  
ESL interruptions or \(\bar{v}\) failures can cause the ES to fail to send packets to the satellite and fail to receive the ACKs forwarded by \(\bar{v}\). This paper determines whether the fault mentioned above by acknowledging the timeout and setting the timeout timer \(\mathcal{T}\)[28]:  
\[\mathcal{T}=4[(1-\kappa)\mathcal{T}+\kappa RTT]\quad 0\leq\kappa\leq 1\enspace, \tag{8}\]  
where RTT denotes Round Trip Time, and \(\kappa\) denotes the smoothing factor. \(\mathcal{T}\) is started after the ES sends the data packet. The ES adopts the same strategy as Section 3.2.1 to select \(\bar{v}^{\prime}\). When \(\mathcal{T}=0\), the ES switches ESL to \(\bar{v}^{\prime}\). The DAA algorithm pseudo code is shown in Algorithm 1.  
```
0: Orbital elements:\([i,\Omega,e,\omega,a,M_{0}]\), Time:\(t\), Minimum elevation angle:\(\sigma\)
1: The satellites in the communication domain are determined by Equations (1)-(3);
2: The coverage time of the satellites in the communication domain is calculated by Equation (3);
3:if\(\bar{v}^{con}\
eq\emptyset\)then
4: Equation (6) is used to calculate the first time access satellite of ES;
5:else
6: Calculate access satellites set \(\mathbf{Q}\) through the flow chart shown in Figure 5;
7:endif
8: ES decodes the ACKs returned by \(\bar{v}\);
9:if\(U_{C}<U_{C}^{T}\) OR \(U_{E}<U_{E}^{T}\)then
10: Switch the ESL to the \(\bar{v}^{\prime}\) according to Section 3.2.1
11:endif
12:if\(\mathcal{T}<0\)then
13: Switch the ESL to the \(\bar{v}^{\prime}\)according to Section 3.2.2
14:endif
15:endif
16: DAA in \(S_{n,m}^{L}\)
17: Location of the ES:\([LON_{ES},LAT_{ES}]\), Maximum communication distance of ES:\(D_{max}\), Time:\(t\)
1:if\(S_{n,m}^{L}\) is \(\bar{v}\)then
2:\(S_{n,m}^{L}\) as the access satellite, add \([LON_{ES},LAT_{ES},D_{max}]\) to the data packet;
3:\(S_{n,m}^{L}\) add \(\left[C_{L,n,m}^{t},\mathcal{E}_{L,n,m}^{t}\right]\) to the ACKs;
4:else
5: The satellites on the data packet forwarding path are judged whether in the communication domain of the ES by Equation (3);
6:if\(S_{n,m}^{L}\in\
abla^{\prime\prime}\)then
7:\(S_{n,m}^{L}\) and \(\left[C_{L,n,m}^{t},\mathcal{E}_{L,n,m}^{t}\right]\) to the ACKs;
8:else if\(S_{n,m}^{L}\in\
abla^{\prime}\) and \(S_{n,m}^{L}\
otin\
abla^{\prime\prime}\)then
9:\(S_{n,m}^{L}\) deletes \([LON_{ES},LAT_{ES},D_{max}]\) from the data packet;
10:else if\(S_{n,m}^{L}\in\
abla^{\prime}\) and \(S_{n,m}^{L}\
otin\
abla^{\prime\prime}\) and \(S_{n,m}^{L}\) is the next hop of \(\bar{v}\)then
11: Add the IP address of \(S_{n,m}^{L}\) to the ACKs;
12:endif
13:endif
```  
**Algorithm 1** Dynamic domain-based adaptive access algorithm (DAA)  
In the algorithm, DAA in ES is the pseudo-code of the DAA algorithm running in ES, and DAA in \(S_{n,m}^{L}\) is the pseudo-code of the DAA algorithm running in the satellites. Lines 1-7 of the DAA in ES are used to determine the set of satellites for the first access by ES. This process does not require ES to interact with the satellites. Lines 8-14 are used to complete the ESL switching when the current access satellite has insufficient resourcesor failure. The prior knowledge to complete the process is obtained through the ACKs without additional packet transmission. DAA in \(S_{n,m}^{L}\) mainly provides prior knowledge for selecting backup access satellites by ES.