Figures and data

Quantification of roll correction strategies across genotypes.
A Schematic of halteremediated fast flight control. Sensory information from the wing and halteres is sent to the wing steering muscles to drive changes in wing kinematics. B Muscle schematic highlighting five muscles implicated in roll maneuvers: b1 (blue), b2 (teal), b3 (magenta), i1 (orange), and i2 (red). Data are from Lindsay et al. (2017). C Dissections showing expression of GFP driven by split-GAL4 driver lines used to target b3, i1, and i2. D Apparatus for inducing roll perturbations. Helmholz coils deliver a magnetic torque to a fly affixed with a magnetic pin, and the response is captured by three highspeed cameras. E Definition of body angular degrees of freedom, in the lab frame of reference. F Definition of wing angular degrees of freedom, in the body frame of reference. G Top: Video stills showing one view of a fly during a roll perturbation. Bottom: Measured body roll angle over time during a roll perturbation. Yellow bar indicates timing of the magnetic impulse. H Top: Video stills of the same fly in D, now showing approximate wing stroke amplitude during a roll perturbation. Bottom: Stroke angle of left (blue) and right (red) wings over time during a roll perturbation. I Stroke angle of the uppermost wing for a single wingbeat before (grey) and during (yellow) a roll correction, averaged across all movies of genetic control flies (SS01062 > UAS-bGtACR1; N = 17). Shaded regions represent boostrapped confidence interval. J As in I, for the lower wing. K Wing pitch angle of left (blue) and right (red) wings over time for the roll perturbation shown in D,E. L Wing pitch angle of the uppermost wing for a single wingbeat before (grey) and during (yellow) a roll correction, averaged across all movies of genetic control flies. Shaded regions represent boostrapped confidence interval. M As in L, for the lower wing. N Change in upper wing stroke amplitude during peak correction across all movies with individual motor neurons inhibited (N = 30, 50, 20, 30, 31, and 12, respectively). Data for b1, b2 inhibition are from Whitehead et al. (2022). O As in N, showing change in lower wing stroke amplitude during peak correction. P As in N, showing change in peak wing pitch value for the upper wing during peak correction. Q As in P, showing change in peak wing pitch value for the lower wing during peak correction. All statistics are Kruskal-Wallis test with Bonferroni correction for multiple hypotheses. Figure 1—figure supplement 1. Deviation angle changes during roll perturbations Figure 1—figure supplement 2. Controller model fits during roll perturbations

Free-flight optogenetic manipulation.
A Average body pitch (i), roll (ii), and yaw (iii) during optogenetic activation of the i1 motor neuron (SS41039 > UAS-CsChrimson, orange, N = 119) compared to genetic controls (SS01062 > UAS-CsChrimson, grey, N = 195). Red bar indicates timing of optogenetic stimulus. Shaded areas represent bootstrapped confidence interval. B Stroke angle of for a single wingbeat before (grey) and during (orange) optogenetic activation of the i1 motor neuron, averaged across all movies. C Wing pitch angle for a single wingbeat before (grey) during (orange) optogenetic activation of the i1 motor neuron, averaged across all movies. D-F As in A-C, for optogenetic activation of the i2 motor neuron (SS37246 > UAS-CsChrimson, red, N = 38). G-I As in A-C, for optogenetic inhibition of the b3 motor neuron (SS98650 > UAS-GtACR1, purple, N = 139. Genetic controls SS01062 > UAS-GtACR1, grey (A i-iii), N = 557). J Change in stroke amplitude across all free-flight opotogenetic experiments. (N = 195, 119, 38, 139, 75, and 84 respectively). Data for b1, b2 activation are from Whitehead et al. (2022). K As in J, for the change in peak wing pitch angle. All statistics are Kruskal-Wallis test with Bonferroni correction for multiple hypotheses. Figure 2—figure supplement 1. Optogenetic inhibition of i1, i2 and activation of b3 Figure 2—video 1. Example video showing wings stalling during i1 activation using CsChrimson.

Quasi-steady aerodynamic calculations to determine relevance of kinematic changes to corrective torque.
A Experimentally measured stroke (i), deviation (ii), and wing pitch (iii) angles during a roll correction. B 50 Linearly interpolated wing kinematic profiles for a single wingbeat, ranging from before perturbation (grey) to the maximally corrective wingbeat (yellow): (i) upper wing stroke angle, (ii) upper wing deviation angle, (iii) upper wing pitch angle, (iv) lower wing stroke angle, (v) lower wing deviation angle, and (vi) lower wing pitch angle. C Schematic of rotation about body roll axis correcting a perturbed fly (grey) to zero body roll angle (color). D Wingbeat-averaged roll torque generated by different combinations of the wing stroke profiles in B. Y axis varies only lower wing stroke amplitude from pre-perturbation (grey) to maximally corrective (yellow). X axis uniformly varies all other wing kinematic profiles from pre-perturbation (grey) to maximally corrective (yellow). E As in D, with upper stroke profile varying along the y axis and all other kinematic profiles varying along the x axis. F As in D, with upper wing pitch profile varying along the y axis and all other kinematic profiles varying along the x axis. G Schematic of rotation about body z axis correcting a perturbed fly (grey) to zero body roll angle (color), at the cost of slightly altered pitch and yaw angles. H-J As in E-G, with wingbeat-averaged z torque plotted. All contour lines are spaced by 5 × 10−10 N⋅m. Figure 3—figure supplement 1. Visualization of changing only upper wing pitch during wingstroke Figure 3—figure supplement 2. Quasi-steady aerodynamic calculations for other wing kinematic variables

Quasi-steady aerodynamic calculations simulating the effect of wing kinematic changes caused by optogenetic manipulation on aerodynamic torque when applied unilaterally.
A Experimentally measured stroke (i), deviation (ii), and wing pitch (iii) angles during optogenetic activation of the i1 motor neuron. B 50 Linearly interpolated wing kinematic profiles for a single wingbeat, ranging from before stimulus (grey) to approximately 30 ms after i1 activation (orange) on one wing, while the other wing kinematic profiles are kept static (pre-stimulus kinematics, grey): (i) “upper” (right) wing stroke angle, (ii) “upper” (right) wing deviation angle, (iii) “upper” (right) wing pitch angle, (iv) “lower” (left) wing stroke angle, (v) “lower” (left) wing deviation angle, and (vi) “lower” (left) wing pitch angle. C Wingbeat-averaged roll torque generated by different combinations of the wing stroke profiles in B. Y axis varies only “upper” (right) wing stroke amplitude from pre-stimulus (grey) to optogenetically activated (orange). X axis uniformly varies other “upper” (right) wing kinematic profiles from pre-stimulus (grey) to optogenetically activated (orange). “Lower” (left) wing kinematics never change. D As in C, with “upper” (right) wing pitch angle varying along the y axis instead. E,F As in C,D, with wingbeat-averaged z torque plotted instead. G-J As in D-G, using kinematic profiles for i2 optogenetic activation. K As in C, using kinematic profiles for b1 optogenetic activation with “lower” (left) wing stroke angle varying along the y axis, and other “lower” (left) wing kinematic profiles varying along the x axis. “Upper” (right) wing kinematics never change. L As in K, with wingbeat-averaged z torque plotted instead.M,N As in K,L, using kinematic profiles for b2 optogenetic activation. Raw data for b1, b2 activation are from Whitehead et al.(2022). O,P As in M,N, using kinematic profiles for b3 optogenetic inhibition. All contour lines are spaced by 5 × 10−10 N⋅m. Figure 4—figure supplement 1. Linearly interpolated profiles for i2 activation Figure 4—figure supplement 2. Linearly interpolated profiles for b1 activation Figure 4—figure supplement 3. Linearly interpolated profiles for b2 activation Figure 4—figure supplement 4. Linearly interpolated profiles for b3 inhibition

Connectome analysis using BANC dataset.
A EM renderings of haltere afferents and b1, b2, b3, i1, and i2 motor neurons. B Synapses on LHS (left) and RHS (right) of haltere afferents onto selected motor neurons. C Cosine similarity of normalized haltere inputs on LHS (left) and RHS (right). D Example synaptic pathway (red) through wCHINs (reconstruction in inset) across the midline, compared to direct connectivity cluster (blue)

Proposed schematic of redundancies within the roll control system.
Sensory haltere input is divided between two clusters of muscles based on their kinematic output. These kinematic changes then combine to produce corrective roll and z torques.

Fly stocks

Simulation constants and parameters.

Deviation angle changes during roll perturbations.
A Deviation angle of the left (blue) and right (red) wings over time during a roll perturbation. B Deviation angle of the uppermost wing for a single wingbeat before (grey) and during (yellow) a roll correction, averaged across all movies of genetic control flies (SS01062 > UAS-GtACR1; N = 17). Shaded regions represent bootstrapped confidence interval. C As in B, for the lower wing. D Change in wingbeataveraged upper wing deviation angle during peak correction across all movies with individual motor neurons inhibited (N = 30, 50, 20, 30, 31, and 12, respectively). Data for b1, b2 inhibition are from Whitehead et al. (2022). E As in D, showing changes in wingbeat-averaged lower wing deviation angle. All statistics are Kruskal-Wallis test with Bonferroni correction for multiple hypotheses.

A Example roll controller fit. Top: Body roll angle over time during a roll perturbation. Yellow bar indicates magnetic impulse. Bottom: proportional (grey, solid) and integral (black, dashed) controller terms summed to predict stroke amplitude difference (red), compared to measured stroke amplitude data (black dots). B Measured integral gains across all movies with individual motor neurons inhibited (N = 50, 20, 30, 31, 9, and 30, respectively). Data for b1, b2 inhibition are from Whitehead et al. (2022). Statistics are Kruskal-Wallis test with Bonferroni correction for multiple hypotheses. C As in R, for measured proportional gains. D As in R, for measured time delays.

Optogenetic inhibition of i1, i2 and activation of b3.
A Average body pitch (i), roll (ii), and yaw (iii) during optogenetic inhibition of the i1 motor neuron (SS41039 UAS-GtACR1, orange, N = 100) compared to genetic controls (SS01062 > UAS-GtACR1, grey, N = 345). Red bar indicates timing of optogenetic stimulus. Shaded areas represent bootstrapped confidence interval. B Stroke angle of for a single wingbeat before (grey) and during (orange) optogenetic inhibition of the i1 motor neuron, averaged across all movies. C Wing pitch angle for a single wingbeat before (grey) during (orange) optogenetic inhibition of the i1 motor neuron, averaged across all movies. D-F As in A-C, for optogenetic inhibition of the i2 motor neuron (SS37246 > UAS-GtACR1, red, N = 34). G-I As in A-C, for optogenetic activation of the b3 motor neuron (SS98650 UAS-CsChrimson, purple, N = 68. Genetic controls SS01062 > UAS-CsChrimson, grey (A i-iii), N = 195). J Change in stroke amplitude across all free-flight opotogenetic experiments. (N = 100, 34, 68, and 345 respectively). K As in J, for the change in peak wing pitch angle.

Visualization of changing only upper wing pitch during wingstroke.
Top: Schematic illustrating direction of wingstroke. Middle: Ball and stick plot of the front stroke showing effect of wing pitch angle before and after a roll perturbation, with wing stroke and deviation angles keept at pre-perturbation trajectories. Bottom: As in the middle, for the back stroke. Wing trajectories are the same analyzed in Figure 3.

Quasi-steady aerodynamic calculations for other wing kinematic variables.
A Wingbeat-averaged roll torque generated by different combinations of the wing stroke profiles in Figure 3B. Y axis varies only lower wing pitch from pre-perturbation (grey) to maximally corrective (yellow). X axis uniformly varies all other wing kinematic profiles from pre-perturbation to maximally corrective. B As in A, with upper deviation profile varying along the y axis and all other kinematic profiles varying along the x axis. C As in A, with lower deviation profile varying along the y axis and all other kinematic profiles varying along the x axis. D-F As in A-C, with wingbeat average z torque plotted.

50 Linearly interpolated wing kinematic profiles for a single wing-beat, ranging from before stimulus (grey) to approximately 30 ms after i2 activation (red) on one wing, while the other wing kinematic profiles are kept static (pre-stimulus kinematics, grey): A “upper” (right) wing stroke angle, B “upper” (right) wing deviation angle, C “upper” (right) wing pitch angle, D “lower” (left) wing stroke angle, E “lower” (left) wing deviation angle, and F “lower” (left) wing pitch angle.

50 Linearly interpolated wing kinematic profiles for a single wingbeat, ranging from before stimulus (grey) to approximately 30 ms after b1 activation (blue) on one wing, while the other wing kinematic profiles are kept static (pre-stimulus kinematics, grey): A “upper” (right) wing stroke angle, B “upper” (right) wing deviation angle, C “upper” (right) wing pitch angle, D “lower” (left) wing stroke angle, E “lower” (left) wing deviation angle, and F “lower” (left) wing pitch angle.

50 Linearly interpolated wing kinematic profiles for a single wing-beat, ranging from before stimulus (grey) to approximately 30 ms after b2 activation (teal) on one wing, while the other wing kinematic profiles are kept static (pre-stimulus kinematics, grey): A “upper” (right) wing stroke angle, B “upper” (right) wing deviation angle, C “upper” (right) wing pitch angle, D “lower” (left) wing stroke angle, E “lower” (left) wing deviation angle, and F “lower” (left) wing pitch angle.

50 Linearly interpolated wing kinematic profiles for a single wing-beat, ranging from before stimulus (grey) to approximately 30 ms after b3 inhibition (purple) on one wing, while the other wing kinematic profiles are kept static (pre-stimulus kinematics, grey): A “upper” (right) wing stroke angle, B “upper” (right) wing deviation angle, C “upper” (right) wing pitch angle, D “lower” (left) wing stroke angle, E “lower” (left) wing deviation angle, and F “lower” (left) wing pitch angle.