## 3 Materials and Methods
### Trajectory Enrichment  
A raw trajectory cannot provide detailed information about the field of operation the drone has flown. In contrast, an enriched trajectory can provide further (contextual) information about the mission and the visited ROI/POIs. A trajectory can be enriched with external (to flight) data, beyond the latitude, longitude, and timestamp. This data  
Figure 4: The form of a DataFrame after the trajectory reconstruction process. depends on the mission and on the domain. In the ReconTraj4 Drones framework, a module for the enrichment of the reconstructed trajectory is developed, acquiring data about the weather conditions and POIs of a particular flight. Thus, for each point (latitude, longitude, timestamp) of the reconstructed trajectory, the aim is to retrieve the weather conditions (temperature, humidity, pressure, etc.) present at the specified time (timestamp). Moreover, the geographic region (boundaries) in which the drone has flown is computed. Towards this aim, data about the particular area that include POIs, roads, buildings, etc. are retrieved. Finally, the data extracted from the geo-tagged images beyond the latitude, longitude, and timestamp are used to further enrich the reconstructed trajectories. Such data include altitude and camera details. In the trajectory enrichment module, the main goal is to interrelate each point of the reconstructed trajectory with the weather conditions present at that point. Weather conditions concern data such as the dew point, temperature, pressure, wind direction, and wind speed. In our approach, since the reconstruction of a drone's trajectory does not take place in real time (i.e., during a flight), the approach utilizes historical weather data. The acquisition of this data is carried out using suitable Web services, namely, the OpenWeather ([[https://openweathermap.org/api](https://openweathermap.org/api)]([https://openweathermap.org/api](https://openweathermap.org/api)), accessed on 30 December 2022) and the Meteorat ([[https://meteostat.net/en/](https://meteostat.net/en/)]([https://meteostat.net/en/](https://meteostat.net/en/)), accessed on 30 December 2022) services. The developed framework fetches the historical weather data by implementing the corresponding application programming interfaces (APIs). OpenWeather provides historical weather data for a given latitude, longitude, and timestamp. For each point of the reconstructed drone's trajectory (the latitude, longitude, and timestamp), the historical weather data are fetched. The data are returned in the JSON format in the following form:  
'lat': 39.2256,  
'lon': 25.8815,  
'timezone': 'Europe/Athens',  
'timezone_offset': 7200,  
'data': [  
'dt': 1643632920,  
'sunrise': 1643606671,  
'sunset': 1643643307,  
'temp': 12.16,  
'feels_like': 10.68,  
'pressure': 1012,  
'humidity': 48,  
'dew_point': 1.49,  
'clouds': 50,  
'wind_speed': 2.69,  
'wind_deg': 218,  
'weather': [  
'id': 802,  
'main': 'Clouds',  
'description': scattered clouds',  
'icon': '03d'  
either the ground or the drone's flight altitude. In the latter case, if there are no historic weather data available for the given altitude, the historical weather data of the ground are returned. Figure 5 depicts the returned data from the Meteorat Web service for a given latitude, longitude, timestamp, and altitude. To further enrich the trajectories with information related to a ROI/POI, the OpenStreetMap ([[https://www.openstreetmap.org/](https://www.openstreetmap.org/)]([https://www.openstreetmap.org/](https://www.openstreetmap.org/)), accessed on 30 December 2022) was used. More specifically, ReconTraj4 Drones acquires information about the name, address, type, place id, and the bounding box. Thus, for each point of the reconstructed trajectory, the spatial data (latitude, longitude) are provided as input, and the abovementioned information is retrieved as output. The choice of OpenStreetMap is based on the fact that it is a free open-source Web service that meets the requirements of the ReconTraj4 Drones framework.