# Three-Dimensional Guidance Laws for Spacecraft Propelled by a SWIFT Propulsion System
## 2 Thrust Vector Model for Trajectory Design in a 3D Mission Scenario
#### Maximization of the Projection of Vector \(\mathbf{a}\) along a Given Direction  
Consider a given direction in the RTN reference frame, which is indicated by the unit vector \(\hat{\mathbf{d}}\); see the scheme of Figure 4. According to that figure, the unit vector \(\hat{\mathbf{d}}\) is defined by the two angles \(a_{d}\in[0,\,\pi]\) rad and \(\delta_{d}\in[0,\,2\pi]\) rad, which play the same role as the two control angles \(\{\alpha,\delta\}\) in the case of the unit vector \(\hat{\mathbf{t}}\); compare Figure 4 with the sketch in Figure 3.  
The problem addressed here is to find the values of the two control angles, \(\alpha^{\star}\) and \(\delta^{\star}\), that maximize the projection of \(\mathbf{a}\) along the (assigned) direction of \(\mathbf{\hat{d}}\). This corresponds to maximize the scalar index \(P\) defined as the dot product of the two vectors \(\mathbf{a}\) and \(\mathbf{\hat{d}}\), viz. \[P\triangleq\mathbf{a}\cdot\mathbf{\hat{d}} \tag{10}\]  
In this context, bearing in mind Equations (8) and (9), the scalar index \(P\) to be maximized becomes  
\[P=\frac{a_{c}}{1+K}\left(\frac{r_{\oplus}}{r}\right)^{2}\left[(1+K\,\cos\alpha )\cos\alpha_{d}+K\,\sin\alpha\cos\delta\,\sin\alpha_{d}\cos\delta_{d}+K\,\sin \alpha\sin\delta\,\sin\alpha_{d}\sin\delta_{d}\right] \tag{11}\]  
Accordingly, the previous equation and the necessary condition \(\partial P/\partial\delta=0\) give the value \(\delta=\delta^{\star}\) of the clock angle that maximizes the scalar index \(P\) as  
\[\delta^{\star}=\delta_{d} \tag{12}\]  
which indicates that the three vectors \(\mathbf{\hat{i}}_{\text{R}}\), \(\mathbf{\hat{d}}\), and \(\mathbf{a}\) always belong to the same plane. Bearing in mind that the maximum value of the cone angle \(\alpha\) is constrained by \(\alpha_{\text{max}}\), Equation (11) and the necessary condition \(\partial P/\partial\alpha=0\) give the value of \(\alpha=\alpha^{\star}\) that maximizes \(P\), viz. \[\alpha^{\star}= \begin{cases}\alpha_{d}&\text{if }\alpha_{d}\leq\alpha_{\text{max}} \\ \alpha_{\text{max}}&\text{otherwise}\end{cases}  \tag{13}\]  
Note that Equations (12) and (13) indicate that the unit vector \(\mathbf{\hat{t}}\) coincides with \(\mathbf{\hat{d}}\) when \(\alpha_{d}\leq\alpha_{\text{max}}\). Moreover, Equations (12) and (13) can be used to obtain a compact expression of the unit vector \(\mathbf{\hat{t}}\) (indicated with the superscript \(\star\)), which maximizes the scalar index \(P\). In fact, recalling that \(\mathbf{\hat{i}}_{\text{R}}\equiv\mathbf{\hat{r}}\), one has  
\[\mathbf{\hat{t}}^{\star}= \begin{cases}\mathbf{\hat{d}}&\text{if }\alpha_{d}\leq\alpha_{ \text{max}}\\ \frac{\sin(\alpha_{d}-\alpha_{\text{max}})}{\sin\alpha_{d}}\,\mathbf{ \hat{p}}+\frac{\sin\alpha_{\text{max}}}{\sin\alpha_{d}}\,\mathbf{\hat{d}}&\text{if }\alpha_{d}\in(\alpha_{\text{max}},\,180\,\text{deg}) \end{cases}  \tag{14}\]  
where \(\alpha_{d}\in[0,\,180)\,\text{deg}\) is given by  
\[\alpha_{d}=\arccos\left(\mathbf{\hat{d}}\cdot\mathbf{\hat{r}}\right) \tag{15}\]  
In other terms, when \(\alpha_{d}>\alpha_{\text{max}}\), the direction of the unit vector \(\mathbf{\hat{d}}\) belongs to a cone of an aperture equal to \(2\,(180\,\text{deg}-\alpha_{\text{max}})\), whose axis coincides with the radial direction. The situation is illustrated in Figure 5, where the red cone indicates the forbidden zone related to the presence of the SWIFT conical mesh of conducting wires.