# Marine UAV-USV Marsupial Platform: System and Recovery Technic Verification
## 3 Main Method
### Accurate Measurement of High Dynamic Relative Motion of Heterogeneous Platforms
#### 3.2.1 Moving Platform Guidance and Coordinate System Conversion  
The use of space point distance and space positioning principles to achieve moving platform guidance is far from being used for positioning and control of drones. Especially to realize the autonomous recovery of UAVs on high-speed moving USV, it is necessary to convert the local coordinate system on board the USV to the UAV navigation coordinate system-NED (North East Down) coordinate system. The corresponding moving platform guidance and coordinate transformation are shown in Figure 7.  
Based on the position information provided by the mobile platform guidance system, the UAV tracks from the current position, \(P_{2}\), and lands on the center of mass, \(P_{1}\), on the mobile platform. However, the moving platform guidance system is firmly connected to the mobile platform, and the position coordinate information provided is not the coordinates in the navigation coordinate system (NED coordinate system). We set \(T_{1,NED}\), \(T_{2,NED}\), and \(T_{3,NED}\) in the Figure 7 as the three vectors in the NED navigation coordinate system. In addition, \(T_{1,NED}\) in the moving platform guidance coordinate system-ENU (East North Up) is denoted as \(T_{1,ENU}\). \(T_{3,NED}\) in the moving platform body coordinate system is denoted as \(T_{3b,xyz}\). Next, the transformation process from the moving platform guidance coordinate system to the NED navigation coordinate system is described in detail.  
Figure 7: Guidance and coordinate transformation diagram.  
\(T_{3b,xyz}=[xb,yb,zb]\), where \([xb,yb,zb]\) is the origin of the coordinate system of the moving platform guidance system, which can be obtained through actual measurement. First convert the vector \(T_{3b,xyz}\) to the NED coordinate system. For any vector (\(u\)), expressed as \(u^{b}\) in the body coordinate system and \(u^{n}\) in the NED coordinate system, the conversion of the vector \(u^{b}\) to \(u^{n}\) can be realized by the DCM (Direction Cosine Matrix):  
\[u^{n}=Ru^{b} \tag{5}\]  
where \(R\) is the DCM, also known as the attitude matrix or roll matrix, which can be written in the form of Euler angles.  
\[R=\left(\begin{array}{ccc}r_{11}&r_{12}&r_{13}\\ r_{21}&r_{22}&r_{23}\\ r_{31}&r_{32}&r_{33}\end{array}\right)=\left(\begin{array}{ccc}\cos\theta \cos\psi&\sin\phi\sin\theta\cos\psi-\cos\phi\sin\psi&\cos\phi\sin\theta\cos \psi+\sin\phi\sin\psi\\ \cos\theta\sin\psi&\sin\phi\sin\theta\cos\psi+\cos\phi\sin\psi&\cos\phi\sin \theta\cos\psi-\sin\phi\sin\psi\\ -\sin\theta&\sin\phi\cos\theta&\cos\phi\cos\theta\end{array}\right) \tag{6}\]  
According to the above formula, the conversion formula of the vector \(T_{3b,xyz}\) to the NED coordinate system is as follows:  
\[T_{3,NED}=R\bullet T_{3b,xyz} \tag{7}\]  
\(T_{2,ENU}=[xe,yn,zu]\), where \([xe,yn,zu]\) is the ENU coordinate system data output by the moving platform guidance system, and the conversion formula for converting it to the NED coordinate system is as follows:  
\[T_{2,NED}=R_{1}\bullet T_{2,ENU} \tag{8}\]  
where the expression of \(R_{1}\) is as follows:  
\[R_{1}=\left[\begin{array}{ccc}0&1&0\\ 1&0&0\\ 0&0&-1\end{array}\right] \tag{9}\]  
Finally, the vector expression we can provide to the UAV in the NED navigation coordinate system is as follows:  
\[T_{1,NED}=T_{2,NED}+T_{3,NED} \tag{10}\]