# Analytical Attitude Guidance Planner for Multiple Ground Targets Acquisitions
## 4 Attitude Point-to-Point Generator
### Near Optimal Time
#### 4.1.1 Maneuver Time for Step 1  
Starting from the first constraint in Equation (42), \(\omega_{i}\) and \(\dot{\omega}_{i}\) can be written in explicit form as a function of the only unknown \(t_{f_{1}}\). In fact, the coefficients \(a_{ij}\), \(t_{\omega_{max_{1}}}\), and \(t_{\omega_{max_{1}}}\) are functions of \(t_{f_{1}}\), as stated in Equation (19), Equation (21), and Equation (22). Thus, the two polynomials can be written as follows: \begin{table}
\begin{tabular}{c c c} \hline \hline
**Step 1** & **Step 2** & **Step 3** \\ \hline Constraints on each & Constraints on the & Constraints on each \\ component & magnitude only & \\ \(\omega_{i}\) from Equation (15), & \(\omega\) by differentiating Equation (29), & \(\omega_{i}\) as in Equation (15), \\ \(t_{\omega_{max_{1}}}\) from Equation (22). & \(t_{\omega_{max_{2}}}\) from Equation (38). & \(t_{\omega_{max_{1}}}\) as in Equation (22). \\ \(i=x,y,z\) & & \(i=x,y,z\) \\ \(\begin{cases}|\omega_{i}(t=t_{\omega_{max_{1}}})|\leq\omega_{max}\\ |\dot{\omega}_{i}(t=t_{\omega_{max_{1}}})|\leq\dot{\omega}_{max}\end{cases}\) & \(\begin{cases}|\omega(t=t_{\omega_{max_{2}}})|\leq\omega_{max}\\ |\dot{\omega}(t=t_{\omega_{max_{2}}})|\leq\dot{\omega}_{max}\end{cases}\) & \(\begin{cases}|\omega_{i}(t=t_{\omega_{max_{3}}})|\leq\omega_{max}\\ |\dot{\omega}_{i}(t=t_{\omega_{max_{3}}})|\leq\dot{\omega}_{max}\end{cases}\) \\ \hline \hline \end{tabular}
\end{table} 
Table 1: APPG summary considering the most relevant definitions and the imposed path constraints. \[ \begin{split}\left|\frac{\dot{\omega}_{i_{0}}^{3}t_{f_{1}}^{3}(2 \omega_{i_{0}}+\dot{\omega}_{i_{0}}t_{f_{1}})}{(6\omega_{i_{0}}+3\dot{\omega}_{ i_{0}}t_{f_{1}})^{3}}-\frac{\dot{\omega}_{i_{0}}^{2}t_{f_{1}}^{2}(3\omega_{i_{0}}+ \dot{\omega}_{i_{0}}t_{f_{1}})}{(6\omega_{i_{0}}+3\dot{\omega}_{i_{0}}t_{f_{1} })^{2}}+\omega_{i_{0}}\right|=\omega_{max}\\ \left|\dot{\omega}_{0}-\frac{(3\omega_{i_{0}}+2\dot{\omega}_{i_{0} }t_{f_{1}})^{2}t_{f_{1}}}{3(2\omega_{i_{0}}+\dot{\omega}_{i_{0}}t_{f_{1}})} \right|=\dot{\omega}_{max}\end{split}  \tag{43}\]  
Equation (43) can be rewritten without the absolute value and the system becomes a system of four equations, two for each absolute value,  
\[ \begin{split}\frac{\dot{\omega}_{i_{0}}^{3}t_{f_{1}}^{3}(2 \omega_{i_{0}}+\dot{\omega}_{i_{0}}t_{f_{1}})}{(6\omega_{i_{0}}+3\dot{\omega} _{i_{0}}t_{f_{1}})}-\frac{\dot{\omega}_{i_{0}}^{2}t_{f_{1}}^{2}(3\omega_{i_{0 }}+\dot{\omega}_{i_{0}}t_{f_{1}})}{(6\omega_{i_{0}}+3\dot{\omega}_{i_{0}}t_{f _{1}})^{2}}+\omega_{i_{0}}=\pm\omega_{max}\\ \dot{\omega}_{0}-\frac{(3\omega_{i_{0}}+2\dot{\omega}_{i_{0}}t_{f _{1}})^{2}}{3(2\omega_{i_{0}}+\dot{\omega}_{i_{0}}t_{f_{1}})t_{f_{1}}}=\pm \dot{\omega}_{max}\end{split}  \tag{44}\]  
Rearranging the terms in Equation (44),  
\[ \begin{split} 4\dot{\omega}_{i_{0}}^{3}t_{f_{1}}^{3}+9\dot{\omega}_{i_{ 0}}^{2}(4\omega_{i_{0}}\pm 3\omega_{max})t_{f_{1}}^{2}+108\dot{\omega}_{i_{0}} \omega_{i_{0}}^{2}(\omega_{i_{0}}\pm\omega_{max})t_{f_{1}}+108\omega_{i_{0}}^ {2}(\omega_{i_{0}}\pm\omega_{max})=0\\ \dot{\omega}_{i_{0}}(\dot{\omega}_{i_{0}}\pm 3\dot{\omega}_{max})t_{f_{1 }}^{2}+6\omega_{i_{0}}(\dot{\omega}_{i_{0}}\pm\dot{\omega}_{max})t_{f_{1}}+(9 \omega_{i_{0}}^{2})=0\end{split}  \tag{45}\]  
While the solution of the second-degree equation is straightforward, the cubic one requires much more mathematical effort. In this work, we follow the solution reported by [PERSON] et al. [40]. As a consequence, Equation (45) is solvable in closed form: for each \(i^{th}\) component of the angular velocity, six roots can be calculated from the first equation, which are identified with the symbol \(t_{f_{1}}^{\omega_{j}}\); three of the six solutions are given by imposing \(+\omega_{max}\) and the other three by imposing \(-\omega_{max}\). Then, for each \(i^{th}\) component of the angular acceleration, four roots are evaluated from the second equation, which are identified with the symbol \(t_{f_{1}}^{\omega_{j}}\).