# Circular Orbit Flip Trajectories Generated by E-Sail
## 2 Problem Description and Mathematical Approach
### Trajectory Design and Optimization  
The aim of this subsection is to design the COFT to obtain a transition from a prograde motion (when the spacecraft flies counterclockwise in the parking orbit sketched in Figure 1) to a retrograde motion (i.e., a motion along the circular parking orbit of Figure 1 with a clockwise direction), using a two-dimensional transfer coplanar with the plane of the parking orbit. We assume that the orbit flip maneuver is completed at time \(t_{f}>t_{0}\), or \(\widetilde{t}_{f}=t_{f}/\sqrt{\tau_{0}^{3}/\mu_{\odot}}\), so that, if the final polar angle \(\theta\) is left free, the spacecraft states at the (unknown) time \(t_{f}\) are constrained by the equations  
\[r(t_{f})=r_{0},\quad u(t_{f})=0,\quad v(t_{f})=-\sqrt{\frac{\mu_{\odot}}{r_{0}}} \tag{17}\]  
or, in dimensionless form  
\[\widetilde{r}(\widetilde{t}_{f})=1,\quad\widetilde{u}(\widetilde{t}_{f})=0, \quad\widetilde{v}(\widetilde{t}_{f})=-1. \tag{18}\]  
Note that the only difference between Equation (18) and the corresponding initial values of the state variables given by Equation (16) is in the sign of the transverse component \(\widetilde{v}\) of the spacecraft velocity. The transfer trajectory study is conducted from an optimization perspective, by looking for the COFTs that minimize the flight time \(\Delta\widetilde{t}=\widetilde{t}_{f}\) for a given value of the dimensionless propulsive acceleration \(\beta\) defined in Equation (3). The optimization problem has been solved with an indirect method [31; 32], in particular by using the calculus of variations [33] and the Pontryagin's maximum principle [34] to obtain the optimal control law. The latter coincides with the pair of functions \(\alpha_{n}=\alpha_{n}(\widetilde{t})\) and \(\tau=\tau(\widetilde{t})\) that maximizes the performance index [35]  
\[\widetilde{J}\triangleq-\Delta\widetilde{t}=-\widetilde{t}_{f}. \tag{19}\]  
The approach used to solve the problem, which is similar to that used by the authors in recent works [36; 37], is now summarized for the sake of completeness. Bearing in mind the equations of motion (12)-(15) and introducing the dimensionless adjoint variables \(\{\lambda_{\widetilde{r}},\lambda_{\theta},\lambda_{\widetilde{u}},\lambda_{ \widetilde{v}}\}\), the Hamiltonian function turns out to be  
\[\widetilde{\mathcal{H}}=\lambda_{\widetilde{r}}\widetilde{u}+\frac{\lambda_{ \theta}\,\widetilde{v}}{\widetilde{\tau}}-\frac{\lambda_{\widetilde{u}}}{ \widetilde{\tau}^{2}}+\frac{\lambda_{\widetilde{u}}\,\widetilde{v}^{2}}{ \widetilde{\tau}}+\tau\,\frac{\lambda_{\widetilde{u}}\,\widetilde{v}}{2 \widetilde{\tau}}\left(1+\cos^{2}\alpha_{n}\right)-\frac{\lambda_{\widetilde{ v}}\,\widetilde{u}\,\widetilde{v}}{\widetilde{\tau}}+\tau\,\frac{\lambda_{ \widetilde{v}}\,\beta}{2\widetilde{\tau}}\,\cos\alpha_{n}\,\sin\alpha_{n} \tag{20}\]  
which is necessary to write the Euler-Lagrange differential equations [38]  
\[\lambda_{\widetilde{r}}^{\prime} =-\frac{\partial\widetilde{\mathcal{H}}}{\partial\widetilde{r}}= \lambda_{\widetilde{u}}\Big{[}\frac{\widetilde{v}^{2}}{\widetilde{\tau}^{2}}- \frac{2}{\widetilde{r}^{3}}+\frac{\tau\,\beta\left(\cos 2\alpha_{n}+3\right)}{4 \widetilde{r}^{2}}\Big{]}-\lambda_{\widetilde{v}}\Big{[}\frac{\widetilde{u}\, \widetilde{v}}{\widetilde{\tau}^{2}}-\frac{\tau\,\beta\,\sin 2\alpha_{n}}{4 \widetilde{r}^{2}}\Big{]}+\frac{\lambda_{\theta}\,\widetilde{v}}{\widetilde{ \tau}^{2}} \tag{21}\] \[\lambda_{\theta}^{\prime} =-\frac{\partial\widetilde{\mathcal{H}}}{\partial\theta}=0\] (22) \[\lambda_{\widetilde{u}}^{\prime} =-\frac{\partial\widetilde{\mathcal{H}}}{\partial\widetilde{u}}= \frac{\lambda_{\widetilde{v}}\,\widetilde{v}}{\widetilde{\tau}}-\lambda_{ \widetilde{r}}\] (23) \[\lambda_{\widetilde{v}}^{\prime} =-\frac{\partial\widetilde{\mathcal{H}}}{\partial\widetilde{v}}= -\frac{\lambda_{\theta}-\lambda_{\widetilde{v}}\,\widetilde{u}+2\,\lambda_{ \widetilde{u}}\,\widetilde{v}}{\widetilde{\tau}} \tag{24}\]  
in which \(\widetilde{t}\) is the independent variable.