## 2 Trajectory Design and Optimization
### Trajectory Optimization: Unconstrained Case  
The time variation in the sail clock angle during the interplanetary transfer is obtained by solving an optimization problem in which the performance index to _maximize_ is \(J=-\Delta t\), where \(\Delta t=t_{f}-t_{0}\equiv t_{f}\) is the flight time (\(t_{f}\) is the final time instant) required to complete the heliocentric transfer between two assigned Keplerian orbits. In this case, the angular position of the spacecraft both along the parking orbit (at time \(t_{0}\)) and along the target orbit (at time \(t_{f}\)) is left free, so that the problem considered here is a classical obit-to-orbit optimal transfer without ephemeris constraints.  
The procedure used to solve the optimization problem parallels the approach discussed in Ref. [9]. More precisely, an indirect method [22; 23; 24] is used to determine the spacecraft rapid transfer trajectory, while the Pontryagin Maximum Principle (PMP) [25; 26; 27] is employed to obtain the optimal control law in terms of the variation in the sail clock angle during the flight. The approach used is standard and has been discussed in several articles by authors. For this reason, only the calculation of the optimal control law is discussed here, since the analytical expression obtained is new and extends the literature results related to the (optimal) performance of a gradient-index solar sail [1]. In this subsection, we assume that the sail clock angle is freely selectable within the range \([0,\,360]^{\circ}\), while the next subsection discusses the case where \(\delta\) can take a finite set of values.  
In order to use the PMP to obtain the optimal control law, we first determine the expression of the part of the Hamiltonian function \(\mathcal{H}_{c}\) that depends explicitly on the control parameter \(\delta\). To this end, firstly note that the clock angle appears in the expressions of \(a_{p_{T}}\) and \(a_{p_{N}}\), see Equations (6) and (7), and observe that the two components \(\{a_{p_{T}},\,a_{p_{N}}\}\) appear in the expressions of the time-derivative of the generic modified equinoctial orbital element, see Equations (9)-(14). Introducing the six adjoint variables \(\{\lambda_{p},\,\lambda_{f},\,\lambda_{g},\,\lambda_{h},\,\lambda_{k},\, \lambda_{L}\}\)[22; 23], we obtain the following expression of \(\mathcal{H}_{c}\)  
\[\mathcal{H}_{c}=\frac{a_{c}\Big{(}\frac{r_{\oplus}}{r}\Big{)}^{2}\sqrt{\frac{ p}{\mu_{\odot}}}}{1+f\,\cos L+g\,\sin L}[T\,\cos\delta+N\,\sin\delta] \tag{16}\]  
where \(\{T,N\}\) are two auxiliary functions defined as  
\[T\triangleq 2p\lambda_{p}\eta_{m}+[(2+f\,\cos L+g\,\sin L)\, \cos L+f]\lambda_{f}\eta_{m}+\\ +[(2+f\,\cos L+g\,\sin L)\,\sin L+f]\lambda_{g}\eta_{m} \tag{17}\]  
\[N\triangleq-g\,(h\,\sin L-k\,\cos L)\lambda_{f}\eta_{n}+f\,(h\, \sin L-k\,\cos L)\lambda_{g}\eta_{n}+\cos L\frac{1+h^{2}+k^{2}}{2}\lambda_{h}  
According to the PMP, the optimal value of the clock angle is the one that maximizes at each time instant the value of \(\mathcal{H}_{c}\). Bearing in mind Equation (16), this corresponds to selecting the value of \(\delta\) that maximizes \((T\,\cos\delta+N\,\sin\delta)\), viz.,  
\[\cos\delta=\frac{T}{\sqrt{T^{2}+N^{2}}}\quad,\quad\sin\delta=\frac{N}{\sqrt{T^{ 2}+N^{2}}} \tag{19}\]  
where \(\{T,N\}\) are given by Equations (17) and (18).