## 5 Multi-Drone Guidance Law
### Guidance Law of Every Drone  
We let multiple drones form a planar grid formation, such that the formation is perpendicular to the line segment connecting the target and the formation center. The grid formation can be considered a \"net\" structure for capturing the incoming target. By maximizing the grid formation size, we can increase the capture rate, even when there exists error in the prediction of the target's position. Since the target is guided to hit its goal (ship), the drones can effectively block the target using this grid formation. We next handle the guidance law of a drone for the generation of the grid formation. At sample-index \(k\), let _grid formation_ denote a planar formation composed of \(G\times G\) cells, each with _side length_\(s_{k}\). The grid formation is centered at the virtual agent, and we adjust the grid formation so that it is normal to \(l(\mathbf{r}_{k}^{t},\mathbf{r}_{0,k})\) at each sample-index \(k\). We change the pitch and yaw of the virtual agent, but we do not change the roll of the virtual agent. Thus, the grid formation does not roll either. Let \(\mathbf{r}_{k}^{R}=\mathbf{r}_{k}^{t}-\mathbf{r}_{0,k}\) denote the relative position of the target with respect to the virtual agent at sample-index \(k\). At each sample-index \(k\), the planar grid formation is oriented, such that the formation plane is perpendicular to \(\mathbf{r}_{k}^{R}\). For \(i\in\{0,1,2,\ldots,G-1\}\) and \(j\in\{0,1,\ldots,G-1\}\), let \(n[i,j]\) be defined as  
\[n[i,j]=1+i+G*j. \tag{33}\]  
Since \(i\in\{0,1,2,\ldots,G-1\}\) and \(j\in\{0,1,2,\ldots,G-1\}\), we have  
\[n[i,j]\in\{1,2,\ldots,M=G^{2}\}. \tag{34}\]Here, Equation (4) is used. Using Equations (33) and (34), the drone index \(n\in\{1,2,\ldots,M=G^{2}\}\) has its associated \(n[i,j]\). For \(i\in\{0,1,2,\ldots,G-1\}\) and \(j\in\{0,1,\ldots,G-1\}\), let  
\[\mathbf{w}_{n[i,j],k}^{B}=(0,-\frac{s_{k}*G}{2}+i*s_{k},-\frac{s_{k}*G}{2}+j*s_ {k})^{T} \tag{35}\]  
denote the \(n\)-th drone's waypoint in the body-fixed frame at sample-index \(k\). See that these \(G\times G\) waypoints are generated on the \(yz\) plane in the body-fixed frame. From now on, \(n\) denotes \(n[i,j]\) for notation simplicity. In the case where we set \(G=1\), we use only one drone. In this case, the grid formation cannot be generated. If we use only one drone, then the drone's waypoint in the body-fixed frame is set as  
\[\mathbf{w}_{1,k}^{B}=(0,0,0)^{T}, \tag{36}\]  
instead of Equation (35). Equation (36) is used to make the single drone move towards the virtual agent. In other words, the waypoint of the drone is set as the virtual agent. At sample-index 0, all drones are located inside the grid cell of the ship. At sample-index 0, the planar grid formation's orientation (normal vector) is represented as initial yaw \(\psi_{0}=0\) and initial pitch \(\theta_{0}=\pi/2\), respectively. Under Equation (3), the \(n\)-th drone's initial position is located at \(\mathbf{w}_{n,0}\), which is given as  
\[\mathbf{w}_{n,0}=\mathbf{M}_{R}(0,\pi/2)*\mathbf{w}_{n,0}^{B}. \tag{37}\]  
Equation (37) implies that all drones are initially located to form the grid formation with side length \(s_{0}\). Once the drones are launched from the ship, the planar grid formation at each sample-index \(k\) is oriented, such that it becomes perpendicular to \(\mathbf{r}_{k}^{R}=\mathbf{r}_{k}^{t}-\mathbf{r}_{0,k}\). The unit vector associated with \(\mathbf{r}_{k}^{R}\) is  
\[\mathbf{u}^{R}=(\mathbf{u}^{R}(1),\mathbf{u}^{R}(2),\mathbf{u}^{R}(3))^{T}, \tag{38}\]  
where \(\mathbf{u}^{R}=\frac{\mathbf{r}_{k}^{R}}{\|\mathbf{r}_{k}^{R}\|}\). At each sample-index \(k\), the planar grid formation's orientation (normal vector) is represented as \(\psi_{k}\) and \(\theta_{k}\), respectively. Since the virtual agent does not rotate, the formation's orientation does not include rolling motions.