In the dusty desert town of Woomera, in the South Australian desert, scientists are getting ready. On 6 December 2020, after six years in space, the Japan Aerospace Exploration Agency's Hayabusa2 spacecraft will finally return to Earth.

It carries with it a cargo unbelievably rare, precious, and hard-won - at least 100 milligrams of material collected from the surface of asteroid Ryugu. It will drop the capsule containing the sample to Earth, the spacecraft itself continuing on to visit more asteroid targets.

Hayabusa2's return will mark a milestone in a remarkable feat of space science, a total journey of around 5.24 billion kilometres (almost 3.3 billion miles). Asteroid Ryugu - formerly known as 1999 JU3 - is on an elliptical orbit that carries it just inside Earth's orbital path around the Sun, and out almost as far as Mars' orbit.

Planning Hayabusa2's trip involved calculating where the asteroid would be in the future, and plotting a path that would get the spacecraft where it needed to go, using Earth's gravity for bursts of acceleration.

Then, the spacecraft had to be able to touch down on the asteroid, twice, collect material both times, and bounce back off the asteroid again, before making its way back to where Earth would be by the time its journey back was over.

The spacecraft is on that home stretch now, and the capsule collection team have all arrived in Australia. Capsule retrieval rehearsals and tests of the technology that will be used to track the incoming capsule are being conducted.

Preliminary team members who have already cleared their two-week COVID-19 quarantine arrived at the Woomera Royal Australian Air Force base last week, and started preparations for the landing and retrieval.

That tiny cargo is a big deal. Only one other mission has successfully returned an asteroid sample. JAXA's original Hayabusa mission to asteroid Itokawa returned a sample to Earth in 2010 - but the sampling device had failed, and only a few micrograms of material were ferried home.

One hundred milligrams is an absolute wealth of material in comparison, and scientists hope to be able to conduct detailed tests. Because Ryugu is a primitive carbonaceous asteroid, it's thought that it has preserved some of the most pristine material in the Solar System, relatively unchanged (except for some irradiation) since it formed around 4.5 billion years ago.

That small sample, scientists hope, will be able to provide some insight into the early days of the Solar System, and the formation and evolution of the inner rocky planets.

The capsule is expected to descend between 3.30 AM and 4.30 AM ACDT (Australian Central Daylight Time) on 6 December 2020, creating a brilliant fireball produced by the heat of atmospheric entry. A special heat shield will protect the capsule from temperatures around 3,000 degrees Celsius (5,400 degrees Fahrenheit).

After deploying its parachute, it is expected to land within a 100 square kilometre- (40 square mile-) region within the Woomera Protected Area, sending out a radio signal to the retrieval team. Once the beacon lands, this signal won't be detectable from ground stations, so a helicopter will be flown overhead to track the capsule down.

Once it's located, the capsule will be taken by helicopter to a Quick Look Facility. There, any gases inside the container will be sampled, before the container is placed in a sealed transport box and airlifted back to Japan. That's when the next stage of the research process will truly begin, as scientists start the painstaking work of studying and analysing the rock.

Although most of the world won't be able to watch the reentry live, JAXA has issued observing and photography tips for those who can, and, for everyone, an AR app for iOS to track the capsule's trajectory. JAXA is also considering a livestream of the capsule release and atmospheric entry.

Meanwhile, Hayabusa2's flight will continue. Its next stop will be asteroid (98943) 2001 CC21 in July 2026, after which it will continue on to asteroid 1998 KY26 for a July 2031 rendezvous.