In April 12, 1961, The USSR successfully sent man into space, a huge milestone against the US in the space race. Without backing down, John F. Kennedy set an ambitious challenge to be completed in the next decade. To land man onto the moon safely and bring him back to Earth.
The Apollo Program was born from this seemingly impossible challenge representing the people’s determination to achieve it. Eight years later, on July 20, 1969, Apollo 11 fulfilled the vision as Neil Armstrong and Buzz Aldrin became the first men to walk the surface of the moon. While the success was largely attributed to the bravery and ingenuity of the astronauts and the spacecraft, people seemed to forget the less visible and a much more impactful component: The software.
The Heart of Apollo 11
The software itself can be called the heart of Apollo 11, as the software was responsible for a navigation, guidance and fail-safes. There were three main aspects these software’s aimed to assist and solve.
- The launch of the spacecraft.
- The navigation, guidance, and control of the spacecraft.
- The fail-safe in the event of a failure of the spacecraft.
The three computers that took on the role are the: - The Launch Vehicle Digital Computer (LVDC): For the launch of the spacecraft.
- The Apollo Guidance Computer (AGC): For the navigation, guidance and control of the spacecraft.
- The Apollo Abort Guidance System (AGS): As a fail-safe in the event of a failure.
In this essay, I shall look into these three software’s, the role they played, and the trials they overcame to work as they intended to be.
The Launch Vehicle Digital Computer (LVDS)
We are currently at phase-1 of sending the spacecraft to the moon, the launch itself. The computer responsible for the autopilot for the spacecraft (Saturn V) from launch through the Earth’s orbit insertion (Modifying the trajectory to allow entry into the orbit around the Earth), and the trans-lunar injection burn (A propulsive maneuver which is used to send the spacecraft to the moon.) was none other than the Launch Vehicle Digital Computer (LVDS). In layman’s terms it was responsible for the launch of the spacecraft.
Software
The LVDC was coded in assembly language, a low-level programming language closely related to machine code. It was divided into two main programs:
- The Preflight Program: This ran before the rocket launched. It handled things like checks and preparations. It did stuff like running self-tests and starting up the system.
- The Flight Program: Took over during the flight, guiding the rocket. After the preflight program did it’s job, the flight program took over handling stuff like navigation and all the other necessary operations for the flight.
The interesting part of this software was the development itself. The development process was compartmentalized, which meant that each programmer worked on a specific part without seeing the whole picture. This was like building a car where one person works solely on wheels not knowing what the person working on the engines is doing. Because of this, unlike modern software’s the LVDC’s software was in multiple chunks. These chunks had to be put together to get the complete software.
The Apollo Guidance Computer (AGC)
The AGC could be rightly called the core of Apollo 11’s success. Developed at the Massachusetts Institute of Technology (MIT) Instrumentation Laboratory, it combined compact hardware with advanced software to perform real-time computations for navigation and control. Despite its limited memory—36,864 words of read-only memory (core rope memory) and 2,048 words of random-access memory—the AGC was capable of guiding astronauts through every phase of their mission. The interesting part of the AGC is the key part in the evolution of software.
The main problem? At a time where unreliable computers filled entire rooms, The AGC had no room for error and could only fit in one cubic foot of space. Charles Draper divided the team that built the AGC into two parts, one focusing on hardware and the other on software. Margaret Hamilton led the team that built the software for both the command and the lunar modules. That is where she coined the term “software engineering”.
The stakes were extremely high as human lives were on the line, a single error could destroy the spacecraft. So every program had to be perfect and the software needed to quickly detect unexpected errors and recover from them in real time. However, this kind of adaptable program was really difficult to build as early software’s only processed jobs in predetermined order.
“There was no choice but to be pioneers.” – Margaret H. Hamilton
To solve this problem, Margaret designed her program to be asynchronous, basically the software’s more important jobs would interrupt the lesser important ones. Her team assigned every task a unique priority to ensure that each job occurred in the correct order and at the right time regardless of any surprise errors.
Another innovation in the AGC software was the use of Priority Displays, which interrupted astronaut’s regularly scheduled tasks and alerted astronauts to critical issues in real-time. Then the astronauts can communicate with Mission Control and choose the best path forward. These alerts provided astronauts with actionable information, enabling them to make informed decisions under the pressure.
It was these fail-safes designed by Margaret Hamilton that triggered the alarms just before The Lunar Landing. Buzz Aldrin accidentally flipped the rendezvous radar switch. A radar essential for the journey back home but here it was using up important computational resources. Fortunately, the AGC managed this by only allowing the highest priority jobs to be processed. Spectacularly, no bugs were ever found in the in-flight software for any crewed Apollo missions even after Apollo 11.
The Apollo Abort Guidance System
The AGS, developed by TRW, was a backup computer for the Lunar Module. It was designed to take over in case of a failure in the primary AGC, enabling the Lunar Module to return to orbit and rendezvous with the Command Module.
The AGS’s simpler design made it less prone to errors, and its independent gyro system provided stability during emergency maneuvers. Notably, the AGS played a supporting role during Apollo 13, helping stabilize the spacecraft during critical burns.
In fact, The AGS was used in the mission of Apollo 11. It was during the lunar-ascent phase when the LM crew performed a sequence of rendezvous measures that resulted in Gimbal lock (It happens when a rotating system, like in spacecraft or cameras, loses one of its degrees of freedom, making it impossible to control certain directions of movement. This occurs when two of the three rotational axes align, causing the system to “lock” and lose its ability to rotate freely.)
Thankfully, the AGS was used to acquire altitude control.
Through this research we can conclude that the software played really important role in the success of the mission. The story of the development of the software really shows the potential of growth in limited environments. The LVDC, AGC, AGS all were developed with relatively inferior computers compared to today’s computers, yet they achieved a seemingly impossible task of landing man in the moon. The results prove that with the right tools paired with the right human ingenuity could tingle and spark leading to an extraordinary explosion of success.
References:
https://en.wikipedia.org/wiki/Launch_Vehicle_Digital_Computer
https://www.ibiblio.org/apollo/LVDC.html#PTC_ADAPT_Self-Test_Program&gsc.tab=0