# A UAV Wind Field Perception System Inspired by Biological Perception
## 2 Wind Field Calculation Method and Measurement System Construction
### Axis System Conversion and Solution  
Since different variables have different reference systems, axis system conversion is required during calculation. In this paper, we mainly use the conversion between the body axis system and the ground axis system, and the conversion between the airflow axis system and the body axis system. Body Axis System--Ground Axis System  
The motion attitude of the aircraft in the air or the orientation of the body axis system \(Ox_{b}y_{b}z_{b}\) relative to the ground axis system \(O_{g}x_{g}y_{g}z_{g}\) is usually represented by three Euler angles, namely pitch angle \(\theta\), roll angle \(\varphi\), and yaw angle \(\psi\). The pitch angle is the angle between the body axis \(Ox_{b}\) and the horizontal plane \(Ox_{g}y_{g}\). When the aircraft is looking up, it is stipulated that the angle \(\theta\) at this time is positive. The yaw angle is the angle between the projection of the body axis \(Ox_{b}\) on the horizontal plane \(O_{g}x_{g}y_{g}\) and the \(Ox_{g}\) axis, and the angle formed when yawing right is defined as positive. The roll angle is the angle between the symmetry plane of the aircraft and the vertical plane containing the body axis \(Ox_{b}\). The angle at which the aircraft rolls to the right is defined as positive. The body axis system first rotates the angle \(\varphi\) around the \(Ox_{b}\) axis, then rotates the angle \(\theta\) around the \(Oy\) axis at this time, and then rotates the angle \(\psi\) around the rotated \(Oz\) axis (the \(Ox_{g}\) axis in Figure 3); that is, it completes the body axis system to the ground axis system conversion. According to the principle of coordinate axis transformation, the transformation matrix from \(Ox_{b}y_{b}z_{b}\) to \(O_{g}x_{g}y_{g}z_{g}\) can be obtained,  
\[C_{b}^{g}=L_{z}(\psi)L_{y}(\theta)L_{x}(\phi) \tag{2}\]  
Among them, \(L_{z}\), \(L_{y}\), and \(L_{x}\) are all single-axis transformation matrices, and the expressions are as follows:  
\[L_{z}(\psi)= \begin{pmatrix}cos\psi&sin\psi&0\\ -sin\psi&cos\psi&0\\ 0&0&1\end{pmatrix}  \tag{3}\]  
Figure 2: Three-dimensional wind speed calculation principle. \[L_{y}(\theta)= \begin{pmatrix}cos\theta&0&-sin\theta\\ 0&1&0\\ sin\theta&0&cos\theta\end{pmatrix}  \tag{4}\]  
\[L_{x}(\phi)= \begin{pmatrix}1&0&0\\ 0&cos\phi&sin\phi\\ 0&-sin\phi&cos\phi\end{pmatrix}  \tag{5}\]  
After sorting, the rotation matrix is:  
\[C_{b}^{g}= \begin{pmatrix}cos\phi cos\phi&-sin\phi cos\phi+cos\psi sin\phi&sin \psi sin\phi+cos\psi sin\theta cos\phi\\ sin\phi cos\theta&cos\phi cos\phi+sin\psi sin\phi sin\phi&-cos\psi sin\phi+ sin\psi sin\theta cos\phi\\ -sin\theta&cos\theta sin\phi&cos\theta cos\phi\end{pmatrix}  \tag{6}\]  
In the actual flight process, due to the existence of wind, there is an angle between the direction of the aircraft's motion velocity vector and the fuselage, that is, the airflow angle. The airflow angle includes two types: the angle of attack \(\alpha\) and the angle of sideslip \(\beta\), i.e., the angle between the projection of \(\mathbf{V}\) on the symmetry plane of the aircraft and the body axis \(Oxb\). The projection line of the velocity vector \(\mathbf{V}\) is above \(Oxb\), and \(\alpha\) is defined as positive. The sideslip angle is the angle between the flight speed vector \(\mathbf{V}\) and the plane of symmetry of the aircraft, expressed by \(\beta\). The velocity vector \(\mathbf{V}\) is on the right side of the vertical symmetry plane of the fuselage, and \(\beta\) is defined as positive. Rotating the airflow axis system around the \(Oxa\) axis by \(\beta\) angle first, and then rotating around the \(Oya\) axis by \(\alpha\) angle completes the transformation from the airflow system to the machine system. The corresponding rotation matrix is:  
\[C_{a}^{b}= \begin{pmatrix}cosacos\beta&-cosasin\beta&-sin\alpha\\ sin\beta&cos\beta&0\\ sin\alpha cos\beta&-sinasin\beta&cos\alpha\end{pmatrix}  \tag{7}\]  
The airspeed vector under the aircraft system in the formula is  
\[\mathbf{V}_{a}^{b}=C_{a}^{b} \begin{pmatrix}V_{a}^{a}\\ 0\\ 0\end{pmatrix} =