How the Wind Can Be Leveraged for Saving Energy in a Truck-Drone Delivery System

In this work, we investigate the impact of the wind in a drone-based delivery system. For the first time, to the best of our knowledge, we adapt the trajectory of the drone to the wind. We consider a truck-drone tandem delivery system. The drone actively reacts to the wind adopting the “most tailwind” trajectory available between the truck’s path and the delivery. The truck moves on a predefined route and carries the drone close to the delivery point. We propose the Minimum-energy Drone-trajectory Problem (MDP) which aims, when the wind affects the delivery area, at planning minimum-energy trajectories for the drone to serve the customers starting from and returning to the truck. We then propose two algorithms that optimally solve MDP under two different routes of the truck. We also analytically study the feasibility of sending drones with limited battery to deliver packages. Finally, we first numerically compare our algorithms on randomly generated synthetic and real data, and then we evaluate our model simulating the drone’s flight in the BlueSky simulator.

have been widely investigated in civil applications, such as agriculture [1], environmental protection [2], task offloading [3], localization [4], [5], last-mile package delivery [6], [7], and so on. In fact, drone-based solutions for the delivery of small packages have been announced by big companies in e-commerce. Initially, it did not seem safe or practical to have robotic objects flying in the sky, but now there are several reasons to believe that package delivery by drones may be coming soon. In fact, new regulation laws have been just released in 2021 by the Federal Aviation Administration (FAA), which allow operators of small drones to fly over people and at night under certain conditions [8].
Drones are considered to be much faster than traditional trucks in some circumstances and can also lead to a reduction in pollution and greenhouse gas emissions. For example, drones are not delayed by rush hours in congested areas and can significantly shorten the paths to reach customers by flying over rivers, green parks, and sea bays. So, it is highly expected that pretty soon, if not already, companies can further extend their business by relying on drones that cross the last mile to their customers. However, drone-based delivery systems still have to face exciting challenges. First, due to the small size of the battery, drones (i.e., copters) have limited flight autonomy, and such a limitation is more accentuated by their carried payload. Also, due to payload constraints, drones cannot fulfill more than a single delivery at a time, so they must go back to a depot for grabbing other packages for other customers. Finally, weather conditions, in particular wind, must be considered during the drones' deliveries.
In this work, we concentrate on the wind challenge. Surprisingly, in the literature, the wind has been only considered as a limiting factor for drones, to the best of our knowledge. All the manufacturers set the maximum allowed wind speed that can be safely tolerated by their drones.
The wind as a factor that influences the aircraft's path has been previously considered in [9]. Similarly to us, the authors are interested in finding the "global optimal path" in presence of wind. But, they aim to optimize the duration of the flight. They specifically aim at determining the aircraft's minimumtime path while also avoiding obstacles, not considered in our work. The aircraft's energy is not taken into account. Moreover, the kind of the aircraft and its routes are not comparable with ours. Namely, the geographical scale is completely different. The authors in [9] analyze the wind effect on commercial planes, powered by fuel, whose routes' lengths are much longer than ours (i.e., ≥ 800km).
This work provides proof-of-concept of how wind can help drones during deliveries. We consider the following scenario, which is realistic in the current state of technology. We assume drones engaged in last-mile deliveries with lightweight payloads. In a delivery, a drone can afford to carry 1-6kg of payload in a range of 8-12km [10]. To reduce the length of the round trips to/from the depot, inspired by big companies' drone delivery programs, we assume that a drone is assisted by a truck. The drone picks up the packages from the truck and flies towards the customer, and then back to the truck, while the latter continues its journey near a series of delivery points [11], [12], [13]. In the literature, several scenarios have been addressed using truck-drone tandem delivery systems, but at the best of our knowledge, no one considers adapting drones' trajectories to wind conditions.
In this work, instead, motivated by the observation that when the drone operates under "tailwind" conditions (i.e., when the wind blows in the direction of the drone's movement) it consumes less energy, we explore the possibility that the This work is licensed under a Creative Commons Attribution 4.0 License. For more information, see https://creativecommons.org/licenses/by/4.0/ Fig. 1. Abstraction of a delivery performed by the truck-drone tandem in a supply chain scenario. The truck moves carrying the drone; P is the delivery. drone selects the detaching point from the truck to reach the customer following, as much as it can, the "tailwind" trajectory. We do that even at the cost of increasing the length of the trajectory, as long as we do not lose energy. The same approach is followed to return back to the truck (see Figure 1).
In this work, the drone's route consists of a polygonal chain that starts from the take-off point T on the truck's road and returns to the landing point L passing through the delivery point P (see Figure 1). Notice that, in general, the take-off and landing points do not coincide. We only assume that the take-off point precedes the landing point on the truck's route. To give the drone the freedom to arbitrarily select the take-off and landing points, we assume a rural or suburban environment, like a residential area neighborhood, where already at low altitudes, the drone can freely move in any direction having no significant obstacles on its way. We also assume a very mild truck-drone synchronization, and so, the first vehicle that arrives at the landing point, waits for the other.
Our goal is twofold: i) to determine the take-off and landing points on the truck's route that minimize the energy consumed by the drone for the delivery, and ii) to study the delivery feasibility because the drones are energy-constrained. This work extends our prior conference paper [14], and our results are summarized as follows: • We define the Minimum-energy Drone-trajectory Problem (MDP) whose goal is to find the minimum-energy trajectories when the wind influences the delivery area; • We devise two algorithms for MDP, i.e., SINGLE and MULTI which assume that the truck's path is a straight line or a polygon, respectively; • We analyze the feasibility in terms of energy of sending drones for deliveries in a windy area, by presenting the FEASIBILITY algorithm; • We numerically compare our algorithms on synthetic and real data sets. Moreover, we evaluate the energy spent by our solution simulating the drone's flight in BlueSky. The rest of the work is organized as follows. Section II surveys the related work. Section III introduces the wind and energy models. Section IV defines the MDP and details the math that supports the SINGLE and the FEASIBILITY solutions. Section V gives the pseudo-code and the flowcharts of the SINGLE, the MULTI, and the FEASIBILITY algorithms. Section VI numerically evaluates our algorithms through synthetic and real winds, and also simulates the drone's flight by using BlueSky. Finally, Section VII offers conclusions.
II. RELATED WORK In this section, we review works about truck-drone delivery systems with an emphasis to those influenced by the wind.

A. Truck-Drone Tandem Delivery Systems
Recently, the problem of delivering goods with drones has been approached by several papers [12], [15]. The vast majority of them assume that the drone has a limited battery and has to return back to the warehouse after every delivery due to the payload and energy budget constraints. Many solutions consider drones working in tandem with a truck, and there are many ways the two means of transportation can collaborate. Some solutions divide the deliveries between the two, while others make them collaborate in every single mission [16], [17], [18].
The authors in [16] consider symbiotic cooperation between a truck and a drone to accomplish a set of deliveries. Precisely, the goal is to minimize the makespan to serve all the customers by either the truck or the drone. This problem is presented as a variant of the TSP known as the flying sidekicks traveling salesman problem. The authors propose a hybrid heuristic divided into three steps. Initially, the algorithm creates a TSP solution where the truck serves all the customers. Next, the algorithm greedily assigns deliveries to the drone considering the quantity of time saved with respect to the truck without exceeding the battery budget. Each delivery is served with a polygonal chain that starts from and returns to a point of the truck's route passing through the customer. Finally, the algorithm tries to improve the solution by visiting the neighborhood of each customer, i.e., by evaluating a different assignment for each customer. Our work is completely different. Although like [16] we use a polygonal chain to serve a delivery customer, we select the polygonal chain by minimizing the energy for every single delivery and not to minimize the total makespan of all the customers. Moreover, in our solution, any position on the truck's road is a candidate for the take-off/landing, whereas in [16] only a subset of positions, which correspond to points on the truck's route, are candidates.
A similar problem is proposed in [18] where, given a fixed sequence of stops that constitute a truck's route and a set of customers, the goal is to find a scheduling for drones (i.e., a set of trips defined by a drone's take-off, customer service, and landing) so that all the customers are served and the makespan is minimized. The authors provide a mixed-integer programming formulation to solve the single and multiple drone scenarios. However, unlike our approach, it is not possible to change neither the truck's route nor the drone's trajectories for a customer in order to increase time savings.
Notice that, all these works do not consider the impact of winds on energy consumption since they are focused only on the time required to perform a delivery.

B. Drone Delivery Systems Influenced by the Wind
The impact of the wind on defining long-distance trajectories of aircraft has been considered in [9]. Instead, the impact of winds on small and battery powered drones' trajectory planning has not received much attention so far.
In [19], [20], and [21], the wind is introduced in the model. Precisely, the drone trajectories are represented by paths in a weighted graph whose edge weights model the energy consumed by the drone, which depends on the carried payload and the wind speed. In [20] and [21] authors focus on finding which is the percentage of deliveries that can be accomplished with a given energy budget knowing the wind conditions onthe-fly. Authors of [22] extend the above solution to a multidepot multi-drone delivery system. Whereas in [20] and [21], the drone moves along predefined routes represented by the edges of a graph given in input to the problem, in this paper we must find the drone's trajectory, which is the output of the problem, by leveraging the impact of the wind.
A multi-drone delivery system dealing with wind, obstacle avoidance, and maximum energy budget, is also proposed in [23]. A subset of feasible deliveries is initially computed offline, and a depth-first search strategy is performed then to get the final mission plan. Their extended work [24] considers the same setting with many clusters, in which the problem is seen as a constraint satisfaction problem. In [25], a delivery scenario where the wind affects multiple drones is considered. Differently from our approach, each drone can perform multiple deliveries on the same mission. The focus is on optimizing the global mission plan. The wind influences the energy consumption, but the drone passively suffers the wind, i.e., it does not adapt the route to the wind, as we do.
Lastly, authors in [26] exploit the service paradigm to abstract drone's capabilities into a drone service. The main novelty is the creation of a test-bed that consists of an indoor replica of a city. A drone flies over it by using different polygonal trajectories and payloads. The wind conditions are simulated by a fan. The energy consumption is inferred from the collected data of 72 indoor flights. The authors focus on the study of how the shape (triangular, rectangular, hovering) of the drone's path acts on the energy consumption.
In conclusion, our work is different from the surveyed ones in many aspects. The most important difference is that in our study the battery powered drone actively reacts to the wind and searches for the minimum energy trajectory, i.e., the trajectory as closer to the tailwind as possible given the truck's movement. Computed the optimum trajectory, we compare how much energy is saved using the found trajectory with respect to the energy spent traversing the shortest trajectory, which is the best solution in absence of wind.

III. BACKGROUND
In the background of our solution there is the wind triangle concept. In air navigation, the wind triangle (see Figure 2) is a graphical representation of the relationship between the drone's motion and the wind. The ground vector represents the motion of the drone over the ground, and it is the resultant of adding the air vector, i.e., the motion of the drone through the air mass, and the wind vector [27]. Specifically, when there is a wind and the drone wants to follow a specific ground track, the air vector indicates the true heading and drone's speed. The difference in angle between heading and ground track is known as the drift angle. So, if the drone wants to follow the desired track, it must correct its heading of an angle depending on the wind direction. Each vector z = (z d , z s ) in the wind triangle is characterized by a direction z d and a speed z s .
We first observe that in presence of wind, varying the ground direction also varies the air vector (see Figure 2). Since we aim to find the track that minimizes the energy spent by the drone (i.e., we try many possible ground directions) and since the energy spent to fly depends on the air vector (as we will see in Eq. (1)), our solution relies on the aforementioned wind triangle construction. The second observation is that by varying the ground track, the energy changes due to the variations in both the length of the trajectory to be traversed, and the air speed. In this work, we will show that sometimes, in presence of wind, it is convenient to leave the shorter drone's trajectory for a longer one that consumes less energy.
In the rest of this section, we explain how we derive the unitary energy for the ground trajectories.

A. The Relative Wind and Energy Model
The wind, characterized by speed and direction, is an important variable for evaluating the drone's energy consumption. Usually, the weather stations record the meteorologic direction of the wind ω me d , i.e., the direction from which the wind originates, assuming the North as the 0 • direction. For instance, if the wind blows from the North to the South, a weather station records a direction of 0 • , while if it blows from the East to the West, the weather station refers to 90 • . From now on, to ease the notation, we indicate the angles without the degree symbol (•). The meteorologic direction of the wind conventionally grows clockwise in a Cartesian coordinate system x Oy whose x-axis is the North direction and the wind direction is given as the direction the wind is from. To conform the wind to the classical Cartesian coordinate system, we convert the meteorologic direction of the wind into the mathematical direction of the wind ω ma d . First, ω ma d defines the winds blowing to the origin O of the Cartesian coordinate system and not from it. The mathematical wind directions grow counterclockwise from the usual x-axis which is equal to the East direction. Hence, the conversion rule from the meteorological direction of the wind to the mathematical one is explained in [28], and it is as follows: Figure 3a shows the direction of the meteorological wind ω me d = 225 that is directed towards O and the corresponding mathematical direction ω ma d = 45 that has O as the source. In our work, from now on, we always refer to the mathematical direction of the wind.
Let us now define the global wind ω as the (mathematical) wind that blows in the delivery area. The global wind vector ω = (ω d , ω s ) has direction ω d and speed ω s . The relative wind on r ϕ(γ r ) has direction |ω d − γ r | 360 which is the difference mod 360 between the direction of the global wind and the direction of the drone's trajectory (see Figure 3b). The energy for flying a unit of distance (e.g., 1m) on a line r mostly depends on the air speed of the drone, which in turn depends on the global wind ω = (ω d , ω s ) and on the ground vector r = (γ r , υ d ), as seen in Figure 2. Precisely, the air speed a s can be calculated as [10]: where s N = υ d − ω s cos(ϕ(γ r )) and s E = −ω s sin(ϕ(γ r )).
Hence, when ω s = 0, it holds that a s = υ d .
The energy also depends on other drone's features like the number of rotors, and the payload weight. There is no simple formula to calculate the unit energy as a function of the relative wind [10], so we introduce the compass rose to discretize the relative winds and to tabulate the energy for them. In this way, fixing the type of the drone (i.e., octocopter, quadcopter), the drone's ground speed v d , the payload κ, and the speed of the global wind ω s , we can pre-compute the energy to traverse 1m: one energy coefficient for each sector of the compass rose (e.g., see Table II in Section VI). For the sake of simplicity, when all the involved parameters are clear from the contexts, the energy E( AB) will denote the energy spent by a drone to fly the ground segment AB from A to B.

B. The Compass Rose
In general, weather stations store the different winds detected by applying a discretization. In other words, given a compass rose, the winds are grouped in a finite number of sectors. To define the sectors and the compass rose, we divide the turn angle at O of a conventional Cartesian coordinate system x Oy into 4t sectors, each of width σ = 180/2t, where t is the compass rose cardinality. Therefore, σ defines the width of each sector. Conventionally, a sector S i contains the winds whose relative wind direction verify: is associated to each sector S i . The representative ρ i is then used to compute the energy consumption of any relative wind direction that falls in S i . The unit energy consumption for any wind in S i is denoted as μ i . Basically, the compass rose is used to bound to 4t the number of relative winds and thus the possible energy levels, as we will see in the next section. Table II reports the values of the energy required by a octocopter with different payloads for the 12 winds of the compass rose used in our experiments when ω s = 10m/s [10].
Having defined the energy consumption, we formally introduce the Minimum-energy Drone-trajectory Problem and explain how the drone can minimize the energy consumption.

IV. THE PROBLEM DEFINITION
In this work, we assume the truck-drone tandem delivery system which consists of a truck that carries drones in the delivery area. When the global wind is absent, i.e., ω s = 0, the speed of the relative wind is zero and the energy spent by the drone does not depend on the direction of the trajectory. Hence, in this case, the best solution for the drone is to select the shortest trajectory from the truck's route to the customer. In presence of wind, the less consuming trajectory is the one parallel to the wind (see Eq. (1)). However, there may be no trajectory parallel to the wind that starts from the truck's path and reaches the customer. In that case, the selection of the drone's trajectory that minimizes the energy is not trivial. In the rest of the section, we first describe the problem, then we introduce our solution when the truck's path is a single line.

A. The Minimum-energy Drone-trajectory Problem (MDP)
Let r be the line that represents the truck's path. So, the truck's path is represented by a vector r whose direction is γ r . Notice that, in this work we do not consider the truck's speed. Let us consider a delivery point P to be served by the drone. To serve P from the road r (see Figure 1), the truck selects the take-off point and landing point for the drone, called T and L, respectively. Thus, the drone detaches from the truck at T and flies on the line from T to P carrying the payload. After the delivery, the drone (without payload) moves back on the line from P to L, rendezvousing at the truck again. We select the trajectories making this assumption: the drone and the truck always move forward in the sense that the projection H of P onto the truck's path must follow T and precede L.
Our problem is to find the optimal composed trajectory T P ∪ P L such that the energy consumed by the drone to serve P is minimized under the assumption that T H L. We assume a constant wind during the whole delivery. We call this problem Minimum-energy Drone-trajectory Problem (briefly, MDP). In other words, we aim at minimizing the quantity E( T P) + E( P L). Changing T and L, the slope (i.e., direction) of the segments T P and P L changes, and so, by the wind triangle rule, the relative winds ϕ( T P) and ϕ( P L), and their relative energy, change.
In the next, we show how to solve MDP by selecting the optimum trajectory among a discrete set of candidate trajectories.

B. Towards the MDP Solution
Considering T and L fixed on the track's route r , we calculate the relative wind on the trajectories T P and P L to find the energy consumption. First of all, we need to figure out whether P is to the right or left of the truck. This trajectories. Specifically, (i) P is on the left of truck (denoted as P r ) if det(A) > 0; and (ii) P is on the right of truck (denoted as P r ) if det(A) < 0. In our discussion, we consider the Cartesian coordinate system x Py of the mathematical wind, with origin in P. Let H be the projection of P on r (see Figure 4). Let δ T and δ L be the angles formed, respectively, by the drone's trajectory T P and P L with the truck's route r . Namely, δ T = PT H and δ L = P L H can be easily computed as δ T = arctan (P H /T H) and δ L = arctan (P H /H L). Therefore, T P = P H sin(δ T ) and P L = P H sin(δ L ) (see Figure 4). So, it is evident that the length of the trajectories depends on the take-off or landing points and the slope of the truck's route r . Now, we can state the following.
Theorem 1: The relative winds on T P and P L are: Proof: We prove Eq. (3) when P r (see Figure 4a). Consider the rotated Cartesian system x r Py r with origin in P, x r -axis parallel to r and oriented in the same direction as r . Recall that the y r -axis forms a 90 counter-clockwise angle with x r . Note that the angle between x and x r has width γ r . Observed that r and x r are parallel, the segment T P forms the same angle δ T = W P Q on x r Py r , and the angle (γ r + δ T ) on x Py. Hence, the direction of the relative wind on x Py is ϕ( . Also the returning path P L forms the angle −δ L on x r Py r . Hence, the direction of the relative wind on x Py is ϕ( Figure 4b. Eq. (3) can be proven similarly to the left case. Hence, the relative wind depends on the wind direction, the direction of the truck's path, and take-off and landing points.
We now analyze in which sector of the compass rose both ϕ( T P) and ϕ( P L) fall, when T and L move on r . Let us discuss the case P r . When T and L move on r towards H (see Figure 4), it is easy to see that δ T , δ L ∈ (0, 90]. Precisely, δ T = δ L = 90 when T H = H L = 0, while δ T and δ L → 0 when both T H and H L → ∞. Then, the take-off and landing drone's trajectories T P and P L scan, respectively, the first quadrant Q 1 (shown in blue) and the fourth quadrant Q 4 (shown in red) of the Cartesian coordinate system (see Figure 4) with origin in P and whose x-axis coincides with the relative wind ϕ( r ). Hence, observing that the relative wind on the truck's route is ϕ( r ) = |ω d −γ r | 360 , the take-off trajectories scan the compass rose starting from ϕ( r ) shown in blue in Figure 5, while the landing trajectories scan the compass rose starting from ϕ( r ) shown in red in Figure 5.
From that, Eq. (3) can be rewritten relatively to ϕ( r ): As explained in Section III-B, fixed T and P, the relative winds ϕ( T P) and ϕ( P L) experienced by the drone are given by wind representative ρ of the sector where they reside. The sectors visited when T and P move are listed starting from the sector S τ where ϕ( r) resides, i.e., S τ , where τ = |ϕ( r) − 1| 360 /σ . Note that τ is computed from ϕ( r ) − Theorem 2: Let τ = |ϕ( r ) − 1| 360 /σ . When ϕ( T P) or ϕ( P L) scan Q 1 , the drone spends the energy μ i that depends on the winds S i of the compass rose whose indices i are τ ≤ i ≤ |τ + t| 4t . When ϕ( T P) or ϕ( P L) scan Q 4 , the drone spends the energy μ i that depends on the winds S i of the compass rose whose indices i are |τ − t| 4t ≤ i ≤ τ . Figure 5 shows two examples where t = 3 and so σ = 30 whose crossed quadrants are different in sectors and number. Specifically, when ϕ( r ) = 0, we cross the sectors S 0 , S 1 , and S 2 in Q 1 , and S 11 , S 10 , and S 9 in Q 4 , examining so exactly t = 3 sectors per quadrant. Instead, with ϕ( r) = 50 we scan one more sector than before, crossing S 1 , S 2 , S 3 , and S 4 in Q 1 , and S 1 , S 0 , S 11 , and S 10 in Q 4 . Table I reports the sectors and the angles δ ∈ (0, 90] associated to each sector of Q 1 and Q 4 when ϕ( r ) = 0 and ϕ( r) = 50 (see Figure 5). Generalizing, when |ϕ( r)| σ = 0 we cross exactly t sectors, instead when |ϕ( r )| σ = 0 we scan t +1 sectors. So, depending on which sector T and L fall in, the μ depends on the relative wind of the scanned sectors. Finally, note that changing r or the direction of the global wind has the same effect: ϕ(r ) changes and so the candidate sectors change.
The take-off/landing positions that delimit the i th sector in Q 1 are those that form with γ r the δ i angle so defined: Similarly, the take-off/landing positions that delimit the i th sector in Q 4 are those that form with γ r the δ i angle so defined: In the following, we generally refer to the trajectory angles in Eqs. (5)-(6) with δ (omitting the index). We also use δ T and δ L when we generally refer to the angles of the take-off and the landing trajectories, respectively. These δ angles are very important because not only delimit the sector, but they also return the candidate trajectory in each sector. Indeed, the shortest trajectory in a sector forms the largest angle, which is δ, with the truck's route. Note that δ depends on ϕ(r ): so the trajectories vary with the truck's route and the wind. Table I shows the δ angles for the example in Figure 5.
To complete our analysis, it remains to find T and L given δ. Given P and a take-off point T on the route path, the length of the drone's take-off route is P H sin(δ T ) , with δ T ∈ (0, 90]. Precisely, the drone selects T such that δ T i is maximum varying S i . The same holds for the landing points.
So, at this point, we are ready to solve MDP. Given a global wind ω, a truck's route r , and a delivery point P, MDP aims at determining the optimal wind sectors i * and j * such that: where i, j are the indices of the sectors given by Theorem 2, μ T i and μ L j are the energy consumption in these sectors S i and S j in Q 1 or Q 4 , and H P/sin(δ T i ) and H P/sin(δ L j ) are the lengths of the trajectories candidates for being T P and P L in S i and S j , respectively. Recall δ T and δ L are given by Eqs. (5) and (6) depending on the position of P with respect to r . Note that, the length H P does not affect the minimum, and when δ T = 90, the minimum energy trajectory coincides with the shortest trajectory H P in absence of wind. The SINGLE algorithm in Section V gives all the details to implement our solution.
Although the selection of the optimal trajectory for MDP is not affected by the distance of the customer from the truck's route, the energy changes with P H . This means that the drone's battery might be depleted before reaching P. Nevertheless, if P is not reachable with the minimum energy trajectory, it is also not reachable in absence of wind, i.e., using the trajectory P H of minimum distance P H . While the best wind can be leveraged to reach customers unreachable in absence of wind. In the next section, we consider this aspect.

C. The Feasibility Analysis
Given that drones are energy-constrained vehicles with a limited battery capacity, their flight range is bounded. Let B be the battery budget of the drone. By Eq. (7), for any feasible delivery point P, it holds: Fixed ω s , v d , κ, and the truck's path r , we compute the energy coefficients μ T and μ L that depend on the relative wind ϕ(r ) of the optimal trajectories of SINGLE, we have: i.e., P M (ϕ(r )) represents the farthest distance reachable from the truck's route r . By varying the wind direction and keeping all the other conditions the same, the farthest distance reachable from r varies because the relative wind changes, the compass rose is rotated, and the minimum energy trajectories change. Let P max = max ω d P M (ϕ(r )) and P min = min ω d P M (ϕ(r )) be the maximum and minimum distance that can be reached from r with the minimum energy trajectory in presence of any wind, respectively. Moreover, let P st be the maximum distance reachable from r in absence of wind. Note that P min ≤ P st ≤ P max for any wind because P st is one of the trajectories always tested in presence of wind to find the best trajectory (precisely, the one with δ = 90). Any delivery closer than P min is feasible with any wind (using either the minimum energy or the shortest trajectory), any delivery further than P max is not-feasible with any wind (even if the best trajectory is implemented), while any delivery in between P min and P max is feasible only with the minimum energy trajectory and in the presence of some wind (i.e., the wind that returns P max ). We use the comparison between P min and P max and the number of feasible points to evaluate the impact of our solution. The FEASIBILITY algorithm in Section V gives all the details.

V. THE MDP EXTENSION
In this section, we give the pseudocode for SINGLE discussed in Section IV, and then we propose the MULTI algorithm that applies MDP in the extended multi-line scenario. Eventually, we devise an algorithm, called FEASIBILITY, for determining "a priori" the feasibility of sending a drone for a delivery P given a drone's budget B using SINGLE or MULTI.
In Figure 6, we report the flowchart of the SINGLE, MULTI, and FEASIBILITY algorithms.

A. The SINGLE Algorithm
The SINGLE algorithm optimally solves MDP when T and L are selected from a single road, requiring O(t) time and space, where t is the number of sectors for each quadrant. SINGLE has as input the wind vector (ω d , ω s ), the drone's speed v d , the payload weight κ, the truck's road r , the cardinality of sectors t in the compass rose, and the delivery point P. The pseudocode of SINGLE is sketched in Algorithm 1.
The SINGLE algorithm works as follows. Initially (Line 1), we perform a pre-processing phase to compute the unitary energy costs according to the payload weight. Precisely, with i represents the energy spent for traversing a unitary distance when the global wind has speed ω s , the drone moves in S i with speed v d and carries the payload κ, instead, μ L i , is the same as μ T i but without payload. Then, we compute the relative wind ϕ( r ) on the road r according to the current global wind condition ω (Line 2), and also the wind sector with index τ (Line 3). At this stage, by exploiting Eq. (4) we identify the quadrants for T and L to scan in order to find the sub-routes with minimum energy. In other words, we find the best indices that return the optimal sectors for the take-off and landing sub-routes, i.e., i * and j * , respectively, starting from S τ (Lines 5-6). Now, depending on the position of P with respect to the truck's road r , we can compute the optimal pair of points. If P r (Line 4), we calculate the best T searching in Q 1 and the best L in Q 4 , otherwise, if P r (Line 9), we do the opposite reasoning. Eventually, we return the best pair T and L (Line 14).

B. The MULTI Algorithm
The MDP extension to multi-line assumes that the truck's path is a polygon. The sides of the polygon determine the set of different routes on which to run the SINGLE algorithm. In this case, we need to select not only the take-off and landing points, but also the side of the polygon where T and L reside. Moreover, T and L can be selected on two distinct sides. The pseudocode of MULTI is sketched in Algorithm 2.
Firstly, we build the two sets T and L which contain the set of feasible take-off and landing points computed for each route π ∈ (Algorithm 2, Line 1-4). After this, we compute the optimal solution by searching among all the possible pairs (T, L) in T and L, paying attention that T precedes L (Line 6-8). The current best pair is then saved (Line 9) Algorithm 2 MULTI (P, ω, t, , v d , κ) 1 T ← ∅, L ← ∅; 2 foreach π ∈ do 3 {T, L} ← SINGLE (P, ω, t, π);

C. The FEASIBILITY Algorithm
The FEASIBILITY algorithm finds the two thresholds, i.e., P max and P min , used to establish the feasibility of a delivery P regardless of the wind conditions for a given drone's battery budget. The algorithm considers all the winds ω d ∈ .

return P max , P min
Note that varying ω d ∈ also varies the relative wind, but not the energy coefficients μ T 0 , . . . , μ T 4t −1 , μ L 0 , . . . , μ L 4t −1 . Only different sectors of the compass rose will be considered for different relative winds, as explained before. In our experiments, FEASIBILITY is then extended considering not only the truck's path r but all the lines of the sides of the truck's polygon path. Note that changing r , although the energy coefficient of the compass rose are the same, the trajectory angles will change, as explained before.

VI. PERFORMANCE EVALUATION
In this section, we evaluate the performance of our algorithms when solving MDP. Specifically, we perform two kinds of evaluation: numerical in Section VI-B, and simulation in Section VI-C. In the previous, we simply run our proposed algorithms by varying all the aforementioned parameters, and by relying on our ad-hoc and coded environment. In the latter, instead, we rely on the open air simulator called BlueSky [29].

A. Settings and Parameters
We implemented our algorithms in Python language version 3.7, and run all the instances on an Intel i7-10genK computer with 16GB of RAM. We consider a delivery area that consists of a circle of radius 5km whose origin coincides with the Cartesian coordinate system. When considering the single line (SL) scenario, we simply generate a line inside the area. In this case, the truck travels on a straight line (e.g., a highway), and deliveries take place in the area in front of such line. On the other hand, when we consider the multiline (ML) scenario, we randomly generate a convex polygon with 8 sides that represent the closed path (route) of the truck to/from the depot. In other words, there are 8 contiguous roads that the truck traverses in the delivery area. By setting the starting point of the truck's route as one of the vertices of the polygon, the route follows the sequence of vertices traveled in a clockwise direction. In this case, the truck circumnavigates the area where the deliveries occur. Also, n = 20 deliveries P 1 , . . . , P 20 are uniformly generated inside the delivery area.
We also consider two types of winds in the evaluation: exhaustive winds (EW) and real winds (RW). In EW, we vary ω d with regular steps and consequently the relative wind ϕ( r ) on r varies. In RW, the wind varies according to the collected data at different hours of the day in two locations in Corsica (France) during winter days. In general, such a region is characterized by low-intensity inland wind and high-intensity sea wind. When considering the EW scenario, we vary the wind speed ω s = {10, 20}m/s and the wind direction which varies according to a step of 15 • . Moreover, we set the wind cardinality to t = 3 affecting so the wind sectors and classes. Concerning the parameters of the drone, we set the speed of the drone υ d = {10, 20, 30}m/s, the weight of the payload κ = {2, 6}kg, and the battery budget B = {2.5, 5, 10}MJ when dealing with the feasibility. Also, as a reference, we compare our solution (minimum energy trajectory) with respect to the shortest trajectory, on both the single line (SINGLE-ST) and multi-line (MULTI-ST) scenarios, where ST denotes "shortest trajectory" (i.e., the one with δ = 90) that is optimal when the wind is absent. So, our numerical evaluations compare the energy required in presence of wind with the energy required in absence of wind.

B. Numerical Evaluation
In this section, we perform a numerical evaluation concerning the proposed algorithms. We will consider the compass rose formed by 12 sectors and hence σ = 30 (case t = 3). In Table II, we report the different values of μ i that have been used in the experiments. We tabulated these values since there is no simple formula to calculate them [10].
1) Single Line Exhaustive Winds Scenario: In Figure 7, we focus on the SL-EW scenario. In the x-axis we report the scanned wind directions ω d , while in the y-axis we report the ratio among the energy required for performing a delivery P in absence of wind (by invoking SINGLE-ST), and the optimal energy required in presence of wind (by invoking SINGLE).
In the first row of Figure 7 we initially see that by fixing a configuration of the speed and payload of the drone, and varying the direction of the truck's route γ r , the results are the same. In fact, they have just shifted by 180 • . So, changing the direction of the road, the compass rose just rotates. Namely, for instance, the values on the y-axis when ω d = 45 and γ r = 0 are exactly the same when ω d = 45 + 180 and γ r = 180. Also the lengths of the minimum trajectories are the same because the δ angles coincide being |ϕ(0)| 30 = |ϕ(180)| 30 = 0. Focusing on the first plot with γ r = 0, we can see that when the wind ω d ∈ [90, 270], the ratio is 1, which means that the two solutions work the same. In other words, the best solution provided by SINGLE forces the drone to fly perpendicularly like SINGLE-ST. Eventually, if there is a trajectory that starts from r and reaches P which is "more" tailwind (i.e., parallel or almost parallel to the global wind), SINGLE finds much better solutions with respect to the shortest perpendicular ones. In particular, it is interesting to see how much energy can be saved when υ d varies in these circumstances.
In Figure 7, where ω s = 20m/s, when υ d = 20m/s the minimum trajectory consumes 1/8 of the energy in absence of wind, when υ d = 30m/s, 1/6, and when υ d = 10m/s, 1/2. This behavior is expected and comes from the adopted drone's energy reported for completeness in Section A: the energy does not change linearly with υ d as it seems at first glance in Eq. (9). Indeed, the energy gain also depends on the airspeed a s and as such on the relative difference between v d and ω s as reported in Eq. (1). The gain is emphasized when such difference is positive, and it is reduced when such difference is negative. When we decrease the wind speed ω s from 20m/s to 10m/s (i.e., plots of the first column), the energy saved is less because the head/tail component decreases. Finally, for the payload weight (i.e., comparing κ = 6kg and κ = 2kg), the energy saved is more when the payload is lighter.
2) Number of Sectors Analysis: In Figure 8, we analyze how the number of sectors can impact on the performance.
Both the x-axis and y-axis have the same meaning as those in Figure 7. We varied the value of t. With t = 2, we have 4 different classes and therefore sectors with a width of 45 • ; with t = 3, we have 6 different classes and sectors with a width of 30 • ; and finally, with t = 6, we have 12 different classes and sectors with a width of 15 • .
The discretized angle (in more classes) makes the energy consumption calculation more accurate, and therefore the used representative angle is closer to the actual experienced angle by the drone (i.e., when t = 6). However, when there are more sectors to deal with, the running time for computing the correct angles in presence of wind increases accordingly. On the other hand, when the number of classes is small, the energy consumption calculation is less accurate. So, for this reason, we decided to use a good trade-off between performance and complexity, relying on the average case with t = 3.
3) Single Line Real Winds Scenario: In Figure 9, we focus on the SL-RW scenario by using real data of winds collected in a few locations in Corsica, France. In the x-axis we report the time (hours) of a winter day, while in the y-axis we report the same ratio as already explained in Figure 7.
We considered two cities that are differently affected by the wind, i.e., Cape Corse and Corte, during a whole day, from hour 1 to hour 24, during the winter season. Cape Corse is close to the sea where the wind strongly blows, while Corte is an inland city, and therefore the wind is much more moderate. In the first row of Figure 9 we report the results when the payload is 2kg, while in the second one when the payload is 6kg. The most interesting thing to observe is the impact of the wind in the first two-thirds of the day in Cape Corse. So, due to the strong wind in Cape Corse, the drone took advantage of the wind in its favor thus saving a lot of energy.
A counter-intuitive but correct behavior can be observed in Cape Corse when the drone's speed is the highest, i.e., υ d = 30m/s. In the previous Figure 7 we had seen that when the drone flies very fast, the energy saved is less. However, in Cape Corse the recorded wind from 4AM to 8AM was severely strong (even more than 30m/s ≈ 110km/h) and the drone, although flying at υ d = 30m/s, was able to save more energy than when it flies at the "most suitable" speed υ d = 20m/s. So, the energy saving depends on the relationship of the wind and drone's speed, and not only on drone's speed. Namely, the tailwind component is a function of ω s in Eq. (1).
In Corte, however, since the wind was almost absent, and therefore the unitary energy consumption was almost the same for all the wind sectors, SINGLE prefers shorter routes, if not the shortest, to save energy. Comparing the results when the payload changes, also in this case the energy saved is more when the payload to carry is less. 4) Multi-Line Scenario: In Figure 10, we focus on the ML case on both EW (first row) and RW (second row) scenarios. On each plot, in the x-axis we report the i th randomly generated delivery point P i . The plots to the left report the energy, while the ones to the right report the length of the routes. The used parameters are ω s = 20m/s, κ = 6kg.
In Figure 10, when considering the ML-EW scenario (first row) with all the winds ω d , in the y-axis we report the average ratio (along with the 95% confidence interval) of the performance between MULTI-ST and MULTI in terms of  energy (left plot) and length of paths (right plot). We can observe that on average, the energy saving of the 20 deliveries, when the drone's speed υ d = 10m/s, is pretty stable. The distribution of the deliveries shows that the ratio is between 1 and 2, which means that, considering all the winds, the shortest trajectory is not that bad. However, when the drone's speed increases to υ d = 20m/s, the same distribution of points is more variable. On average, the ratio is around 3, but many values are close to 5. In these cases, the wind helps in saving energy. About the length of the paths, the ratio is between the length of the paths of MULTI and the length of the paths of MULTI-ST. It is interesting to see that when υ d = 20m/s, for the randomized delivery P 5 the energy saved was really large, and the length of the path is more than twice the shortest one. On average, for this speed, the paths are around 50% longer than the shortest ones. In Figure 10, when considering the RW scenario (second row), in the y-axis we report the same ratios just explained for the first row but considering all the real winds evaluated from 10 consecutive days in Corsica. The saving is high when υ d = 20m/s. This trend also impacts the length of the paths (second row, right plot). Figures 11-12, we focus on the feasibility analysis in the SL/ML-EW scenario.

5) Feasibility Analysis: In
In Figure 11, we report the in the x-axis the relative wind of the truck ϕ(r ), while in the y-axis the value P max which depends on the relative wind. Here, we consider ω s = 10m/s and κ = 6kg, while we vary the size of the battery 5MJ to the left, and 10MJ to the right. Not surprisingly, the values of P max with twice the battery are doubled because having more energy available means flying more distance. About the case with 5MJ of energy, the farthest distance that the drone can reach is around 10km whose pair of take-off and landing angles is (54, 53) when ϕ(r ) = 0 (in orange). On the same relative wind, the drone could have gone at a maximum of 7km far away from the truck's road exploiting the shortest trajectory (in blue). We did not report the pairs of angles to the plot on the right since they match the ones on the left.
In Figure 12, we report the in the x-axis the status of the deliveries taking into account P max and P min , while in the y-axis the number of deliveries for that particular status, in the ML-EW scenario. Here, we consider the size of the battery B = 2.5MJ to the left, and 5MJ to the right. A delivery can have one of the following status: always feasible (AF), if it is closer than P min ; always non-feasible (AN), if it is farther than P max ; unknown (U), otherwise. It is really interesting to observe the number of U and AF when comparing MULTI and MULTI-ST. In fact, when relying on MULTI it is possible to perform at least 35% of deliveries more than those done with MULTI-ST. Moreover, the number of non-feasible deliveries dramatically drops down when performing MULTI.

C. Simulation Evaluation
For evaluating our algorithms on a simulated environment, we rely on BlueSky. BlueSky is an open Air Traffic Simulator (ATS), and is meant as a tool to perform research on Air Traffic Management and Air Traffic Flows [29]. At the best of our knowledge, BlueSky is the only simulator in which it is possible to simulate the flight of different aircraft by injecting the presence of the wind. Although BlueSky can model aircraft under the effect of the wind, there is not any available option that computes the actual energy consumption of them. So, we created an ad-hoc plug-in for BlueSky (still at a very preliminary stage though) that can estimate the energy consumed when a drone flies. When a flight simulation is done, BlueSky creates a log file (in CSV format) in which each line comprises different fields, like GPS coordinates, drone's speed, global wind, and so on. Basically, we parse the log file and for each two consecutive lines, we extract the two GPS coordinates, so that we can compute the actual flown distance and the drone's heading. Accordingly, knowing the wind experienced by the drone, we can then precisely estimate the energy consumption of it by using Eq. (10) in [10] (for completeness, reported in Eq. (10) in Section A). Note that, the equation in [10] considers the current wind (i.e., t = 90) and so the energy consumption calculation is much accurate (and slower to compute) than our proposed model.
In Figure 13, we report the in the x-axis the wind direction, while in the y-axis the energy consumption per unit of distance (i.e., kJ/m). The energy per unit of distance is calculated through the ratio total flown distance to total energy consumed. Here, we have to specify two different cases: the results shown under the suffix "model" are determined exactly as done before in the numerical evaluation, while the ones under the suffix "sim" are determined inside the BlueSky simulator. The drone's altitude is 40m above the ground. We set the other parameters with respect to the settings in Section VI-A.
The simulated results confirm the numerical ones. The difference among the simulated and ideal perpendicular paths (SINGLE-ST model and sim) is almost zero, while slightly different is the situation with the non-perpendicular ones. We also observe that the largest energy consumption per meter occurs when the wind and the drone's speed match (i.e., ω s = υ d ). In general, one can observe that the saved energy is less in the simulated environment than in the ideal numerical environment. Except the case with ω s = υ d = 10m/s, the gap in terms of required energy per unit of distance is ≤ 0.1kJ/m in favor of the ideal numerical model. This is because the simulator uses more complicated trajectories for the aircraft while flying between two points. We have indeed observed that the drone does turning maneuvers when changing its direction.

VII. CONCLUSION
For the first time, to the best of our knowledge, we adapt the trajectory of a drone to the wind. We consider a truck-drone tandem delivery system. The drone actively reacts to the wind by adopting the "most tailwind" available trajectory between the truck's path and the delivery. Two solutions are proposed for solving MDP, i.e., when the truck moves on a line (e.g., a highway) in front of the deliveries, and when the truck moves on a polygon that delimits a convex area where the deliveries take place. Currently, our proposed model presents some limitations. For instance, if the wind dynamically changes during a delivery, the drone does not update its path in order to save energy. Moreover, the discretization in multiple wind classes determines approximated angles if we worked in the continuous space, and sometimes the energy estimations differ from the actual ones. Nevertheless, our proposed model has the undoubted value of showing the positive role that the wind can play in the drone flight.
In the future, we would like to confirm our findings by using other simulators, and eventually extending our investigation to a test-bed made by off-the-shelf drones. We will also include discussions on what can go wrong, e.g., time of day/night when winds can be unstable and how to include flight time scheduling to manage different winds at different hours.

APPENDIX DRONE-WIND ENERGY MODEL
The motion of drones is regulated by physical properties [10]. The total required thrust is T = W g + F D , where W is the total weight of the drone, g is the gravitational constant, and F D = 1 2 ρ a 2 s C D A is the total drag force, where ρ is the air density, a s is the drone's air speed (see Eq. (1)), A = π R 2 is the cross sectional area (R is the rotor radius), and C D is the drag coefficient. Having computed T, we estimate the required power P for a steady flight, which is P = T(υ d sin(α) + s i ), where α = arctan (F D /W g) is the pitch angle, and s i , which is the induced velocity required for a given thrust T, can be obtained by solving the implicit equation [30] s i = s 2 h / (υ d cos(α)) 2 + (υ d sin(α) + s i ) 2 , where s h = √ T/2ρ A is the induced velocity at hover [30]. Note that, F D and so α and P depend on the drone's direction γ r . So, fixed ω = (ω d , ω s ), the unitary energy μ(γ r ) of travel along a segment r with direction γ r is calculated as follows: μ ω (γ r ) = P/υ d .
Therefore, the energy consumed for traversing one edge γ r of length λ(γ r ) can be expressed as: d ω (γ r ) = μ ω (γ r )λ(γ r ).   Open Access funding provided by 'Università degli Studi di Perugia' within the CRUI CARE Agreement