Access code to the stars: how programs helped us conquer space

Space missions would be impossible without computer technology. Starting with the onboard guidance computer, which first reached orbit in 1965 as part of the American Gemini space program (the precursor to Apollo), digital technology has become an integral part of the process of conquering space. In manned flights, they are responsible for controlling the crew’s life support systems, navigation, docking, takeoff, and landing. Robotic Mars rovers and space probes that have already left our solar system – none of this would have been possible without the participation of zeros and ones.

Source: IBM

In this article, we will explain how digital computers have made real what people could not even dream of when they sent their first analog radio transmitters into space in the late 1950s.

The first computer to reach orbit: the story of the Gemini Guidance Computer

When, on May 5, 1961, the Mercury Freedom 7 spacecraft carried an American astronaut beyond the atmosphere for the first time, NASA became seriously concerned with the need to create an onboard computer for automated control and management of future flights. The Mercury mission was controlled using ground-based computers installed at NASA’s flight control center. The second American project to launch a man into space, called Gemini, was in dire need of a fundamentally new level of automation.

Source: IBM

An onboard computer would save astronauts time by taking over most of the navigation, course correction, piloting, and emergency system control functions. But since computers in the early 1960s took up as much space as a gym – hello, UNIVAC! – the engineering challenge immediately became a difficult one. It was necessary to somehow reduce the size of the computer without losing its performance.

There were several solutions. The first involved distributing computing power between two computers – one on board and one on the ground. The latter, based on the IBM 7090s (and later the IBM 7094s), was to be located at NASA’s Flight Control Center and send data on the spacecraft’s movement, obtained from ground-based radar observation stations, to the lightweight onboard computer and assist astronauts in performing orbital maneuvers.

NASA understood that to make a computer compact enough for space travel, it would be necessary to abandon analog computing technologies completely in favor of digitalization. The result was the first digital serial computer – the Gemini Guidance Computer (GGC).

It looks much worse than your old desktop computer. However, GGC’s unique engineering solution allowed for significant space savings on board the spacecraft – the device weighed only 26.75 kg.
Source: ids.si.edu

The onboard digital computer was designed with bit-serial architecture in mind. Gemini was equipped with a type of memory with a ferrite core that was unique for its time. This technology allowed it to store small amounts of data, which were later used for calculations. The computer also had feedback to the operator: astronauts could intervene in the GGC’s operation by switching command modes using a joystick manipulator.

The Gemini onboard computer was responsible for executing one of four basic operating modes:

  • Ascent is a backup guidance system mode for a spacecraft, activated by crew members.
  • Orbital flight is a mode that allows the emergency landing site of the capsule to be calculated in the shortest possible time and the engines to be reignited to perform an orbital maneuver.
  • Rendezvous is the primary orientation mode of a spacecraft, providing astronauts with data on its orbital coordinates, guided by information received from ground tracking stations and its own navigation sensors.
  • Reentry mode helped the spacecraft enter Earth’s atmosphere on autopilot and provided astronauts with up-to-date information for a manned landing.

One of the significant drawbacks of the first Gemini computer was the lack of reliability and redundancy systems, which would appear in subsequent generations of onboard computers. Data backup systems were necessary in case of failure of the main system, which could malfunction due to extreme overload during rocket launch or prolonged exposure to cosmic radiation. In the space missions of the two Voyager probes launched in the 1970s, NASA engineers ensured that all computer systems on each probe had dual redundancy and contained a complete hardware and software backup.

The Actor-Judge computer system installed on SpaceX’s Falcon 9 rocket and Dragon spacecraft has triple redundancy. Sometimes, NASA even uses four backup systems.
In the photo: Astronauts Douglas Hurley and Robert Behnken familiarize themselves with the touchscreen interface of the Crew Dragon spacecraft’s computers. Source: SpaceX/NASA

The Gemini onboard computer was not perfect, but it was the first digital computer of its kind to reach orbit. In subsequent NASA Apollo missions, its experience was used to create more powerful and sophisticated computer systems for navigation and orientation in space.

How do you get people to the Moon if you are a calculator?

The Gemini Guidance Computer was succeeded by the Apollo Guidance Computer (AGC), the first digital computer built entirely on integrated silicon circuits. Lightweight transistors soldered to a silicon board helped to significantly reduce the weight of the computer and paved the way for a full transition from analog to digital computers.

The feedback system with the operator was named DSKY, and its physical module resembled a calculator more than a computer capable of transporting people nearly 400,000 km away from Earth.
Source: NASA/Dennis Taylor

AGC was a pioneer in many approaches. It had the world’s first graphical user interface (GUI) and was equipped with a display and keyboard that allowed the astronaut operator to interact with the computer. This later formed the basis for the entire Human-in-the-Loop (HITL) software methodology, which allowed a human operator to directly intervene in the computer’s software cycles.

Communication between astronauts and the computer was organized according to the principle of entering two-digit numerical commands, where the first digit was called a “verb” and indicated the command-action to be performed by the electronic computer, and the second was called a “noun,” which told it which data array the action should be applied to. Each command that the AGC could execute was marked with an accompanying numerical code.

A set of commands that AGC could execute (verbs at the top, nouns at the bottom). Source: Wikipedia

In addition to successfully implementing the world’s first graphical user interface, AGC was a true marvel of automated navigation – remember, it was designed to deliver people to the Moon and return them safely to Earth.

To accomplish this task, AGC creator Charles Stark Draper drew on his previous experience developing early anti-aircraft missile systems that worked in conjunction with ground-based target detection radars. These technologies, developed back in the 1950s, confidently performed two tasks: detecting enemy aircraft and guiding anti-aircraft missiles at them. Draper proposed using these approaches to organize the first manned flight to the Moon, after which work began at the Massachusetts Institute of Technology (MIT) Instrumentation Laboratory to create the first working prototype, which was completed by 1966.

AGC avionics were capable of calculating the spacecraft’s course by constantly receiving updated data on its inertial velocity, position in space, course trajectory, and the speed of the Moon and other objects that served as landmarks. It is important to understand that these objects were in constant motion relative to Apollo. There were so many variables that the astronaut simply could not pilot the ship based solely on visual observations. Any mistake could lead to a deviation from the course and cost the lives of all crew members.

Perhaps the only thing AGC could not do was land the lunar module (LM) on the surface of our natural satellite – this task was performed manually by the Apollo astronauts.

The AGC computer was not the only digital device involved in the Apollo missions. It was supplemented by two backup computers:

  • LVDC (Launch Vehicle Digital Computer) is a navigation computer installed on Saturn V, the launch vehicle for the Apollo spacecraft. It was responsible for stabilizing the rocket during launch and controlling its course until it reached the designated orbit.
  • AGS (Abort Guidance System) is a backup computer that was supposed to be used in case of failure of the main guidance, navigation, and control system. This system could even perform an automated launch of the lunar landing module (LM) and dock it with the command module (CM) of the spacecraft, which was in lunar orbit.

The Apollo guidance and navigation computer system could perform several output processes in parallel. With a memory word length of only 16 bits (15 bits of data and 1 parity bit protecting each memory word), today’s AGC would hardly be able to even type a post on your Twitter account. However, the competent allocation of digital machine resources and unique software logic (which will be discussed below) made it an integral part of most Apollo missions, the absolute triumph of which was the delivery of humans to the Moon as part of the Apollo 11 mission. Its success forever destroyed all the pessimistic reservations of digital skeptics, among whom were many NASA astronauts – they were simply afraid to trust their lives to a silicon chip with transistors that only understood binary code.

There were also two identical copies of the Apollo guidance computer: one was installed in the LM, and the other in the CM. Source: NASA

From that moment on, it was impossible to imagine the future of space exploration without the introduction of digital computing technologies into the process. Forty-two AGCs were manufactured, each costing $200,000.

AGC program code: understand and forgive

Another unique feature characteristic of the onboard computers used in the Gemini and Apollo missions should be mentioned – the programming language and operating system (OS). The list of specialized tasks that the AGC had to perform prompted NASA engineers to come up with the idea of creating an original OS written from scratch. The choice was small – to choose the programming language in which it would be written.

In the early 1960s, IBM computers, including those located at NASA’s Mission Control Center, were programmed in FORTRAN. Source: NASA

The FORTRAN language (the first programs written in it were still on punch cards in the 1950s) seemed to be the ideal candidate for use in space missions. However, it was considered too new and therefore unreliable for the lunar mission. It’s hard to believe now, but in the early 1960s, many knowledgeable programmers at NASA did not see (or did not want to see) that FORTRAN and its derivatives (BASIC, ALGOL) would dominate programming for decades to come. However, when this did happen, NASA willingly used it in its future missions. Many scripts for Voyager 1 and Voyager 2 were written in FORTRAN 5.

A team of software engineers led by Albert Hopkins and Hel Lenninh took on the task of creating an OS for AGC. The latter used a low-level assembly language to write programs for this operating system. The decision to abandon high-level programming languages was deliberate – programmers were afraid of overloading the machines with overly heavy code.

Source: IBM

The AGC real-time operating system (RTOS) used priority scheduling and cooperative multitasking principles that were unique for its time. Each set of short commands could be interrupted and sent to a “waiting list,” where they could be scheduled for execution in a new command cycle or to create a whole chain of software actions specified by the operator.

Lennih and his team essentially invented most of the approaches used in programming today from scratch. The methods first used in RTOS AGC would later lead to the creation of more stable multitasking operating systems with priority scheduling and asynchronous programming methods.

In 1965, a young but very talented programmer, Margaret Hamilton, joined the Apollo program. Under her leadership, the COLOSSUS software package for the Apollo spacecraft command module (created by Frederick Martin) and LUMINARY for the lunar landing module (created by George Cherry) were written.

Margaret Hamilton and a dozen volumes of program code that her team wrote for the Apollo missions.
Source: Wikipedia

The AGC operating system was first tested in 1966, and two years later, during the Apollo 8 mission in December, NASA completely transferred control of space flight management to a digital computer based on RTOS.

In its future space exploration, NASA will continue to focus on implementing operating systems with an increasing emphasis on multitasking. This approach will be used, in particular, in Mars rover missions.

Author: Oleksii Zhyrov, journalist

This article was published in issue No. 1 (189) of Universe Space Tech magazine in 2023. You can purchase this issue in electronic format from our store.

Advertising