# Multiple SSO Space Debris Flyby Trajectory Design Based on Cislunar Orbit
## 4 Phase 1: Two Impulses DRO-Earth Transfer Orbit Design
### Local Optimization  
The last subsection obtained the pruning results of the two-impulse DRO-Earth transfer orbit. In this subsection, \(\{\mathrm{G}_{0}(\Gamma_{0})+\mathrm{G}_{1}(\Gamma_{1})\}\) in set \(S_{1}\) with \(i_{1}>80^{\circ}\) are used as the initial values for local optimization to obtain the optimal two-impulse DRO-Earth transfer and flyby orbit. At first, the target debris of the flyby must be selected. The group composed of \(\{\mathrm{G}_{0}(\Gamma_{0})+\mathrm{G}_{1}(\Gamma_{1})\}\) with \(i_{1}>80^{\circ}\) is denoted as set \(S_{2}\). In order to choose the target debris of the flyby for each \(\{\mathrm{G}_{0}(\Gamma_{0})+\mathrm{G}_{1}(\Gamma_{1})\}\) in set \(S_{2}\), let us traverse every \(\{\mathrm{G}_{0}(\Gamma_{0})+\mathrm{G}_{1}(\Gamma_{1})\}\) in set \(S_{2}\) and all target debris, and then calculate the angle between the orbital plane of the debris and the spacecraft when the spacecraft at the perigee. For each \(\{\mathrm{G}_{0}(\Gamma_{0})+\mathrm{G}_{1}(\Gamma_{1})\}\) in set \(S_{2}\), the debris whose orbital plane is closest to the spacecraft is selected as the target debris.  
After choosing the target debris of the flyby, the following optimization problem is to be solved: find the departure time \(\tau_{0}\) on DRO and two maneuvers \(\Gamma_{0}(\mathbf{X}_{0})\) and \(\Gamma_{1}(\mathbf{X}_{1})\) such that the total impulse \(||\Delta\mathbf{V}_{0}||+||\Delta\mathbf{V}_{1}||\) is minimized and the flyby condition of one piece of SSO target debris is satisfied. The framework of the optimization problem is shown in Equation (18). The minimization strategy is obtained via the built-in fmincon tool.  
\[\begin{split}\text{Minimize }f(\mathbf{x})\text{ subject to :}\\ \mathbf{x}_{\text{min}}&\leq\mathbf{x}\leq\mathbf{x}_{\text{ max}}\\ \mathbf{c}(\mathbf{x})&\leq 0\end{split} \tag{18}\]  
where \(f(\mathbf{x})=\)\(||\Delta\mathbf{V}_{0}||+||\Delta\mathbf{V}_{1}||\) is the cost function. \(\mathbf{x}\) denotes the optimization parameters. \(\mathbf{x}_{\text{min}}\) and \(\mathbf{x}_{\text{max}}\) are the lower and upper boundaries of \(\mathbf{x}\). \(c(\mathbf{x})\) denotes the inequality constraints. The optimization parameters are as follows:  
\[\mathbf{x}=[\Delta\tau,||\Delta\mathbf{V}_{0}||,\alpha_{0},\beta_{0},\Delta t_{0},|| \Delta\mathbf{V}_{1}||,\alpha_{1},\beta_{0},\Delta t_{1}] \tag{19}\]  
The lower and upper bounds of the optimization parameters are as follows:  
\[\begin{split}\mathbf{x}_{\text{min}}&=[\Delta\tau- \delta_{1},||\Delta\mathbf{V}_{0}||-\delta_{2},\alpha_{0}-\delta_{3},\beta_{0}- \delta_{3},0,\ ||\Delta\mathbf{V}_{1}||-\delta_{2},\alpha_{1}-\delta_{3},\beta_{1}- \delta_{3},0]\\ \mathbf{x}_{\text{max}}&=[\Delta\tau+\delta_{1},||\Delta\mathbf{V }_{0}||+\delta_{2},\alpha_{0}+\delta_{3},\beta_{0}+\delta_{3},\zeta_{1},\ ||\Delta\mathbf{V}_{1}||+\delta_{2},\alpha_{1}+\delta_{3},\beta_{1}+\delta_{3}, \zeta_{1}]\end{split} \tag{20}\]  
where \(\delta_{1}\), \(\delta_{2}\), and \(\delta_{3}\) are defined in Table 4, and \(\zeta_{1}\) is defined in Table 3. The inequality constraints are as follows:  
\[\begin{split} c_{1}&=-(h_{p-moon}-\widetilde{h}_{1}) \leq 0\\ c_{2}&=h_{p-moon}-h_{SO1}\leq 0\\ c_{3}&=J_{t}-C_{1}\leq 0\\ c_{4}&=-(h_{p-earth}-\widetilde{h}_{2})\leq 0\\ c_{5}&=h_{p-earth}-\widetilde{h}_{3}\leq 0\\ c_{6}&=-(i_{1}-\widetilde{i}_{1})\leq 0\\ c_{7}&=-(||\delta\mathbf{r}||-\zeta_{5})\leq 0\\ c_{8}&=||\delta\mathbf{r}||-\zeta_{6}\leq 0\\ c_{9}&=||\delta\mathbf{v}||-\zeta_{7}\leq 0\end{split} \tag{21}\]  
After optimization, the optimization result with the minimum \(||\Delta\mathbf{V}_{0}||+||\Delta\mathbf{V}_{1}||\) is chosen as the optimal two-impulse DRO-Earth transfer and flyby orbit.