NASA’s Apollo moon missions relied on this computer scientist and differential equations

https://www.profitableratecpm.com/f4ffsdxe?key=39b1ebce72f3758345b2155c98e6709c

It is July 20, 1969. Neil Armstrong and Buzz Aldrin are about to land on the Moon. They will be the first humans to set foot on Earth’s only natural satellite. Suddenly, the on-board computer flashes: “Alarm 1202”. Over the next 278 seconds, four more alarms are triggered: “Alarm 1202”, “Alarm 1201”, “Alarm 1202”, “Alarm 1202”.

The system is overloaded. Aldrin and Armstrong are ordered by the NASA ground crew to proceed with the landing. But NASA team members know their colleagues did a good job and programmed a safety net. And thanks to the error messages, they know how to fix the problem.

Computer scientist Margaret Hamilton was one of the people responsible for the features that ultimately made the moon landing possible, despite these error messages. And his then four-year-old daughter may have helped give him pause.


On supporting science journalism

If you enjoy this article, please consider supporting our award-winning journalism by subscription. By purchasing a subscription, you are helping to ensure the future of impactful stories about the discoveries and ideas shaping our world today.


How to describe the world with a computer

The computer on board Apollo 11The lunar module only had about 74 kilobytes of storage in the form of read only memory (ROM). To put that into perspective, today’s smartphones easily have 128GB of ROM storage, about two million times more, all so we can waste time on Instagram and TikTok.

Programming was also completely different in the 1960s. Common programming languages ​​such as Python or Rust, which contain roughly understandable plain text commands for arithmetic operations, did not exist then. Computers of that era were also completely different from the compact devices we use today.

When Hamilton began working with computers, she had to take into account entirely different considerations than today’s programmers: Which register stores which number? How should the contents of registers interact to add and multiply two numbers? How much memory space should I allocate for these registers and which one should I block?

The lunar module’s onboard computer had to determine the module’s speed, altitude, and rotation, all of which are variable quantities. In principle, the on-board computer solves differential equations, which depend not only on variables such as x And Yes but also on their derivatives.

Such equations describe everything that changes. But there is no universally applicable method for solving these differential equations. Many don’t even have an exact solution. We must therefore resort to approximation methods.

To understand how these methods work, consider the following example problem: suppose a spacecraft is moving with constant acceleration, A, and you want to know the distance it travels in a certain time, t. You know both the initial position, x0, and the initial speed of the spacecraft, v0. To solve the problem exactly, you need to solve the following differential equations:

Two equations are presented to solve for A, or constant acceleration. The first equation presents the second derivative of distance with respect to time. Below, another equation presents the derivative of speed with respect to time.

You can find the solution to these problems directly. But if this is not possible, you can find the solution by incrementing the position and speed step by step:

xn + 1 = xn + vnΔt,

vn + 1 = vn + AΔt

To evaluate these equations for a small time step (such as Δt = 1 second), first calculate x1 = x0 + v0 × 1s And v1 = v0 + A × 1s. You can then substitute the respective results of x1 And v1go back to the equations to get x2 And v2 and get the subsequent results in the same way. You can then follow the process like this until you find the distance traveled by the spaceship after a certain time, t.

Such recursive systems of equations are still part of fundamental research today, although in a significantly more complex form. Whether we study cosmology, particle physics, medicine or chemical processes, we are always dealing with variable systems and therefore with differential equations. And to solve them, you typically use a set of recursive equations that a computer can evaluate.

In Hamilton’s time, computing power was very limited. Programmers had to find ways to code the equations as efficiently as possible. And as mentioned, programming languages ​​as we know them today didn’t exist yet. Hamilton and his contemporaries had to design the relevant mathematical equations, then translate them into clear instructions for the computer that would use registers they also had to create, and finally encode these instructions in a sequence of 0s and 1s.

Even after writing the code, the task was not yet complete; At the time, computers did not have input fields to transform text into executable code like those of today. To run a program, the code first had to be written onto a strip of paper; one hole represented a 1 and no holes represented a 0, corresponding to the two units of binary code that most computers work with.

The weather is chaotic

Margaret Hamilton got her start with computers at the Massachusetts Institute of Technology in the research group of Edward Lorenz, a well-known meteorologist. He had derived 12 interrelated equations for various weather conditions such as temperature, atmospheric pressure and humidity. Given the precise initial conditions, these equations were supposed to predict future weather conditions.

Initially, the research group did not have any computers. If its members wanted to create a weather forecast for the next three days, they needed five days to calculate the complex differential equations. It was hardly practical. The team around Lorenz was therefore delighted when he installed the Royal McBee LGP-30 “desktop computer” in his office. It weighed about 360 kilograms, looked a bit like a freezer, and was as loud as a helicopter. Lorenz purchased the LGP-30 in 1959, the same year Hamilton joined his laboratory.

While Lorenz focused on the physical and mathematical aspects of the problem, Hamilton and his colleagues were busy programming the desktop computer. She typed the corresponding codes onto paper tape using some sort of typewriter. Because errors constantly occurred and changes were frequently made to the code, Hamilton sometimes edited the print by hand by sealing excess holes with clear tape or piercing missing ones in the paper tape with a sharp pencil.

With this desktop computer, Lorenz’s group made their biggest discovery: Researchers noticed that weather forecasts changed completely depending on how they rounded the numbers. Even if the input data only differed at the last decimal places, this change could have a huge effect on the result. This is what we call today in mathematics a chaotic system.

When Lorenz, as sole author, published his groundbreaking paper on what would become the foundation of chaos theory, Hamilton was about to work for NASA.

Flight simulator crash

While working for the MIT Instrumentation Laboratory, contracted by NASA to develop software for the Apollo program, Hamilton often took her daughter Lauren to work with her in the evenings and on weekends, sometimes allowing the child to play with the laboratory’s flight simulator. One day, the four-year-old pressed all kinds of buttons on the device, causing the on-board computer to crash: she had tried to run the pre-launch program while the simulation was in flight, which meant that two programs were trying to occupy the same section of the computer’s memory.

This gave Hamilton something to think about: She urgently wanted to create a way to prevent problems like the one Lauren had triggered from happening on a real-life mission. Initially, NASA was not enthusiastic, but the agency eventually agreed. Hamilton created a way to communicate with astronauts in the event of an emergency or programming errors. She and her colleagues also helped develop a sort of safety net designed to deal with such system failures by restarting programs in priority order after a shutdown or crash. So she helped program “contingency solutions,” emergency procedures implemented when an unexpected event occurred during a mission.

This work made it possible to avoid abandoning the first moon landing, even if the on-board computer was overloaded. Buzz Aldrin had flipped a switch in the lunar module that activated the “rendezvous radar”, which was used to ensure that the module could then dock with the command module. However, when Aldrin activated this radar, the lunar module was on its final approach and needed to process a large amount of data. The additional rendezvous signals overwhelmed the system and caused recurring error messages, alerting the astronauts and NASA to the specific problem.

But then Hamilton and his team’s safety net came into play, leading the program to prioritize execution processes that were crucial to a safe landing. Because he knew what the error codes meant from his work with Hamilton, the late NASA engineer Jack Garman had the confidence to give the go-ahead for landing. This is how, in 1969, humanity was able to set foot on another celestial body for the first time.

Hamilton had not received much recognition for her significant contributions until 2016, when U.S. President Barack Obama presented the then 80-year-old with the Presidential Medal of Freedom.

This article was originally published in Spektrum der Wissenschaft and has been reproduced with permission. It was translated from the original German version with the help of artificial intelligence and reviewed by our editors..

Related Articles

Leave a Reply

Your email address will not be published. Required fields are marked *

Back to top button