A wild ride mid-flight on a Qantas Airbus that left a third of passengers on board injured as they were tossed out of their seats has been traced to a computer programming glitch, air investigators have found.



In the culmination of a three-year probe into the incident, which occurred at 37,000 feet in the dead of night over the Indian Ocean off the coast of Western Australia on October 7, 2008, Australian Transport Safety Bureau investigators found the plane twice dived unexpectedly after one of three airspeed sensors malfunctioned.



The plane, an Airbus A330, carrying 303 passengers and 12 crew twice nosedived after flight computers went haywire, leaving 110 passengers and nine crew members injured as they were flung about the cabin, hitting overhead lockers and fittings.



As an indication of the violence of the plunges, 12 people were seriously injured, investigators said, while 39 were taken to hospital.



At least 60 passengers were were seated without their seatbelts fastened at the time of the first plunge.



Incorrect data from a sensor measuring airspeed, altitude, air pressure, temperature and the flying angle was fed to the computers controlling the flight, investigators found.



Within two minutes, the autopilot disconnected, and five seconds later, pilots started receiving spurious cockpit alarms and alerts about stalling and overspeed warnings, along with fluctuating airspeed and altitude readings. Suddenly, the plane nosedived.



Passengers not wearing seatbelts, and standing crew hit the ceiling when the plane plunged 150 feet in two seconds, as part of a 690-feet, 23-second dive.



Two minutes later, it plunged a second time, when the flight computer instructed the plane to pitch downwards again, plunging 400 feet in 15 seconds.



Pilots broadcast a "mayday" and sought an immediate emergency landing at the nearest runway, which was at Learmonth on the mid-north west coast of Western Australia.



Adding to the injuries and flight computer dramas, the automatic cabin pressurisation system malfunctioned during descent, as did the aircraft's auto-braking system.



In the safety bureau's 313-page report, investigators focused on two key elements of the malfunctions: how and why the airspeed sensors started supplying erroneous data in the first place; and how and why the flight system computers acted on the incorrect readings.



With the airspeed sensors, it found one of the three units started feeding intermittent and incorrect data on all flight parameters to flight computers.



"The failure mode was probably initiated by a single, rare type of trigger event combined with marginal susceptibility to that type of event within the CPU (central processor unit) module's hardware," investigators said.



The air-speed sensor malfunction was one of only three such malfunctions known worldwide in 128 million operating hours, investigators believe, though one of those incidents involved the same sensor unit on the same aircraft, on September 12, 2006. The other known incident occurred on another Qantas Airbus with another of the same type of airspeed sensor, on December 27, 2008.



In a strange coincidence, all three sensor malfunction events occurred on Qantas flights off the coast of Western Australia.



Investigators say there was no correlation to the way the Qantas planes were set up, maintained or operated.



Secondly, investigators found fault with the piece of computer code that interpreted data from the air speed sensors for the main flight computers.



The computer code, called an algorithm, could not cope with the erroneous data coming from one of the three air sensors that malfunctioned.



Investigators found fault with the way the algorithm had been written in the early 1990s that translated the sensors' data into actions, where the flight control computer could put the plane into a nosedive using bad data from just one sensor.



It was the only case of the flight computer going haywire in 28 million flight hours of the Airbus A330 or A340, investigators believe.



"The aircraft manufacturer [Airbus] subsequently reviewed and improved its [flight computer] algorithms," investigators said, and the revised software was installed in November 2009.



"As a result of this redesign, passengers, crew and operators can be confident that the same type of accident will not reoccur," investigators have concluded.



But the safety investigators also warns passengers to keep their seatbelts buckled during flights to minimise the risk of injury should an inflight upset occur.