# Analytical Attitude Guidance Planner for Multiple Ground Targets Acquisitions
## 4 Attitude Point-to-Point Generator  
Generally, the satellite's initial attitude is far away from the initial attitude required by the \(ATPG\) phase. For instance, when passing from the old ground target to the new ground target, the satellite must be maneuvered from the old attitude to the new required  
Figure 4: Second rotation around \(\hat{\mathbf{n}}_{1}\): the \(PRF\) is represented before (**left**) and after (**right**) the rotation. Figure 3: First rotation around \(\widehat{O_{2}O_{3}}\): the \(PRF\) is represented before (**left**) and after (**right**) the rotation. pointing direction. This problem can be identified as a boundary value problem in which the constraints of Equations (4) and (10) must be satisfied during the entire path. In the _APPG_ phase, the guidance is approximated by means of polynomials which always return mathematical solutions for the point-to-point problem even though their feasibility is not guaranteed and must be verified. The entire maneuver is split into three different steps to obtain an analytical solution, verify the boundary conditions, and reach the desired attitude. The three steps are schematized in Figure 5 and summarized in the following list. **Step 1. **: The satellite arrests its motion and reaches its final attitude \(\mathbf{q}_{f_{1}}\). **Step 2. **: A rest-to-rest maneuver from \(\mathbf{q}_{f_{1}}\) to a proper switching attitude \(\mathbf{q}_{f_{2}}\) is performed. **Step 3. **: The satellite motion is accelerated from \(\mathbf{q}_{f_{2}}\) until it reaches the final attitude \(\mathbf{q}_{f}\), the final angular velocity and final acceleration. The whole path 1-2-3 in Figure 5 changes as a function of \(\mathbf{q}_{f_{1}}\) and \(\mathbf{q}_{f_{2}}\) which depend on the variables \(f_{f_{1}}\), \(t_{f_{2}}\), and \(t_{f_{3}}\), representing the duration of each step, as will be shown in the following paragraphs. The objective of this work is to achieve a guidance trajectory of minimum duration. Consequently, the variables \((t_{f_{1}}\), \(t_{f_{2}}\), \(t_{f_{3}})\) must be selected so that the entire guidance path generates a fast (near minimum-time) maneuver satisfying the constraints of maximum speed and angular acceleration. The evaluation of the guidance is provided by calculating step 1 and step 3, whose results are used as input in step 2. **APPG-Step 1. **:  
Starting from the initial conditions, the attitude guidance is generated to slow the satellite down to a stop. Hence, with reference to Figure 5, boundary constraints are imposed only on angular velocity and acceleration as  
\[ \begin{cases}\omega_{i}(0)=\omega_{i_{0}};\ \omega_{i}(t_{f_{1}})=0\\ \dot{\omega}_{i}(0)=\dot{\omega}_{i_{0}};\ \dot{\omega}_{i}(t_{f_{1}})=0,\end{cases}  \tag{14}\]  
where \(t_{f_{1}}\) is the maneuver time of this first phase and \(i=x,y,z\). The boundary conditions are four (\(m=4\)) and the degree of the polynomial is equal to \(n=m-1=3\) (the number of polynomial coefficients is equal to the degree plus one). Thus, the polynomial expression of \(\omega_{i}(t)\) can be expressed as  
Figure 5: Conceptual scheme of the three _APPG_ steps. This scheme is valid for each component of \(\omega\) and \(\dot{\omega}\), the subscript \(i\), \(i=x,y,z\) has been removed for simplicity. The trajectories are only for clarification purposes and not descriptive of a real scenario. \[\omega_{i}(t)=a_{i3}t^{3}+a_{i2}t^{2}+a_{i1}t+a_{i0}, \tag{15}\]  
where \([a_{i3},\ a_{i2},\ a_{i1},\ a_{i0}]\) are the polynomial coefficients. The conditions in Equation (14) can be used to evaluate the four polynomial coefficients of the \(i^{th}\) angular velocity component in Equation (15). A system of four equations with four unknowns is obtained  
\[ \begin{cases}a_{i0}=\omega_{i0};&a_{i3}t_{f_{1}}^{3}+a_{i2}t_{f_{1}}^{2}+a_{i1 }t_{f_{1}}+a_{i0}=0\\ a_{i1}=\dot{\omega}_{i0};&3a_{i3}t_{f_{1}}^{2}+2a_{i2}t_{f_{1}}+a_{i1}=0.\end{cases}  \tag{16}\]  
By substituting \(a_{i0}=\omega_{i0}\) and \(a_{i1}=\dot{\omega}_{i0}\) in Equation (16), \(a_{i2}\) and \(a_{i3}\) can be evaluated.