According to a new study, the humble, and arguably disgusting fruit fly shares a surprising characteristic with early human explorers – the ability to navigate vast swathes of land using the Sun as a landmark. The researchers made the discovery by strapping fruit flies into a virtual reality "flight simulator," and switching on a simulated star.

Fruit flies are difficult to love. They harbor a dogged determination to unhygienically touch everything you hold dear, and lay eggs on our precious fruit. However, if you can get past all of the personal space violations, there are a few impressive aspects to these winged bacteria hotels.

For example, the common fruit fly has been discovered living in the desert – an environment in which resources such as food and water are relatively scarce. In order to survive in such an environment, the flies must be fairly hardy, and have the capability to navigate in a landscape where there are few if any permanent landmarks.

In such a setting it would be easy to get turned around and end up walking, or flying, in circles. This is especially the case over long distances, and fruit flies have been recorded to fly as far as 9 miles (14.5 km) in a single night.

If a fly were to have much hope of surviving in this hostile environment, there must be some mechanism at work allowing it to fly in a straight line. After all, this would be the most efficient way of discovering something useful to land on (and desecrate).

A team of researchers from the California Institute of Technology set out to discover whether the insects were using celestial landmarks such as our Sun to navigate during long-haul flights. To accomplish their goal, fruit flies were tethered into a virtual reality flight simulator, which fixed the subjects in place but allowed their wings freedom of movement.

With each test, the researchers switched on an artificial "star" in the form of an LED, and tracked the fruit flies' behavior. They discovered that the flies set off keeping the light fixed at a static point in their field of vision, using it as a guide to fly straight and true.

When the faux Sun was switched off, the flies seemed to lose their ability to fix their orientation. Later, when the light was switched back on, the flies generally stayed true to their previous course, with many able to remember their previous orientation even with an interval of over two hours between flights.

The study also identified a series of cells in the central complex of the flies' brains that appeared to be associated with the light-based navigation. The flies were genetically altered to make the cells light up when active, with the brightness intensifying in line with an increase in local brain activity.

Using a powerful microscope, the team was able to make real-time observations of the compass neurons' activity levels through tiny holes cut into the insects' heads.

When the team silenced the neurons, the fruit flies appeared to lose their ability to plot a course by the fake star. instead, the insects exhibited the more simplistic behavioral pattern of trying to fly directly toward the light.

"Insects have been navigating for many millions of years, so we think of this as a very ancient toolkit," says postdoctoral scholar Ysabel Giraldo, first author of the new study. "We know a fair bit about navigation in other insects like Monarch butterflies and locusts—seasonally migrating insects whose behaviors are noticeable or affect us directly."

The team has a number of directions in which to take its research. The scientists hope to gain a greater understanding of how the compass neurons observed in the study work as part of a larger navigational circuit in a fruit fly's brain. They also want to discover how the flies remember their orientation from one flight to the next, and whether seasonal differences have an impact on the insects' flight patterns.

A paper detailing the research has been published in the journal Current Biology.