# Adaptive Path Planning for UAV-Based Pollution Sampling
## 3 Materials and Methods
### Operational Scenarios for APP Development  
The APP is a critical module for UAV navigation, designed to meet the challenges of complex, dynamic mission scenarios by integrating the GPP and LPP. The development and testing of the APP were based on twelve carefully designed mission scenarios, each presenting unique assumptions, constraints, and goals. These scenarios not only defined the requirements for APP's algorithms but also provided a rigorous framework for validating its performance. By addressing challenges such as static and dynamic obstacle avoidance, energy efficiency, and adaptability, the APP ensures robust path planning for fixed-wing UAVs. In the first scenario, a UAV performing a mission over a mountainous area faces an emergency, such as communication loss with the Ground Control Station (GCS) or hazardous weather conditions. The APP guides the UAV to a predefined landing spot by generating a safe path to the landing approach point, considering the complex terrain of the Rysy peak in Poland. The heightmap for this challenging environment was prepared using GIS data to ensure accuracy in the simulation (Figure 1a). Another scenario simulates a UAV attempting to land at Zar Airport but encountering adverse tailwind conditions. The APP dynamically recalculates a new trajectory, redirecting the UAV to approach the landing site from the opposite direction. This scenario evaluates the APP's ability to adapt in real time to environmental changes while maintaining operational safety (Figure 1b). In the next scenario, the HALE UAV reaches the landing point at Zar Airport (EPZR), where control is expected to transfer to a human operator for manual landing. However, the operator is unavailable, and the UAV is instructed to circle around the landing site while awaiting further commands. The dynamic path planner generates the circling trajectory around the landing point. This scenario uses the Zar Airport heightmap. Two landing spots are defined, with the second selected if the first becomes invalid (Figure 1c). In the 4 th mission (Figure 1d), the HALE UAV conducts a complete measurement operation over the city of Zywice, Poland. After taking off manually from Zar Airport (EPZR), control is handed over to the UAV's autonomous system. The UAV flies to Zywice and performs a zigzag pattern over the city to collect measurements, maintaining an altitude of at least 300 m above ground level (AGL). Upon completing the measurements, the UAV returns to the landing start point near Zar Airport, where a human operator takes over for manual landing. The dynamic path planner generates the full trajectory, including the transition from the takeoff endpoint to the measurement zone and back to the landing point. The scenario assumes no unexpected disturbances, with static obstacles only and a simplified head-on landing approach. The mission utilizes a heightmap of Zywice and its surroundings prepared using GIS data. The UAV's yaw angle during measurements is not critical. A similar mission (Figure 1e) involves profiling at higher altitudes; the HALE UAV performs a complete measurement operation over the city of Zywice, Poland, focusing on high-altitude profiling. The UAV takes off manually from Zar Airport (EPZR) before control is transferred to its autonomous system. The UAV approaches Zywice and climbs to a designated altitude upon reaching the first measurement point. It flies above the city while maintaining a minimum altitude of 300 m above ground level (AGL). After completing the profiling, the UAV descends in a helical pattern back to the first measurement point and returns to the landing start point at Zar Airport. A human operator then takes over to perform the landing manually. The dynamic path planner generates the entire route, from the end of the takeoff phase to the measurement operation and back to the landing point. Static obstacles are considered, and the mission is assumed to proceed without unexpected disturbances.