Two pursuit strategies for a single sensorimotor control task in blowfly

Effective visuomotor coordination is a necessary requirement for the survival of many terrestrial, aquatic, and aerial animal species. We studied the kinematics of aerial pursuit in the blowfly Lucilia sericata using an actuated dummy as target for freely flying males. We found that the flies perform target tracking in the horizontal plane and target interception in the vertical plane. Our behavioural data suggest that the flies’ trajectory changes are a controlled combination of target heading angle and of the rate of change of the bearing angle. We implemented control laws in kinematic models and found that the contributions of proportional navigation strategy are negligible. We concluded that the difference between horizontal and vertical control relates to the difference in target heading angle the fly keeps constant: 0° in azimuth and 23° in elevation. Our work suggests that male Lucilia control both horizontal and vertical steerings by employing proportional controllers to the error angles. In horizontal plane, this controller operates at time delays as small as 10 ms, the fastest steering response observed in any flying animal, so far.

In-flight capture is considered one of the fastest behaviours in the animal world. Some predators catch their food on the wing like eagles 1 , falcons 2 and bats 3 . Invertebrates such as dragonflies are fine aerial hunters with capture success rates up to 97% 4 . The fastest trajectory adjustments in the range of 20 ms observed so far were reported for male dipteran flies when pursuing a female conspecific on the wing 5 . In the event of predation or reproduction, the survival of these species depends on the successful capture of the target. With the massive development of robotics, it became possible to reconstruct some insect behaviors 6 such as exploring and returning home 7 , following a wall 8,9 , landing on target 10 and avoiding obstacles 11,12 . But in aerial pursuit, the robots' performances are far from aerobatics of real insects 13 . To replicate a pursuit behavior found in nature, it becomes mandatory to investigate the animal's sensorimotor control laws.
Taking advantage to the emergence of high-speed videography in the 1970s, Land and Collett carried out the first experiments to study aerial tracking on the housefly Fannia sp. 14 . Based on their free flight data, they developed a kinematic model formally described as a proportional derivative, PD, controller with proportional and derivative gains (kp and kd, respectively), including a time delay ( t ). This was followed by studies on other species such as hoverfly 15 , housefly 16 and blowfly 17 . In several cases the different pursuit strategies across species were correlated with specific anatomical and neuronal adaptations supporting the behaviour 18,19 .
For a capture to take place the pursuer and the target have to be in the same place at the same time. Before this can happen, the pursuer must continuously maneuver according to the movements of the target. This is the sensorimotor control task. The controller takes as visual input an angular parameter between pursuer and target, and by series of basic neuronal operations, and muscular action it adjusts the steering-i.e changing heading-to stabilize the angular input. Two angles link together the pursuer and the target: one in the pursuer reference frame, the target heading angle, θ E , and one relative to an external frame of reference, the bearing angle, θ A . Relationship between pursuer's heading angle, θ P , and the target's relative angles, θ E and θ A , are presented in Fig. 1a. Angular definitions in pursuit literature may differ between research groups, however in this study we will follow notation used in human ecology, where bearing is defined with respect to an exocentric (allocentric) frame of reference [20][21][22] . In this section we will present pursuit strategies that rely on stabilizing θ E , θ A , or both (equations are given in Table 1).
The mathematical tools proposed to study chases and escapes date back to antiquity. They advanced during the Renaissance with the boom in maritime trade and the problems of piracy. A famous pursuit problem, 'dog tail' or classical pursuit, was described by Pierre Bouguer, a French mathematician and hydrographer in a paper published in the French Academy's Memoires de l'academie royale des sciences in 1735 (from 23 ). It presents the Pursuer's heading angle, θ P , is formed between LOF and x-axis, bearing angle, θ A , between LOS and x-xis, and target heading angle, θ E , is the difference between θ A and θ P . (b-d) Simulation of different pursuit strategies. Steering controllers are divided in two categories. First category aims to maintain a constant target heading angle θ E , (b) to zero in the case of pure pursuit, PP, or (c) to a non-zero angle, β , in the case of biased pursuit, BP. The other control category maintains a constant bearing angle θ A to a non-zero angle, α , and is presented in (d) by proportional navigation, PN. For pursuit simulations, the target linear speed is 1 m/s and the pursuer's speed is 1.5 m/s. The positions of target and pursuer (dark blue and green, respectively) are shown every 20 ms. LOS is shown in black. (b) PP with kp = 1 s −1 and t = 0 s leading to a tracking strategy. (c) BP with kp = 1 s −1 , t = 0 s and 'bias angle' β = −30 °, leading to an interception. (d) PN with N = 3 and t = 0 s , leading also to an interception. Table 1. Equations governing steering for different pursuit strategies. The controller can use two angles as input: target heading angle ( θ E ) or bearing angle ( θ A ), and will stabilize it while changing the pursuer heading by mean of functions f in CTHA, and g in CBA. For pure pursuit and biased pursuit, f is a first order function, with gain, kp and time delay t . Proportional navigation is a first order function (g) with gain N, and time delay t , applyed on first temporal derivative of the bearing angle. Mixed pursuit is addition of the two controllers BP and PN.

Control law for steering Equation
Constant target heading angle (CTHA) Scientific Reports | (2020) 10:20762 | https://doi.org/10.1038/s41598-020-77607-9 www.nature.com/scientificreports/ of position and angular speed of the target 26 . Other species maintain the bias angle constant throughout the pursuits such as Bluefish Pomatomus saltatrix, who keeps a 10° horizontal bias angle 27 . Dragonflies use a biased pursuit strategy in the vertical plane to hold the target image in the dorsal acute zone, a crescent of a particularly high resolution about 55° above the eye equator. Behavioural experiments in dragonfly have shown that the pursuer keeps the target in this region when hunting flying-insect prey 28 . The dorsal acute zone in the dragonfly Sympetrum is exclusively sensitive to short wavelengths of light (blue and UV) 29 , a regional specialization for foraging against the blue sky. In their acute zones some dragonfly species feature a remarkably high spatial resolution in the range of about 0.1°, which is-apart from some robberflies 30 -probably the best found in any insect/arthropod species. Steering controls that aim to maintain the target heading angle constant can thus lead to different pursuit strategies. When the system stabilize the target heading angle to zero the pursuer present a tracking strategy, and when it stabilize to a non zero constant, the pursuer follow an interception path.
The other control category maintains a constant bearing angle θ A (Fig. 1d). Proportional navigation, PN, is often used in the aerospace industry for missile guidance 31 as it was considered as a control strategy with energy saving optimum 32 . An image to exemplify the situation is that of a pursuer shadowing a prey from an infinite distance away. The change of course is governed by changes of the bearing angle multiplied by a factor, N, between 1 and 5, see Eq. (1.3). This control strategy has been found in an insectivorous echolocating bat 33 , killer fly and robber fly 30,34 . The latest comparative study 1 suggests that a small N is more effective in cluttered environments and with highly-manoeuvrable targets (see killer fly with N = 1.5 30 ). If N = 1 , PN is similar to PP, and assures a capture in any case, if the pursuer's speed is higher than that of the target. If N gets higher (3)(4)(5), the pursuer will perform a parallel navigation path, also called Constant Absolute Target Direction strategy 33 , which is optimal for low-manoeuvrable target, or for high-speed chasers operating in open field such as peregrine falcon 2 and some robber flies 30 . In practice, it is not very clear how the animal measures this absolute bearing angle to keep it constant. An idea could be the addition of θ E and θ P (Fig. 1a), but it supposes animal can estimate it's own orientation. The fly could also use first temporal derivatives, since changes in body orientation may be sensed by the fly's gyroscopic halteres which measure body rotation rates 35 , and changes in error angle encoded in male specific visual neuron MLG1 36 .
Brighton and Taylor 1 first showed the possibility of a mixed orientation law in hawk adding PP and PN (Eq. (1.4)), that would give an advantage when the target moves fast or in a cluttered environment. This strategy has been used in missile guidance 32 .
Our work aimed to identify the control strategies underlying aerial pursuit in the male blowfly Lucilia sericata. To this end, we carried out a series of experiments in which male flies were chasing dummy females moving on a computer-controlled 2d trajectory. The resulting 3-dimensional free flight data enabled us to study strategies the flies apply to control their steering in the horizontal and the vertical planes.

Results
Olberg et al. 4 proposed a static approach to define the pursuit strategy of the dragonfly. The authors compared the variations of θ E and θ A during pursuits. They discovered an average variation of 2.8° for the bearing angle θ A , and 8° for the error angle θ E . As the variation is smaller for the bearing angle, the authors proposed that the dragonfly changes course in order to keep θ A constant. Based on our experimental data we argue that the study of the distribution of θ E , θ A and θ P gives important information but it will be necessary to perform a thorough temporal analysis of the trajectories to derive a robust control system. To propose a 3D kinematic model of the pursuit behaviour, we analysed thoroughly the angular distribution of the main angles defined in Fig. 1. We also achieved cross correlation between angles and their rates. Finally, we analysed the flight speed of the flies.
Distribution of invariant parameters. In azimuth. Pursuer heading angle θ PH and bearing angle θ AH (P for pursuer, A for absolute bearing angle, and H for horizontal plane) are uniformly distributed, making their mean vectors' length almost equal to zero (Fig. 2a,b). In other words, the pursuer flies and chases in any direction. The mean vector of the target heading angle, θ EH was centred on − 21° (Fig. 2c). The preferred direction angle − 21° is an offset due to the definition of the direction of rotation of the target (see 37 ). The length of its mean vector suggests that in the horizontal plane, the fly is using a constant target heading angle controller. On the other hand, because of the large variance of θ AH this angle is unlikely to be used for the controls within the horizontal plane, which excludes the constant bearing angle controller and thus the proportional navigation strategy, PN.
In the vertical plane. θ PV and θ AV differ in their mean value, 15 and 47°, respectively, but they both show small standard deviation, 16 and 20°, respectively (Fig. 2d,e). The vertical error angle θ EV is centred around 32±18 ° (Fig. 2f). In contrast to the horizontal plane, it does not matter whether the fly turns left or right, the mean θ EV always stays at 32° elevation. At first glance, it is impossible to know which parameter of θ AV or θ EV the fly is trying to keep constant. Thus, the fly may use in elevation a constant target heading angle controller (Eq. (1.2) with β = 32°), or a constant bearing angle controller (Eq. (1.3)), or an hybrid controller (Eq. (1.4)). We will address this question in the next section.
Kinematics: control of steering. We began by looking at the relationship between θ P , θ A and θ E . In the horizontal plane, θ P = θ A (Fig. 3a), whereas θ E is maintained around 0° (Fig. 3b). It confirms the hypothesis that the fly tries to stabilize θ E . In the vertical plane, the values of θ P , θ A and θ E stay more or less constant (Fig. 3c,d). For further investigations we need to introduce the angular velocities P , A and E , which correspond to the first temporal derivatives of θ P , θ A and θ E , respectively.  .3)). The analysis of our data reveals that P has a strong linear correlation with θ E (R = 0.75) and with A (R = 0.7). The maximum correlation (R = 0.75) is for � P = kp · θ E (t − �t) with kp = 17.4 s −1 and t = 10 ms (Fig. 3f). We found a very low correlation between P and E (Fig. 3j). As the fly employs only a proportional controller-and not a proportional derivative-, the 24Hz modulations of target's velocity have been filtered out, thus they don't have any impact on the pursuer's steering (for details about this 24 Hz modulation see "Methods"). Most aerial chasing insects which employ a PP use a proportional-derivative controller to stabilise P . This includes Fania 14 as well as honeybee when tracking small moving platforms 25 . Dilochopodid flies, on the other hand, use a simple proportional controller 38 .
As if the fly followed a PN strategy, we found a good correlation (R = 0.7) between the variation of the bearing angle and the horizontal steering � P = N · � A (t − �t) , with N = 0.43 and t = 26 ms (Fig. 3i).
Our analysis suggests that Lucilia sericata uses a hybrid steering control (Eq. (1.4)), similar to what has been observed in hawks 1 .
Vertical plane: hybrid control for interception. For steering in the vertical plane we found that the change of course, P , is linked to the same parameters as for the horizontal plane. P is linearly related to θ E (R = 0.75) with kp = 15.6 s −1 and t = 21 ms (Fig. 3h). P is also linearly related and to A (R = 0.7) with N= 0.62 and t = 32 ms (Fig. 3k). Other similarity with the results found for the horizontal plane is that P in not linearly correlated with E (Fig. 3l). On the other hand, the curve � P = k · θ A in Fig. 3g has a non-negligible R of 0.5 that was not observed in horizontal plane (Fig. 3e). Because this maximum correlation was found for a zero delay between P and θ A , we have not included θ A in the formulation of the control laws.
Similarities in the two planes of approach. There are conspicuous similarities between the coefficients we obtained for the equations describing the horizontal and vertical control: the data shown in Fig. 3f,h have the same profile which is also true for Fig. 3i,k: kp H = 17.4 s −1 , kp V = 15.6 s −1 , N H = 0.43 , and N V = 0.62 . However the differences are notable on the sensorimotor delays. For vertical corrections between θ E and P , the delay is twice as long as the one for horizontal corrections ( t H = 10 ms and t V = 21 ms). The delay is also longer for vertical corrections between A and P ( t H = 26 ms and t V = 32 ms). We have already shown that in the vertical dimension variances of angular parameters are smaller than for the horizontal dimension.
The correlations between P and kinematic-related parameters ( θ E , θ A , E and A ) give rise to useful observational relationships. It becomes important to consider building a model to understand the contribution of each relationship to the global steering strategy.
Kinematics: control of speed. The modeling of the chasing strategies are sometimes limited to the characterisation of 2D or 3D steering without much consideration about forward speed control. Boeddeker et al. 17 developed a virtual blowfly to model chasing behaviour. They implemented a speed controller based on the apparent angular size of the target (see Eq. 3). With this controller, the authors were able to include the phenomenon that some flies got stuck at a certain distance from the target, which they called: Pursuit chases. Getting closer to the target creates an image expansion of the target triggering deceleration, while image contraction due to an increased distance initiates acceleration. The underlying relationship between the target size and forward speed is given by the curve shown in Fig. 4a. There is a conspicuous difference between the curve presented by www.nature.com/scientificreports/ Boeddeker 17 and our experimental data. The most substantial differences are along the shape of the curve on the one hand and the distribution of our data on the other. These discrepancies are possibly due to different turning radii of the dummy trajectories used in the two studies. Boeddeker 17 applied a larger turning radius than we did in our experiments, which enabled the flies to reach higher forward speeds. So we looked for an alternative control law for forward speed and found an average linear correlation of R ∼ − 0.5 between horizontal speed and θ EH , which was the same between horizontal speed and EH (see Fig. 4c,d).
Developing kinematic models. In a first step, we simulated the responses of a virtual fly by implementing the steering control Eqs. (2.1, 2.2) in Matlab/Simulink 2019. We used the experimental data to specify the initial conditions and forward speed used in our simulations. The implementation of a forward speed controller, based on the relationships presented in Fig. 4, did not give satisfactory results, which is probably explained by their Figure 3. Impact of angular and angular rate parameters on the heading. (a-d) Heading angle θ P as a function of absolute bearing angle θ A and bearing angle θ E . While in azimuth, the angular range covers ± 180°, in elevation angular range is ± 90°. (e-h) Change of heading rate P as a function of angles θ A and θ E . (i-l) Change of heading rate P as a function of angular velocity A and E . Maximum correlation R and its delay t are displayed in green insets if R ≥ 0.7 . Scale X = [0:50 ms], Y = [0:1]. Red lines show linear fits between θ E and P suggesting a biased pursuit strategy. Blue lines show the linear fits between A and P indicative of a proportional navigation strategy. Gains (kp and N) and delays ( t ), from coloured graphs were used in the two control Eqs. (2.1) and (2.2). To facilitate comparison of linear fits between θ E and P in horizontal and vertical planes in (f) and (h), respectively, the same angular range of ± 90° is applied for θ EH and θ EV . 93% of all θ EH were in this angular range. www.nature.com/scientificreports/ low correlation coefficients between horizontal speed and the values of θ EH EH . Thus, the speed of the model fly is set to be equal to the speed of the real fly-i.e it changes from moment to moment, depending upon the instantaneous speed of the real fly. The trajectories of the simulated fly were evaluated based on their deviation from the trajectory of the experimental animal by the error, ε , defined as the mean absolute distance between the measured ( x P ,ŷ P ,ẑ P ) and simulated ( x P , y P , z P ) positions of the pursuer at each time point: where x′ corresponds to the horizontal displacement, see Eq. (9). Based on the model derived from behavioural parameters, we created three virtual fly models, and tested them both for the horizontal and the vertical plane. The models simulated: (i) biased pursuit, BP, (ii) proportional navigation, PN and (iii) a mixed pursuit strategy, MP, which combines biased pursuit and proportional navigation. The gains implemented in each model were estimated using the smallest error, ε , as a performance measure.
We then compared the performance of the different models to real pursuits. The MP and BP models performed best and second best, respectively, with the PN model coming third. We did not find a significant performance difference between the MP and the BP model, neither in the horizontal nor in the vertical plane (Figs. 5, 6).
The comparison of the model performances may suggest that PN has no sizable impact on the fly's control strategy. On the other hand, if PN is not necessary, but we observed a linear relationship between P and A , how can we exclude PN? One answer can come from the small value of the coefficient N. When PN strategies are applied in nature, N is always bigger than one (see "Introduction"). Here we found N H = 0.43 and N V = 0.62 for the behavioural data (see Fig. 3i,k), and N H = 0.15 and N V = 0.05 for the MP model (see Fig. 5c,g). The advantages of such a small N coefficient are rather unclear even if the PN and BP strategies are combined. Overall, our results suggest that the control strategy offering the best performance is the biased pursuit with a proportional controller in both azimuth and elevation heading control. Finally, we varied the bias angle values in our BP model for elevation, and found that β = 23 ° gave the best performances.
The difference in strategy between the two planes lies essentially in the value of the bias angle, β , gain, kp, and the time delay t . In the horizontal plane β H = 0 °, which leads to a tracking strategy. In the vertical plane β V = 23 ° which leads to an interception strategy. Hypotheses concerning the use of the two pursuit strategies, tracking along azimuth and interception along elevation, will be developed in the next section. www.nature.com/scientificreports/

Discussion
The two strategies observed, horizontal tracking and vertical interception, would therefore require to maintain a different constant target heading angle θ E depending on the plane of approach. The horizontal angle of error, θ EH tends to be equal to zero since the body axis is usually aligned with the speed vector. In some cases, however, the body axis and speed vector are not aligned, for instance during side-slip-as a result of inertia during high speed banked turns, acrobatic moves during chasing flights 37 , or-more importantly-after sudden body saccades (rotations around the vertical axis) 39 .
In the vertical plane, this misalignment between speed vector and line of sight, LOS, may also be explained by the location of the acute zones in the fronto dorsal part of the compound eye of male dipteran flies 40 (described in "Introduction" for dragonflies). This area features larger lenses that capture more light, increasing light sensitivity, faster photoreceptor responses, and neural connections feeding into sex specific pathways 36,41,42 . These sexual dimorphisms support male chasing behaviour and have probably developed under high evolutionary pressure. In the vertical plane, however, we know that the body axis is hardly aligned with the speed vector, nor with the LOS 37 . The role that the orientation of the body plays in the dynamics of the pursuit is the subject of an article in preparation.
Unlike male blowflies, dragonflies use interception strategies in both azimuth and elevation. Why would the fly change the strategy of its successful ancestors, in addition to completely different flight aerodynamics and therefore a different control ability? One answer could come from the movements of the head. During pursuit, the dragonfly head moves to stay locked to the target 28,43 . The position of the target is maintained in the acute zone. Even Drosophila, who does not possess an acute zone presents head movements in the context of tracking and compensation of background motion 44 . Contrary to the high neck mobility of dragonflies, blowflies can only rotate their head with a maximum head-thorax yaw angle of ± 20°4 5 , and a 10° mean peak of head-thorax yaw angle during saccades 46 . In our experiment, the data were normalized to a target rotating in an anticlockwise direction. This created an offset for the target heading angle, θ EH = 21°, as presented in Fig. 2c (more details are discussed in 37 ). The θ EH offset, and the maximum head-thorax yaw angle measured in blowflies are very similar. To define their relationship one requires head-body angle measurement, which would be a challenge to determine during pursuit.
The extremely fast control of horizontal heading direction of 10 ms ensures a tight visual connection with the target, which may partially compensate for the low mobility of the neck in the case of horizontal tracking. The same argument would hold for the vertical pursuit, as the angular range for pitch head movements in Calliphora is also just ± 20°4 5 . So why is vertical strategy different than the horizontal one? As opposed to pure pursuit, interception is more energy-efficient 47 . If the fly employed a pure pursuit strategy in the vertical plane it would take the risk of overshooting, causing considerable energy losses, the more so as it would have to fight gravity. After all, chasing is energy-intense and may be used as fitness selection criterion. Only the fittest (in terms of sensory processing/accuracy and flight performance) males get to mate and produce offspring. www.nature.com/scientificreports/ To capture the target the pursuer can follow different pursuit strategies as described in "Introduction", i.e tracking or interception. The resulting trajectories may be implemented by smooth continuous (smooth pursuit) or almost step-like (steering-saccade) functions. The use of body-saccades plays an important role in stabilising the gaze 48 during locomotion. Translation generates wide field retinal image shifts, or optic flow fields, containing relative distance information based on motion parallax. This information, however, is masked by distanceindependent rotational optic flow which is of higher magnitude and relevant for flight stability and gaze control. To minimise the time during which other visual information is masked by rotational optic flow, Calliphora is known to perform fast gaze shifts in form of head-and body-saccades during cruising flight 49,50 .
To find out whether Lucilia performed body-saccades during its chasing flights we extracted angular rotation peaks-which reached values of up to 7000°/s-and associated changes in forward speed from our free flight data. We isolated the 6 fastest yaw rotations and yaw speeds higher than 1500°/s. The analysis of these segments demonstrated an expected reduction of the forward speed when the fly performed those spectacular saccadic rotations (Supplementary Figure S2). Deceleration of the forward speed, coupled with high yaw rotation describes a maneuver called coordinated turns, in which the fly controls its centripetal acceleration to avoid side-slips. This maneuver has been described in loitering honeybees 51 .
To study steering saccades, Braun et al. 50 extracted free 'flight primitives' (or prototypical movements) by cluster analysis of flight features such as translational speeds or angular velocities. Researchers applied this method on cruising flight in blowfly and hoverfly 52,53 . They quantified the differences of flight attitude between the two species. It would be very interesting to use this technique on our pursuit flight data to compare the prototypical movements of the male blowfly chasing and cruising. For now, we analyzed the relationship between forward speed and yaw angular velocity in horizontal plane, and we found that the forward speed decreases 10 ms before the onset of the yaw rotation (Fig. 4b), which is in line with what was described in houseflies 14 .
As the z-position (altitude) of the target was not varied in our experiments, the dynamic input range we used to identify the vertical control strategy is somewhat limited. Incidentally, it is also in the vertical dimension where the previously cited hypothesis presented by Strydom 47 appears not to apply. In the vertical plane, kd/kp = 3 ms which is different from the delay of 26 ms measured in our experiments. Further experiments where the z-position is systematically varied would help to overcome the current limitation.
Although the vertical input range is limited due to the constant z-position of the dummy, different initial conditions regarding the start positions for the flies' chasing flights introduce a certain degree of variability in altitude-related parameters. To our knowledge, the rare studies on vertical approach have been realised with  (9)). Note that the MP and BP models produce highly similar results which come close to the trajectories of the real fly. To quantify the differences between experimental and model trajectories we used a point-to-point error, ε (Eqs. (4,5)).
Scientific Reports | (2020) 10:20762 | https://doi.org/10.1038/s41598-020-77607-9 www.nature.com/scientificreports/ targets moving in the horizontal plane for dragonfly 43 , robberfly 30 and killerfly 34 . In another experiment with drone bees pursuing a suspended queen, van Praagh et al. 54 measured the elevation angle between body axis and line of sight. Distribution of this angle (noted α ) is similar to our measures of θ EV and θ AV . It is reassuring that our flies keep the target projected onto a vertical angular range which corresponds well with the position of the acute zone, such as described for the drone bee. Indeed blowfly males and drone bees (also males) share several morphological properties such as body size, restricted movements of the head during flight, and the presence of a dorsal acute zone. Different pursuit strategies in the horizontal and vertical plane as suggested by our study may be, at least partly, the result of the fly's specific body shape. The asymmetric mass distribution and shape along the yaw and pitch axes are likely to be differentially affected by the inertial vector and gravity. This may impose different dynamics for horizontal and vertical steering which could have facilitated the development of the separate pursuit strategies.
Although only at a low coefficient of R = 0.5 , there is a correlation between PH and PV . Indeed we found a linear relation of the form: � PZ(t) = k · � PH(t−�t) + A with k = −0.25 , t = 21 ms, and A = 3.85 s −1 (see Supplementary Figure S3). A large path change in horizontal plane-independent of direction of rotation-is followed by a negative vertical rotation, i.e. a downward rotation. This phenomenon can be explained by the presence of banked turns.
In fixed wing aircraft, changes in heading direction is usually performed with banked turns, such as in fruit flies 55 , or in bioinspired flapping wing aerial robot 56 . To turn left the body rolls along its longitudinal axis to the left. The projection of the lift following this rotation onto the horizontal plane is a force orthogonal to the speed vector creating a change of heading, that is inversely proportional to the forward speed (Equation (1) in Supplementary Figure S2). The gain in force due to the yaw rotation is compensated by negative vertical lift resulting in a loss of altitude. However, when the relationship between horizontal and vertical steering is implemented in the vertical steering control, we did not observe any significant improvement of its performance. To confirm the presence of banked turns in blowfly pursuit, roll-angle measurements would be required, which is a technical challenge in free flight experiments.
In summary, we have analyzed a series of 17 chasing flights where a male blowfly was pursuing a moving dummy. The analysis of the resulting trajectories suggests that the pursuit strategy is not the same along the 3 dimensions. Our comparative modelling study provides evidence that a constant target heading angle controller best captures the kinematics of the chasing flights we have analyzed. This controller leads to tracking if driven by the target heading angle in the horizontal plane, and it leads to interception if driven by a biased elevation angle in the vertical plane. Thus we can assume that constant target heading angle is the general strategy and both tracking and interception are just consequences of the presence of the bias angle. The difference between tracking in the horizontal plane and interception in the vertical plane may be explained by a trade off between evolutionary fitness and energy efficiency, respectively, but may require further studies to support this interpretation. It is both beautiful and remarkable that the combination of two simple proportional controllers are capable of reproducing behaviour as complex as fly chasing flights at ultra-fast time scales. This is in line with the Braitenberg vehicles's 57 spirit where the synthesis is often simpler than the analysis. Such parsimonious design may be a source of inspiration when it comes to the development of novel control architectures for aerial robotic platforms.

Methods
Animals. We used a recently developed setup 37 to record chasing flights in blowflies (Lucilia sericata). Pupae were purchased from an animal supplier (BioFlyTech) in Spain. Male flies aged between 5 and 12 days were placed in the arena. They were exposed to a 12:12 h light:dark cycle with a luminance of about 2000 cd m −2 at a temperature between 20 and 25 °C. 20 males stayed in the arena without engaging in an experiment for one day to get used to their new environment. The experiments were recorded during the 5 consecutive days around noon, during the high diurnal activity phase. Every day we presented to the flies 20 repetitions of each target trajectories, with 1 min between each experiment.
Videography. The volume of the chasing flight arena (50 × 50 × 70 cm) was almost entirely observed by two stereovision cameras (PROSILICA GC640) with a spatial resolution of 640x480 pixels. A schematic view of the arena and the two stereovision cameras is presented in Fig. 7a. We recorded at a temporal resolution of 190 frames per second. The cameras were equipped with optics used at fixed focal depth (6 mm, F = 1.4).
The synchronised images from both cameras were analysed and the 2D positions of the fly and the target were obtained using the toolbox DLTdv5 developed by Hedrick's lab 58 (see Fig. 7b for an example of 2D object tracking using this toolbox). Its 3D reconstruction tool was then applied to obtain the spatial positions of the two protagonists (Fig. 7c) with a standard deviation of 5 mm and a time resolution of 5, 3 ms. A detailed description of the system has been previously published by Varennes et al. 37 .
The dummy. Moving the target. The target was a small dark sphere of 8 mm diameter, similar to a female profile, which followed predefined trajectories in the flight arena. It moved on three degrees of freedom, two translations in the horizontal plane and one rotation around the vertical axis (see 37 for further details). These movements were controlled by three motors: two steppers and one DC motor. They were positioned outside the arena to reduce potential distractions of the flies. A system of belts and pulleys allowed the target to be positioned with an average error at each position of less than 5 mm along a course of 3 m long.
Target trajectories. Males were presented with two types of target trajectories for this study. In the first case, the target was moved on a circular path at a speed of 1 m/s. The second trajectory combined a translation along www.nature.com/scientificreports/ the y-axis with a rotation around the vertical axis, which created a spring-shaped movement of the target. The forward speed of the target varied between 0 and 1.5 m/s , and its angular velocity ranged between 360 and 1300°/s (while the rotation around the z-axis was kept constant). With these two trajectories, we presented to the pursuers a variety of dummy kinematics, varied enough to study the sensorimotor control of the animal during its pursuit flight. Positions and velocities of purser and target are presented in Supplementary Figure S1. During circular trajectories, 24 Hz modulations of unknown origin appeared in the target's translational velocity profile, as discussed later, they have been filtered out by the fly.

Data analysis. Pursuit sequences.
A fly was considered to engage on a pursuit flight when abruptly changing its speed and orienting towards the dummy. Pursuit flights normally ended by the fly catching the target. Flight trajectories were varied in shape, and distributed throughout the volume of the flight arena. The broad range of flight speeds we observed were in line with data reported for the slightly bigger blowfly species Calliphora 39,59 . General features of the chasing behaviour were comparable with results obtained in a previous study on Lucilia 60 . In our analysis, we only included flights with a final capture. Indeed, about 30% of the chases were abandoned in flight. This figure is roughly aligned with abandoned pursuits ratio of 43% in the muscoid fly Coenosia and 36% in the asilid fly Holcocephala 34 . We were unable to identify the reason for the animals to abandon their chasing flights.

Variables of interest.
To quantify the pursuit strategies observed in Lucilia we introduced the following parameters: line of sight, LOS, is the line connecting the centre of mass of the pursuer (x P , y P , z P ) to the centre of mass of the target (x T , y T , z T ) . Line of flight, LOF, is the line connecting two consecutive positions of the pursuer, which is equivalent to its speed vector. The Cartesian coordinates of the positions were transformed into spherical coordinates. For the sake of clarity, spherical coordinates about LOF will be noted (θ PH , θ PV , R P ) , with P referring to the pursuer, and spherical coordinates relative to the LOS will be noted (θ AH , θ AV , R A ) with A referring to absolute bearing angle. The spherical radii R represent the distance to the target for the LOS noted R A , and the distance travelled by the fly per time unit for the LOF noted R P . LOF and LOS forms with the absolute reference frame an azimuth angle θ H ∈ [−180 • :180 • ] deg and an elevation angle θ V ∈ [−90 • :90 • ] deg. Finally the target heading angle or error angle noted θ E is also composed of a horizontal and a vertical component. They are formed between LOS and LOF, in other words the difference between θ A and θ P .
When we present the vertical plan of the pursuit (Fig. 7d right) we plot the elevation on the y-axis against the absolute horizontal displacement, x′, on the x-axis.
where ( x P ,ŷ P ,ẑ P ) are the measured and ( x P , y P , z P ) are the simulated positions of the pursuer at each time point n.

Data availability
High-speed videos of the pursuits will be uploaded in supplementary data. Reconstructed trajectory data analysed during this study, and the matlab/ simulink models of the steering controllers are available in the following GitHub: https ://githu b.com/veand re/blowfl y-pursu it.
(x P(n+1) − x P(n+1) ) 2 + (ŷ P(n+1) − y P(n+1) ) 2 − (x P(n) − x P(n) ) 2 + (ŷ P(n) − y P(n) ) 2 a b d c θ PH ,θ AH ,θ EH θ PV ,θ AV ,θ  www.nature.com/scientificreports/ Open Access This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creat iveco mmons .org/licen ses/by/4.0/.