Landing Attitude Angle Measurement for Fixed-Wing Drones Based on Monocular Vision

Autonomous landing of fixed-wing drones in Global Navigation Satellite System (GNSS)-denied or degraded environments remains a critical challenge due to the stringent requirements on attitude accuracy and real-time performance. Unlike rotary-wing drones that can hover, fixed-wing drones must land via a gliding approach, which demands precise control of pitch, roll, and yaw angles to follow a safe trajectory. Inertial navigation systems suffer from long-term drift, while GNSS signals are vulnerable to interference and cannot be relied upon in complex operational scenarios. Vision-based navigation offers a promising alternative by leveraging onboard cameras to estimate the drone’s relative pose with respect to a known cooperative target on the ground. In this paper, we propose a complete framework for attitude angle measurement of fixed-wing drones using a monocular camera. The system uses a Quick Response (QR) code as the cooperative target, which is robust to partial occlusion and illumination variations due to its built-in error correction. We employ the lightweight YOLOv5s detector to locate the entire QR code in real time, and then apply a novel texture enhancement network (MUnet) to mitigate the effects of non‑uniform lighting, reflection, and motion blur commonly encountered during landing. After enhancement, the position detection patterns (PDPs) of the QR code are precisely extracted and fed into the EPnP algorithm to solve for the rotation matrix and translation vector, from which the three attitude angles are calculated. Extensive experiments show that our method achieves an average attitude angle error of only 0.39° and a detection speed of 83.33 frames per second, satisfying both the accuracy and real‑time requirements of fixed-wing drone landing.

Fixed-wing drone in flight

1. Introduction

The rapid development of fixed-wing drones has opened up a wide range of applications in surveillance, logistics, agriculture, and emergency response. A robust and precise autonomous landing capability is essential for these missions, especially when GNSS signals are unavailable or unreliable. Visual navigation has emerged as a key technology because of its passive operation, low cost, and high information content. Among the various approaches, the use of a cooperative target (such as a patterned marker) on the landing field is a common solution for providing known reference points that enable accurate pose estimation. However, the high speed and dynamic conditions of fixed-wing drones impose demanding constraints on both the accuracy and the latency of attitude measurement.

Many existing works focus on rotary-wing drones, which have simpler landing dynamics because they can hover. For fixed-wing drones, the landing process involves continuous forward motion, and the attitude angles must be estimated with errors less than 1° to prevent runway departure or damage. Moreover, the visual data captured during landing often suffer from degradation due to environmental factors: sunlight creates strong shadows and glares, the drone’s motion introduces blur, and the fast‑changing background makes detection unstable. Therefore, a robust detection algorithm that can handle texture degradation is necessary.

In this paper, we present a monocular vision‑based attitude measurement system specifically designed for fixed-wing drones. Our main contributions are three‑fold:

  • We design a cooperative target based on a QR code, which provides four PDP control points and benefits from high fault tolerance and error correction.
  • We adopt YOLOv5s for real‑time object detection and compare it with other state‑of‑the‑art detectors. To address illumination‑induced failures, we propose a lightweight image enhancement network (MUnet) that effectively restores the texture of degraded QR codes before the second stage of PDP detection.
  • We integrate the enhanced detection with the EPnP algorithm to compute the drone’s attitude angles, achieving a mean error of 0.39° at a frame rate of 83.33 FPS, outperforming previous approaches.

2. Attitude Angle Measurement Theory

2.1 Coordinate Systems and Transformations

The pinhole camera model is used to relate a 3D point in the world coordinate system (WCS) to its 2D projection in the image. Four coordinate systems are involved: the world coordinate system $$O_WX_WY_WZ_W$$, the camera coordinate system $$O_CX_CY_CZ_C$$, the image coordinate system $$oxy$$, and the pixel coordinate system $$uv$$. The transformation from the world to the camera frame is a rigid body motion given by:

$$
\mathbf{P}_C = \mathbf{R}_{W2C} \mathbf{P}_W + \mathbf{T}_{W2C}
$$

where $$\mathbf{R}_{W2C}$$ is the rotation matrix and $$\mathbf{T}_{W2C}$$ is the translation vector. The rotation matrix can be expressed in terms of Euler angles (yaw $$\theta$$, pitch $$\phi$$, roll $$\omega$$) as:

$$
\mathbf{R}_{W2C} =
\begin{bmatrix}
\cos\theta\cos\omega & \cos\theta\sin\omega\sin\phi – \sin\theta\cos\phi & \cos\theta\sin\omega\cos\phi + \sin\theta\sin\phi \\
\sin\theta\cos\omega & \sin\theta\sin\omega\sin\phi + \cos\theta\cos\phi & \sin\theta\sin\omega\cos\phi – \cos\theta\sin\phi \\
-\sin\omega & \cos\omega\sin\phi & \cos\omega\cos\phi
\end{bmatrix}
$$

2.2 Relationship Between Drone and Camera Frames

The camera is rigidly mounted on the fixed-wing drone. Let the drone coordinate system (DCS) be defined with its origin at the drone’s center of gravity, $$Y_D$$ pointing forward along the fuselage, $$Z_D$$ upward, and $$X_D$$ to the right. The transformation between the camera and drone frames is known from the installation parameters:

$$
\mathbf{P}_C = \mathbf{R}_{D2C} \mathbf{P}_D + \mathbf{T}_{D2C}
$$

where $$\mathbf{R}_{D2C}$$ depends on the fixed mounting angles $$(\alpha, \beta, \gamma)$$ between the two frames. Combining this with the world-to-camera transformation, we obtain the world-to-drone transformation:

$$
\mathbf{R}_{W2D} = \mathbf{R}_{C2D} \mathbf{R}_{W2C}, \quad \mathbf{T}_{W2D} = \mathbf{R}_{C2D}(\mathbf{T}_{W2C} – \mathbf{T}_{C2D})
$$

The attitude angles of the fixed-wing drone (yaw, pitch, roll) are directly extracted from the rotation matrix $$\mathbf{R}_{W2D}$$.

2.3 EPnP Algorithm

The Perspective‑n‑Point (PnP) problem involves estimating the camera pose from n 3D‑to‑2D point correspondences. EPnP (Efficient PnP) is a non‑iterative solution that represents all 3D points as a weighted sum of four virtual control points. The problem reduces to solving for the coordinates of these control points. Let $$\mathbf{c}_j^w (j=1,…,4)$$ be the control points in the world coordinate system, and for each reference point $$\mathbf{p}_i^w, \; i=1,…,n$$, we have:

$$
\mathbf{p}_i^w = \sum_{j=1}^{4} \alpha_{ij} \mathbf{c}_j^w, \quad \sum_{j=1}^{4} \alpha_{ij}=1
$$

After projecting the control points onto the image, we obtain a linear system that can be solved to find the camera pose. The rotation matrix and translation vector are then obtained from the control points’ coordinates. EPnP is known for its high accuracy and efficiency, requiring only O(n) complexity.

3. Cooperative Target Design and Detection

3.1 QR Code as Cooperative Target

We design a cooperative target using a standard QR code pattern. The QR code contains three PDPs at the corners and a fourth PDP at the center (as required by EPnP which needs at least four non‑coplanar control points). The PDP consists of alternating black‑white‑black squares that are easily detected in well‑illuminated conditions. The QR code’s built‑in error correction coding provides resilience against partial damage or dirt, which is beneficial for landing environments. Figure 2 (not shown here) illustrates the target and its PDP detection result.

3.2 Detection Algorithm: YOLOv5s

To achieve real‑time detection on the fixed-wing drone’s embedded processor, we select YOLOv5s, which is the smallest model in the YOLOv5 family. It uses a CSPDarknet backbone, a PANet neck, and a coupling head. The model size is only 27.8 MB, enabling high‑speed inference. We compare YOLOv5s with Faster R‑CNN, YOLOv3, and other YOLOv5 variants on our custom dataset of 8,000 QR code images captured under various flight conditions.

Table 1: Performance comparison of different detection algorithms
Algorithm mAP@0.5 (%) FPS Model Size (MB)
Faster R‑CNN 98.00 18.32 301
YOLOv3 96.05 32.35 246
YOLOv5m 98.01 53.50 84
YOLOv5l 98.28 33.33 192
YOLOv5x 98.29 26.22 367
YOLOv5s 98.00 83.33 27.8

As shown in Table 1, YOLOv5s achieves the highest frame rate (83.33 FPS) while maintaining a competitive mAP of 98.00%, making it the best trade‑off for fixed-wing drone applications. The detection speed is critical because the drone’s attitude must be updated at a high rate for stable control.

4. Robust Detection Under Illumination Degradation

4.1 Problem Analysis

In real flight tests, images captured by onboard cameras often suffer from severe non‑uniform illumination, specular reflections, and motion blur. When we directly apply YOLOv5s to detect the three PDPs inside the QR code, many frames fail to detect all required control points. The detection rate of individual PDPs drops dramatically, sometimes to zero. However, detecting the whole QR code is much more robust (accuracy >95%). To resolve this, we first detect the entire QR region, then perform texture enhancement on that region, and finally detect the PDPs in the enhanced image. This two‑stage approach significantly improves detection accuracy.

4.2 Lightweight MUnet for Texture Enhancement

We propose a modified U‑Net architecture for image restoration, replacing the heavy VGG16 backbone with MobileNetV2. This Lightweight MUnet reduces the parameter count drastically while preserving the ability to recover fine textures. The encoder part uses the MobileNetV2 structure with inverted residuals and linear bottlenecks; the decoder uses standard up‑convolution blocks. Skip connections link corresponding feature levels. The network is trained on a dataset of 8,000 real and synthetic degraded QR code images to learn a mapping from low‑quality to high‑quality textures.

Table 2: MobileNetV2 network structure parameters used in the encoder of MUnet
Input Operator Expansion factor t Channels c Layers n Stride s
224² × 3 conv2d — 32 1 2
112² × 32 bottleneck 1 16 1 1
112² × 16 bottleneck 6 24 2 2
56² × 24 bottleneck 6 32 3 2
28² × 32 bottleneck 6 64 4 2
14² × 64 bottleneck 6 96 3 1
14² × 96 bottleneck 6 160 3 2
7² × 160 bottleneck 6 320 1 1
7² × 320 conv2d — 1280 1 1
7² × 1280 avgpool — — 1 —
1×1×1280 conv2d — k — —

The training uses a batch size of 8, cross‑entropy loss, and 1000 epochs. Table 3 summarises the inference performance of MUnet on a validation set of 2,000 images.

Table 3: Inference performance of MUnet for QR code texture enhancement
Precision Recall F1‑score IoU Inference time per image (s)
0.945 0.907 0.923 0.862 0.0067

The extremely short inference time (6.7 ms per image) makes MUnet suitable for real‑time processing on the drone’s onboard computer. After enhancement, the PDP patterns become clearly visible even in previously degraded images, as confirmed by the subsequent detection.

4.3 Integrated Detection Pipeline

Our whole pipeline consists of the following steps:

  1. Acquire an image from the monocular camera.
  2. Run YOLOv5s to detect the entire QR code crop the bounding box region.
  3. Feed the cropped QR image into MUnet to obtain an enhanced version.
  4. On the enhanced image, run YOLOv5s again (on the same crop) to detect the four PDPs.
  5. Extract the pixel coordinates of the centers of the four PDPs.
  6. Use EPnP to compute the rotation matrix and translation vector, then derive attitude angles.

Compared with directly detecting PDPs in the original image, our pipeline improves the mAP from 33.27% to 96.35% on a test set of 500 challenging images.

5. Experimental Results

5.1 Experimental Setup

We conduct real‑world tests using a DJI Zenmuse Z30 camera mounted on a fixed-wing drone platform. The drone performs landing approaches from different altitudes and initial attitudes. Seven groups of experiments are designed, with the ground‑truth attitude angles set as shown in Table 4. For each group, the drone flies along a predefined glideslope while the onboard camera captures the QR code target placed on the runway. The captured video is converted to image sequences for off‑line evaluation. The attitude benchmark values are obtained from a high‑precision IMU/GNSS integrated navigation system.

Table 4: Ground‑truth attitude angles for seven experimental groups
Group Pitch (°) Yaw (°) Roll (°)
1 0 0 0
2 0 10 0
3 0 ‑10 0
4 ‑10 0 0
5 ‑20 0 0
6 0 0 5
7 0 0 ‑5

5.2 Attitude Angle Measurement Accuracy

For each group, we compute the mean absolute error (MAE) over all valid frames. The results are presented in Table 5.

Table 5: Attitude angle measurement errors using the proposed YOLOv5s + MUnet + EPnP method
Group Pitch error (°) Yaw error (°) Roll error (°) Average error (°)
1 0.61 0.90 0.07 0.53
2 0.55 0.12 0.06 0.24
3 0.55 0.30 0.07 0.31
4 ‑0.27 0.04 0.04 0.12
5 ‑1.14 0.63 0.02 0.60
6 0.42 ‑0.54 0.06 0.34
7 0.70 0.93 0.07 0.57
Mean 0.61 0.49 0.06 0.39

The overall mean attitude angle error is only 0.39°, which is well within the typical requirement for fixed-wing drone landing (usually less than 1°). The roll angle error is particularly low (average 0.06°) because the landing approach is mostly straight with little roll variation. The pitch and yaw errors are slightly larger but still acceptable. The frame rate of 83.33 FPS ensures that the control loop can run at a comfortable frequency (e.g., 50 Hz) without delay.

We also compare our method with a baseline using Faster R‑CNN + PnP (as in literature). While the baseline achieved an average error of about 0.63° and a frame rate of only 18 FPS, our algorithm reduces the error by 38% and improves speed by 96%, demonstrating the clear advantage of the proposed combination.

6. Conclusion

In this study, we have developed a monocular vision‑based attitude angle measurement system tailored for fixed-wing drones during autonomous landing. The core innovations lie in the robust detection pipeline that first identifies the entire QR code via YOLOv5s, then enhances its texture with a lightweight MUnet, and finally extracts the four PDPs for EPnP‑based pose estimation. Extensive real‑world experiments confirm that the system achieves an average attitude error of 0.39° and operates at 83.33 frames per second, fulfilling both the accuracy and real‑time requirements of fixed-wing drone landing. The proposed texture enhancement module effectively mitigates the adverse effects of lighting variations and motion blur, making the system reliable in challenging outdoor environments. Future work will focus on integrating the algorithm into the drone’s onboard hardware and combining it with inertial sensors for increased robustness during severe weather conditions or when the cooperative target is partially occluded.

Scroll to Top