Brain scans have revealed the workings of the brain's GPS that underpin our decisions as we navigate towards a destination.

Two areas of the brain appear to take turns as our internal global positioning system and work together to steer us through the environment. The brain regions take on different roles to meet our needs, with one keeping track of the distance to our destination as the crow flies, and the other chipping in to calculate the actual distance of the route ahead when we reach a junction.

Researchers pinpointed the neural systems by scanning volunteers' brains as they watched movies shot on the streets of Soho in central London.

"We have never known anything about how the brain represents information about future places we want to be," said Hugo Spiers, a neuroscientist at the Institute of Behavioural Neuroscience at University College London. They presented their findings at the annual meeting of the Society for Neuroscience in Washington.

"We didn't know if the brain tried to keep track of the straight line distance to the goal and we got there by minimising that distance, or whether the brain used the actual path we planned to take."

To unravel how we navigate, Spiers and his colleague Lorelei Howard first gave volunteers maps of Soho to study and took them on an intensive two-hour tour of the area, during which they were asked to learn the streets and locations of 23 bars, shops and cafes. After the training session, they sat an exam to ensure they had learned the area well.

For the next stage of the experiment, the scientists had a film crew walk around Soho in the early hours of a summer morning to capture first-person footage of the routes between various streets and establishments.

The volunteers then laid in a functional magnetic resonance imaging (fMRI) scanner while they watched the movies on a screen in front of them. When the movie began, the name of the street they were on appeared alongside a picture of the bar or shop they had to get to.

During the experiment, the scientists paused the movie whenever a junction appeared and asked the volunteers which way to turn. What they did not know was that the movies were preset to follow the quickest route most of the time, and take them on detours at others.

"Once people made a decision on which way to turn, the movie carried on. But if they pressed left, the movie didn't always go left," Spiers said.

In some of the movies, the volunteers would find themselves geographically very close to their destination, but the road layout meant they still faced a long walk to get to their goal. In others, instead of taking the most direct route, the film would head off in another direction, taking them further away from the place they wanted to go.

The scans showed that the front part of a brain structure called the hippocampus kept tabs on the straight line distance to a person's destination and became more active the further away they were.

"If a bar is right nearby and you are getting further away, the activity in the front end of the hippocampus ramps up and up, and then goes back down as you get closer," Spiers said.

But this tracking of the straight line distance from one place to another was only half the picture. When people made decisions about which way to turn, the back part of the hippocampus got involved, apparently calculating the new route and its length.

"The posterior hippocampus cares about how long a route is going to be. It's like GPS. It knows how far you've got to go in the real world and it gets more excited the closer you are to your goal," Spiers said. Once a decision to turn was made, the brain switched back to using the front of the hippocampus.

The role of the rear hippocampus was particularly clear when volunteers were taken on an unexpected detour away from their goal. As the camera panned around to make the wrong turn, that part of the brain immediately reacted by calculating the new, longer route ahead.

"It seems like a seamless experience, but the idea that the brain is calculating different useful bits of information as you need them on the fly makes a lot of sense," Spiers said. "There's a cost associated with determining your exact path all the time. Your brain is generally keeping track of how far you are from your goal, but it's not constantly checking all possible paths ahead."

The importance of the back part of the hippocampus in route information was demonstrated by Eleanor Maguire, also at University College London, in 2000. She scanned the brains of taxi drivers who had memorised the streets of London and found the backs of their hippocampuses were larger than average.

In a further round of experiments, Spiers and Howard scanned the brains of people as they watched the movies without being asked to navigate. The situation mirrored that of a passenger in a car who is not giving any directions to the driver. The scans showed that in passive viewers, the GPS system stayed silent, suggesting that it is not an automatic process, but acts only when a person is actively trying to navigate.

In the next stage of the research, the scientists hope to identify how the brain knows which direction to move in.