# Rapid Construction of Aerocapture Attainability Sets Using Sequential Convex Programming
## 3 Algorithm to Construct Aerocapture Attainability Set  
Based on the formulation in Section 2, the aerocapture attainability set \(\mathcal{A}\) can be constructed by determining its boundary \(\mathcal{O}\). In this paper, the boundary is calculated by means of dimensionality reduction, as illustrated in Figure 4. The key idea is to determine the reachable bounds of \(\gamma_{f}\) for each fixed \(V_{f}\). For a specific \(V_{f}^{k}\), the line \(V=V_{f}^{k}\) intersects the boundary \(\mathcal{O}\) at two points, denoted as \(\gamma_{f,\min}^{k}\) and \(\gamma_{f,\max}^{k}\). These two points are the solutions of the optimal control problems  
\[\begin{array}{rcl}\min_{\sigma}\gamma_{f}&\Leftrightarrow&\gamma_{f,\min}^{ k}\\ \max_{\sigma}\gamma_{f}&\Leftrightarrow&\gamma_{f,\max}^{k}\end{array} \tag{7}\]  
subject to the given initial state \(x_{0}\), where the state vector \(x=[r,V,\gamma]^{T}\) and the control variable \(\sigma\) follow the dynamic differential equations given in Equations (2)-(4). For convenience, the two problems are denoted as _Problem 1_.  
Figure 3: The boundary of aerocapture attainability set in state space.  
The algorithm flowchart for numerically solving the boundary \(\mathcal{O}\) is summarized in Figure 5. Firstly, an initial terminal velocity \(V_{f}^{1}\) is chosen where both the problems of min \(\gamma_{f}\) and max \(\gamma_{f}\) have solutions. Without loss of generality, \(V_{f}^{1}\) can be set in accordance with the energy equation [45; 46; 47]  
\[V_{f}^{1}=\sqrt{\frac{2\mu_{M}}{r_{atm}}-\frac{\mu_{M}}{r_{a}^{R}+r_{p}^{R}}} \tag{8}\]  
where \(r_{a}^{R}\) and \(r_{p}^{R}\) are the apoapsis and periapsis radii of the estimated terminal orbit.  
Figure 4: Solving the boundary of aerocapture attainability set by dimensionality reduction.  
Figure 5: The algorithm flowchart for numerically solving the boundary of aerocapture attainability set.  
Then, the fixed terminal velocity is monotonically increased, \(V_{f}^{k}=V_{f}^{k-1}+\Delta V_{f}^{k}\) with an adaptive step \(\Delta V_{f}^{k}\), starting from \(V_{f}^{1}\). With the stopping criterion  
\[\left|\gamma_{f,\max}^{k}-\gamma_{f,\min}^{k}\right|\leq\Delta\gamma_{f} \tag{9}\]  
where \(\Delta\gamma_{f}>0\) is a constant close to zero and the two reachable bounds of \(\gamma_{f}\) eventually shrink into a common point \(A\).  
Next, the terminal velocity is monotonically decreased, \(V_{f}^{k}=V_{f}^{k-1}-\Delta V_{f}^{k}\), starting from \(V_{f}^{1}\). As the two reachable bounds of \(\gamma_{f}\) do not shrink to a common point, \(\gamma_{f,\min}^{k}\leq\gamma_{f}^{B}\) and \(\gamma_{f,\max}^{k}\leq\gamma_{f}^{C}\) are adopted as the stopping criterions, where \(\gamma_{f}^{B}\) and \(\gamma_{f}^{C}\) are the flight-path angles at points \(B\) and \(C\) determined by Equation (6), respectively.  
Note that the choice of step \(\Delta V_{f}^{k}\) is crucial for the numerical determination of the boundary \(\mathcal{O}\). In order to solve \(\gamma_{f,\min}^{k}\) and \(\gamma_{f,\max}^{k}\) precisely near the point \(A\) in the case of increasing \(V_{f}\), and to avoid the vehicle crashing on the planet surface in the case of decreasing \(V_{f}\), the step size \(\left|\Delta V_{f}\right|\) should be reduced adaptively.