European scientists are preparing to launch a probe that will transform our understanding of our galaxy. The spacecraft, called Gaia, will carry the world's biggest, most accurate camera which it will use to pinpoint more than a billion stars with unprecedented precision and create a 3D map of the Milky Way.

The vast amounts of data generated by the £2bn robot spacecraft – built by the European Space Agency – will reveal how the Milky Way formed and how it will evolve over the next few billion years. In addition, Gaia will locate hundreds of thousands of distant planets in orbit around other stars; survey asteroids that orbit close to our own Sun, giving warnings of any on a collision course with Earth; and provide clues about dark energy, the mysterious force that is thought to permeate space and which is pushing the universe apart.

"We are going to rewrite every star chart and every astronomy book that we have written over the centuries," said Professor Mark McCaughrean, ESA's senior scientific adviser. "Thanks to Gaia, we will find out how the Milky Way was put together. And for good measure it will provide us with an early warning system for asteroids heading towards Earth."

The two-tonne Gaia probe, which has taken more than a decade to build, is set for a 20 December launch on a Russian Soyuz rocket from ESA's spaceport in French Guiana and, once in orbit, will take several months to prepare its delicate instruments for use. The probe will then take five years to complete surveys of the galaxy.

"During its lifetime, Gaia will log the position, the brightness and the temperature of every visible celestial object that falls within its field of view," said Gaia project scientist Jos de Bruijne. "We will do that for about one billion stars in the Milky Way."

The one billion pixel camera on board Gaia contains more than 100 separate electronic detectors and can make measurements of stunning precision. "It can measure star positions with an accuracy of 10 micro-arc seconds," said Professor Gerry Gilmore, a lead scientist for the mission. "That means it can locate stars with an accuracy equivalent to the pinpointing of a shirt button on the Moon. Once Gaia has completed its five-year survey, we will know where everything is inside our galaxy – for the first time – and that will help us answer one critical set of questions: when, how and out of what did the Milky Way form?"

Gaia will orbit round the Sun every year, allowing it to take photographs of stars from slightly different positions in space. In this way it will be able to create a 3D map of the Milky Way. Its instruments will also be able to detect how these stars are moving in space as they revolve round the centre of our galaxy. Once we have plotted how stars are moving around the Milky Way, we will start to understand how our galaxy formed. We believe it did so partly by condensing out of an ancient dust cloud and partly by absorbing other, smaller galaxies in our part of the universe," added McCaughrean. "And the lessons we learn about our own galaxy's birth will be crucial in helping us understand how other galaxies formed. This is one of the big issues that concerns modern astronomy and Gaia is going to help solve it."

The probe's ability to measure distant objects with tremendous precision will also help astronomers in their search for stars with planets around them. These planets make a star wobble in its motion through space and Gaia will be able to pinpoint those far-off solar systems. In addition, the spaceship's precision instruments will allow it to track asteroids near the Sun and spot those object whose orbits reach out as far as Earth, putting them at risk of a collision with our planet.

"Gaia's camera will measure with such precision that it will be able to see how the gravity of objects like the Sun and even Jupiter is warping space-time," added Gilmore. "It will give us the opportunity to give Einstein's theory of general relativity its most rigorous test. We will get a precise idea of how gravity distorts space-time and that in turn will give us an idea of the nature of the force called dark energy which counteracts gravity by pushing things apart. This probe is going to transform our ideas about the cosmos."