Computer coding errors apparently caused the loss of the Mars Global Surveyor spacecraft last year, the NASA space agency has revealed.
The spacecraft, launched in November 1996, began its orbit of Mars the following September as part of a nearly 10-year scientific survey. It mapped the surface and atmosphere of Mars, provided extensive images of the planet and even assisted in locating a landing spot for other spacecraft.
Its last communication with Earth was on 2 November after the orbiter was ordered to perform a routine adjustment of its solar panels. It responded by reporting a series of alarms, then indicated it had stabilised itself. That was its final message to Earth.
NASA assumed that within 11 hours of that transmission, depleted batteries had left the craft unable to control its orientation in the Mars orbit. On 28 January, the spacecraft was declared lost and efforts to recover it ended.
But a preliminary report from an internal review board says the most likely cause of the failure was coding-related.
"The loss of the spacecraft was the result of a series of events linked to a computer error made five months before the likely battery failure," said Dolly Perkins, deputy director-technical of the NASA’s Goddard Space Flight Centre, who chaired the review board.
The committee found that the problem arose from faulty code uploaded to the spacecraft in June 2006. During a software upgrade to the command system, performance settings were sent to the wrong computer memory addresses on the spacecraft.
This caused the 2 November malfunction when, after being unable to properly control the adjustment of its solar panels, the spacecraft went into contingency mode. Erroneous data led it to orient itself so that one of its two batteries was exposed to direct sunlight.
The spacecraft's power management program interpreted the overheating of the battery as an overcharge and prevented it from recharging. The other battery was unable to recharge adequately and they were both eventually drained of power.
Another software error repositioned an antenna, cutting off contact with Earth and leaving ground control personnel in the dark about the spacecraft's thermal and power problems.
The report noted that this was caused in part by a design error. "The onboard fault protection was insufficient to handle the faults that were most likely encountered. The spacecraft mistakenly determined that a solar array was stuck and, based on this information, went to an altitude that was thermally unsafe for one of its batteries."
NASA later boasted that the mission lasted four times longer than expected, with the orbiter proving to be the most valuable of all spacecraft sent to the red planet.
"Mars Global Surveyor has surpassed all expectations," Michael Meyer, NASA's lead scientist for Mars exploration, said in November, after contact with the craft was lost.
"It has already been the most productive science mission to Mars, and it will yield more discoveries as the treasury of observations it has made continues to be analysed for years to come."
Find your next job with computerworld UK jobs