# A Visual Odometry Pipeline for Real-Time UAS Geopositioning
## 1 Introduction  
Geopositioning is arguably the most crucial step in navigating Unmanned Aerial Systems (UAS) either autonomously or by an operator. This is true for several tasks, including a safe return home, navigating to a designated destination, and assuring a safe flight. The geopositioning task is currently achieved using the onboard GPS antenna and sometimes with the addition of an inertial system that uses GPS as a correction signal. In cases where GPS is degraded, denied, or suffers from the multi-path problem, as in urban canyons [1], the drift caused by an inertial-only solution becomes unacceptable, and a backup geopositioning mechanism is required. This paper addresses the need to develop a real-time geopositioning solution using a down-looking camera generally available on most commercial drones. The proposed pipeline enables UAS geopositioning by matching the landmarks from the acquired image to a corpus of landmarks generated offline from a reference orthophoto available from either Google Earth or local aerial mapping [2].  
Several challenges in vision-based UAS geopositioning include changes in the environment, such as new buildings, roads, etc., rapid changes in attitude, and the size of the region where the UAS will fly. The environmental changes between the reference and detected landmarks may be due to the intensity and direction of sunlight, seasonal changes, and changes in infrastructure. It is expected that a vision-based positioning solution should be robust to such changes. Additional algorithmic challenges arise from the scale changes between the reference region and UAS imagery.  
To address the aforementioned challenges, we introduce an efficient pipeline shown in Figure 1 that uses a quad-tree as a geospatial landmark database, a landmark matching module, and an attitude control module. The geospatial database enables scalability and dynamically extracts and updates the look-up reference region based on the UAS motion. The dynamic updates to look-up regions and swift landmark retrieval from thedatabase make the algorithm agnostic to how large a spatial area the flight would cover. The landmark matching module adopts several advanced matching algorithms, such as SuperGlue [3], to be resilient to environmental changes. The geometry control module offsets the UAS altitude change and ensures the UAS image is rectified during flight.  
The contributions of this paper can be summarized as follows:  
* Using an offline geospatial data structure for on-the-fly landmark set retrieval for matching. The database module uses a geospatial data structure to swiftly generate a list of landmarks from the look-up region while reducing computational and data bandwidths.
* Introducing a geometry control module to select appropriate scales that guarantee matching ground sampling distances across reference and UAS landmarks. This, in turn, enables the UAS to change its attitude and altitude during flight freely.
* Our approach achieves absolute UAS geopositioning with high accuracy in vertical and horizontal directions.
* In contrast to our earlier work [1], where the UAS was forced to fly at a fixed altitude and attitude, this paper provides an algorithm that removes fixed altitude and attitude constraints.