Researchers at Cornell have been investigating how fruit flies recover when their flight is disturbed. Their conclusion is that despite the insects' minimal nervous system, a group of fly neurons solve calculus problems.
To perform their investigations, the researchers glue metal filings to the flies' backs, allowing the scientists to use an electromagnetic pulse to disturb the roll, pitch, and yaw of an insect-in-flight, according to a report in the New York Times. Three cameras operating at 8,000 fps monitor the flies' response to the disturbances, and computers analyze the movement.
In response to disturbances, the flies rely on biological gyroscopes called halters to perform computations and send signals to the wings—which beat at 250 times per second—to take corrective action.
The research team includes Itai Cohen and colleagues Z. Jane Wang, John Guckenheimer, and Leif Ristroph, who is now at New York University. The Times quotes Cohen as saying, if you disturb a fly's flight in an extreme way, “within three wing beats that sucker has recovered completely.”
Update: the Times now has a video here.