# UAV-Based Airport Lights Inspection Without GNSS Positioning Support
## 3 Materials and Methods
### View Angle Calculation  
The course of light position changes paired with the camera positions enables the calculation of the view angle changes. The view angle is determined in the vertical plane \(\alpha_{\rm v}\) in parallel with the axis of the runway and in the horizontal plane \(\alpha_{\rm h}\) perpendicular to the runway axis.  
Figure 4: Example of detected lights.  
Figure 5 illustrates the calculation of the view angles: (x\({}_{k}\), y\({}_{k}\), z\({}_{k}\)) is the camera position, whereas (x\({}_{s}\), y\({}_{s}\), z\({}_{s}\)) is the light position, all in airport coordinates.  
\[\alpha_{V}=arctg\frac{z_{k}-z_{s}}{y_{k}-y_{s}}\qquad\quad\alpha_{H}=arctg \frac{z_{k}-z_{s}}{x_{k}-x_{s}}\]  
The error of evaluating the view angle is related to the errors of determining the camera position and the light position. Light positions are found in the geodesic documentation of the airport and can be treated as reference positions. The error of the camera position is determined by the camera parameters and observation parameters. The resolution of the camera sensor and the focal length of the lens set the ability to distinguish points on the image.  
The field of view of the camera was  
\[FOV=2 arctg(b/2f)\]  
where b--sensor width/height, and f--lens focal length.  
In the case of this camera, the ranges of view angles were the following:  
* Horizontally (3.6-58\({}^{\circ}\));
* Vertically (2.7-44\({}^{\circ}\)).  
Figure 5: View angles of lights: (a) vertical, (b) horizontal.  
The video stream from the camera can have a 4 k (3840 \(\times\) 2160) or 2 k (1920 \(\times\) 1080) resolution. To retain reliable light detection, the processing area of the video frames is reduced in the vertical plane:  
* [noitemsep,topsep=0 pt]
* Approach lighting system (ALS) and runway lights: \(\bigcirc\) 3840 \(\times\) (2160*/31) = 3840 \(\times\) 557 \(\bigcirc\) 1920 \(\times\) (1080*/31) = 1920 \(\times\) 278
* PAPI: \(\bigcirc\) 3840 \(\times\) (2160*/21/4) = 3840 \(\times\) 308 \(\bigcirc\) 1920 \(\times\) (1080*/21/4) = 1920 \(\times\) 154
* Image pixels map approximately rectangular areas of the observed airport. Table 1 sums up the mapping results for a UAV mission at a height of 10 m above ground.  
The mapped width of the pixel does not surpass 1/3 of the mean diameter of lights, whereas the height can be 18 times larger. This means that the registered light intensity may be reduced due to unilluminated surrounding space, which is included in the pixel.  
The error of evaluating the vertical view angle \(d\alpha_{V}\) is  
\[\begin{array}{l}d\alpha_{V}=\frac{\partial\alpha_{V}}{\partial z_{1}}dz_{ k}+\frac{\partial\alpha_{V}}{\partial z_{s}}dz_{s}+\frac{\partial\alpha_{V}}{ \partial y_{k}}dy_{k}+\frac{\partial\alpha_{V}}{\partial y_{s}}dy_{s}\\ d\alpha_{V}=\frac{1}{y_{k}-y_{s}}dz_{k}-\frac{1}{y_{k}-y_{s}}dz_{s}-\frac{z_ {s}-z_{s}}{(y_{k}-y_{s})^{2}}dy_{k}+\frac{z_{k}-z_{s}}{(y_{k}-y_{s})^{2}}dy_{s }\end{array}\]  
Errors \(dz_{k}\), \(dz_{s}\), and \(dy_{k}\) are insignificant.  
The rrror relative to the calculated angle is  
\[\begin{array}{l}\frac{d\alpha_{v}}{\alpha_{V}}=\frac{z_{k}-z_{s}}{(y_{k}-y_ {s})^{2}}\frac{1}{\alpha_{V}}dy_{s}\\ \frac{d\alpha_{v}}{\alpha_{V}}=\frac{1}{\hbar}\frac{d\alpha_{V}}{\alpha_{V}} \end{array} \tag{2}\]  
where h--height of the UAV flight.  
For UAV flights performed 10 m above ground, the error of evaluating the vertical view angle of the ALS and runway lights is in the range of 0.18-0.70% for a video resolution of 3840 \(\times\) 2160 and increases twice for a resolution of 1920 \(\times\) 1080. In the case of PAPI lights, the errors are almost 2 times smaller, fall in the range of 0.15-0.32% for a video resolution of 3840 \(\times\) 2160, and similarly increase twice for a resolution of 1920 \(\times\) 1080.  
The error analysis proves that the proposed inspection procedure enables the evaluation of light illumination angles satisfying the requirements of PAPI calibration [2].