Every so often, your smartphone or tablet receives new software to improve its functionality and extend its life. Now, ESA’s Mars Express is getting a fresh install, delivered across over 150 million km of space.
With nearly 15 years in orbit, Mars Express – one of the most successful interplanetary missions ever – is on track to keep gathering critical science data for many more years thanks to a fresh software installation developed by the mission teams at ESA.
The new software is designed to fix a problem that anyone still using a five-year-old laptop knows well: after years of intense usage, some components simply start to wear out.
The spacecraft arrived at Mars in December 2003, on what was planned to be a two-year mission. It has gone on to spend more than 14 years gathering a wealth of data from the Red Planet, taking high-resolution images of much of the surface, detecting minerals on the surface that form only in the presence of water, detecting hints of methane in the atmosphere and conducting close flybys of the enigmatic moon, Phobos.
Today, Mars Express is in good shape, with only some minor degradation in performance, but its gyroscopes are close to failing.
Gyros gone bad
These six gyros measure how much Mars Express rotates about any of its three axes. Together with the spacecraft’s two startrackers, they determine its orientation in space.
This is critical for pointing its large parabolic radio antenna towards Earth and to aim its instruments – like the high-resolution stereo camera – at Mars.
Startrackers are simple, point-and-shoot cameras that capture images of the background star field and, with some clever processing, are used to determine the craft’s orientation in space every few seconds.
The rotation information from the gyros fills in the information between these snapshots and also when the trackers lose track of the stars – which can last for minutes or even hours.
“After looking at variations in the intensity of the gyros’ internal lasers, we realised last year that, with our current usage, four of the six gyros were trending towards failure,” says spacecraft operations manager James Godfrey.
“Mars Express was never designed to fly without its gyros continuously available, so we could foresee a certain end to the mission sometime between January and June 2019.”
Engineers knew, however, from long experience with similar gyros on previous missions, including Rosetta and ERS-2, that it might be possible to fly the mission primarily using its startrackers, with the gyros only being switched on occasionally, to extend their lives.
Hacking 15 year-old code
“Flying on startrackers with the gyros mostly switched off meant that a significant portion of the 15 year-old software on Mars Express would have to be rewritten, and this would be a major challenge,” says operations engineer Simon Wood.
While the spacecraft’s builder provided great assistance, it was mostly up to the teams at ESA to open the code, rewrite the software, test it and prepare it for upload as soon as possible.
“We were also helped by being able to take code flown on Rosetta and transplant it into the Mars Express guidance software,” adds Simon.
A massive, multi-month effort followed, involving teams from across the Agency working to develop the new software that would enable Mars Express to keep flying. This also meant significant changes in instrument science planning.
“We didn’t know if such a massive revision was possible – it hadn’t been done before, especially as we would be in a race against time to complete it. But faced with the almost-certain end of mission, what began as wild speculation during a tea break one afternoon last summer has led to the full rewrite now being ready to send up.”
The new software was finalised earlier this year, and has undergone meticulous testing to ensure it will work as intended.
The effort came to fruition yesterday, when the mission team met for a critical go/no-go meeting with the ESA managers to get final approval to activate the new software.
The new code was actually uploaded to an area of spare memory on Sunday, but just like when your phone or tablet gets a software upgrade, mission controllers will have to shut Mars Express down and trigger a reboot to start running the new code, a critical step set for 16 April.
If all goes as expected, the mission teams will then spend about two weeks testing and reconfiguring the spacecraft to ensure everything is working as it should before resuming normal science operations.
“Similar, but much smaller fixes, have been developed in the past for other missions with old gyros, such as Rosetta, but this is certainly the most complex and extensive software rewrite we’ve done in recent memory,” says mission manager Patrick Martin.
“Thanks to the skill of ESA’s teams, Mars Express will fly well into the 2020s, depending on fuel supply, and continue delivering excellent science for many years yet.
“I look forward to seeing continued joint science campaigns between Mars Express and other Mars missions like ESA’s Trace Gas Orbiter and incoming rover missions.”