# Visual-Based Positioning of Aerial Maintenance Platforms on Overhead Transmission Lines
## 3 Visual-Based Positioning System
### Estimation of the Position Based on Visual Data  
The estimated height is determined by applying an inverse linear function that relates the measured distance, the reference distance and reference height to the camera height. The height is defined as:  
\[\hat{h}=\frac{h_{ref}\times\hat{d}}{d^{\prime}{}_{1}+d^{\prime}{}_{2}}\times \sin(\gamma); \tag{4}\]  
where \(\hat{h}\) is the estimated drone height to transmission lines, \(h_{ref}\) is the reference height and \(\hat{d}\) is the reference distance in the image in number of pixels  
As explained above, during off-line mode the reference separation \(\hat{d}\) is established. Hence, it is possible to compute the x-position and y-position of the camera in relation to the center-line transmission system as:  
\[\hat{x}=\frac{\hat{h}}{\tan\left(\gamma-\alpha\right)}\times\cos\left(\delta\right) \tag{5}\]  
\[\hat{y}=\frac{\hat{h}}{\tan\left(\gamma-\alpha\right)}\times\sin\left(\delta\right) \tag{6}\]  
Figure 5: Analysis of the camera attitude -including the main angles for mathematical expressions: (a) effect of the topographic relief and the camera tilt in the acquisition of images; and (b) necessary angles for orthogonal correction.  
where \(\hat{x}\) and \(\hat{y}\) are the estimated x-position and y-position of the camera in relation to the center power conductor, respectively and \(\delta\) is the rotation angle of the camera around the z-axis.  
Visual-based positioning cannot be applied if the transmission lines are not visible since any outcome can be returned by the system under such circumstances. However, the robotic platform has two additional sensors (IMU and GNSS receiver), with different probability density functions (\(pdf\)), estimating the spatial positioning of the UAV. This information can be used with any Bayesian method to estimate the system placement. With this aim, in this work was implemented the maximum likelihood estimation [54], associating a Gaussian probability density function to each sensor. The corresponding analysis presented in Equations (7) and (8) reveals that the new estimation \(\hat{\theta}\) is a weighted average and the new uncertainty \({\sigma_{\theta}}^{2}\) can be generated through addition of the reciprocals:  
\[\hat{\theta}=\frac{{z_{1}{\sigma_{2}}^{2}{\sigma_{3}}^{2}+{z_{2}}{\sigma_{1}}^ {2}{\sigma_{3}}^{2}+{z_{3}}{\sigma_{1}}^{2}{\sigma_{2}}^{2}}}{{\sigma_{1}}^{2 }{\sigma_{2}}^{2}+{\sigma_{2}}^{2}{\sigma_{3}}^{2}+{\sigma_{1}}^{2}{\sigma_{3 }}^{2}} \tag{7}\]  
\[{\sigma_{\theta}}^{2}=\frac{{\sigma_{1}}^{2}{\sigma_{2}}^{2}{\sigma_{3}}^{2}} {{\sigma_{1}}^{2}{\sigma_{2}}^{2}+{\sigma_{2}}^{2}{\sigma_{3}}^{2}+{\sigma_{3 }}^{2}{\sigma_{1}}^{2}}\]  
\[{\sigma_{\theta}}^{-2}={\sigma_{1}}^{-2}+{\sigma_{2}}^{-2}+{\sigma_{3}}^{-2} \tag{8}\]  
where \(z_{i}\) is the measurement of each sensor and \({\sigma_{i}}^{2}\) denotes its variance (in this work, the parameters \(z_{1}\) and \({\sigma_{1}}^{2}\) are related to IMU, \(z_{2}\) and \({\sigma_{2}}^{2}\) are related to GNSS and \(z_{3}\) and \({\sigma_{1}}^{3}\) are related to our system).