The Coding Error That Cost NASA Millions!


We have to appreciate the sophisticated interface development programs we use today. When we look at the developers/mathematicians that came before us, they didn’t have error detecting IDE’S.

Coding errors are expensive, various institutions are a victim to theses and The National Aeronautics and Space Administration is no acceptation.

Time to go back to 1962 where a simple coding error cost NASA $18.5 million, which amounts to $150 million on present-day estimates.

The Marina 1 was built to conduct the first planetary flyby of Venus, it was launched by an Atlas -Agena rocket from Cape Canaveral. Its mission was to collect data on temperatures and the atmosphere in Venus.

Things didn’t go as planned for NASA and within 4 minutes into its flight the rocket took an unprogrammed turn. This prompted the safety officer to give out self destruct commands of the rocket over the Atlantic ocean.

What Went Wrong?

The Atlas booster rockets use two radar systems to maintain trajectory; a rate system and a track system. The rate system measures the velocity using Doppler shift measurements taken from a ground-based beacon system.

The track system measures the distance and angle relative to the antenna, which is located near the launch site. Shortly into the launch, the rate system failed and now the track system needed to handle the navigation solemnly.

The two systems together formed redundancy in measurement that allowed small margins of error.

The code designed to interpret the distance and angle measurement had a simple error.


Source: Why Rockets Failed

The Notation on the left is the correct notation, but instead, the notation on the right was used.

The notation on the right was missing an overbar which is a representation of average. The overbar tells the machine to take the average of the values, this will result in a smoothed value for the velocity and therefore removing any fluctuations of measurement.

Now the algorithm was missing the overbar (-) the rocket guidance computer was being fed incorrect information about the velocity of the rocket. This caused an array of problems, prompting the safety officer to initiate the self destruct command.

Why Was This Mistake Not Caught?

The code for the guidance computer was mostly written in Formula Translation, also known as Fortran. This outdated programming language was used to translate mathematical equations into code. To further complicate matters it was handwritten or typed on a typewriter.

To translate Fortran to binary thick rectangular pieces of paper known as punch cards were used;


Source: The Craft Of Coding

Each card holds one line of code(up to 80 columns) and each column represents one character of code in the line.

To represent a numerical value, you simply punched out the corresponding number in the sheet and finally to represent letters and symbols you needed to punch out additional holes.

Once the code is converted into punch cards, it is sent through a compiler where it is converted to binary.

As you can imagine using this tedious method of coding, errors can easily be missed. No code reviews, IDE’S, Quality Assurance we have these days.

Additional Reading:

Start blogging about your favorite technologies and get more readers

Join other developers and claim your FAUN account now!


The Maths Geek 🤓

Mathematician | Software Engineer | Amazonian| Open Source | Blogger | Ban Killer Robots



Total Hits