More capable than your smartphone
July 17, 2019 6:13 AM   Subscribe

Your toaster probably has more processing power, but can it get you to the moon? An appreciation of the Apollo Guidance Computer.

Bonus - Scott Manley explains how the Apollo astronauts interact with the DSKY and how they saved the Apollo 14 mission.
posted by backseatpilot (30 comments total) 27 users marked this as a favorite
This came up in my youtube recommendations yesterday: MIT Science Reporter—"Computer for Apollo" (1965) (30 minutes)
This 1965 MIT Science Reporter television program features the Apollo guidance computer and navigation equipment, which involve less than 60 lbs of microcircuits and memory cores. Scientists and engineers Eldon Hall, Ramon Alonzo and Albert Hopkins (of the MIT Instrumentation Laboratory) and Jack Poundstone (Raytheon Space Division in Waltham MA) explain and demonstrate key features of the instruments, and detail project challenges such as controlling the trajectory of the spacecraft, the operation of the onboard telescope, and the computer construction and its memory. The program was presented by MIT in association with WGBH-TV Boston, and hosted by MIT reporter John Fitch; it was produced for NASA. MIT Museum Collections.
Also, Apollo AGC Part 1: Restoring the computer that put man on the Moon
We embark on the restoration of a very rare and historically significant machine: the Apollo Guidance Computer, or AGC. It was the revolutionary MIT-designed computer aboard Apollo that brought man on the Moon (and back!). Mike Stewart, space engineer extraordinaire and living AGC encyclopedia, spearheads this restoration effort. In this first episode, we setup a makeshift lab in his hotel room, somewhere in Houston. The computer belongs to a delightful private collector, Jimmie Loocke, who has generously allowed us to dive in the guts of his precious machine, with the hope of restoring it to full functionality by July 2019, the anniversary of the Apollo 11 Moon Landing.
posted by smcameron at 6:32 AM on July 17, 2019 [4 favorites]

I have been following those AGC videos from CuriousMarc for months now. I'm glad someone linked them here!
posted by xedrik at 6:44 AM on July 17, 2019 [2 favorites]

I should note that the Instrumentation Lab was spun out of MIT and evolved in to my current employer. We still make guidance systems. I work on programs that descended from Polaris/Apollo; my wife convinced me that qualifies me to call myself a rocket scientist, so that's what I'm going by now.
posted by backseatpilot at 6:53 AM on July 17, 2019 [5 favorites]

I'm going to recycle a comment of mine from almost nine years ago (hence the iPhone 4 reference):
The Apollo Guidance Computer ran at just over 2 MHz and had roughly 4 Kb of RAM, and weighed around 65 pounds. An iPhone 4 has a 1 GHz processor and 512 Mb of RAM, fits in your pocket, and weighs just under 140 grams.

Or to put it another way, what you have in your pocket is 500 times faster, has over 128,000 times as much memory, and is under 1/300th the weight of what got the astronauts to the moon.
I haven't sat down and calculated them, but nine years later, the numbers are even more ridiculous.
posted by Mr. Bad Example at 7:00 AM on July 17, 2019 [5 favorites]

Modern day computers are many things, but efficient is not one of them.
posted by grumpybear69 at 7:37 AM on July 17, 2019 [2 favorites]

I do wish people would stop using toasters as the default unit of computation. They are analogue devices, and their sole 'processor' is almost always a single one-shot timer chip that does no more computation than the cut-off valve in your toilet cistern.

More on toaster tech

The curious thing about space computing is that the AGC is pretty much unique in bringing that number of firsts together. Since then, the tendency has been to use tech that's in many ways some way behind what would normally be thought of as cutting edge. The computational requirements of spaceflight are modest, and it makes a lot of sense to reusetried-and-tested platforms with verified software libraries, plus older, larger-featured rad-hard architectures that have been through the expensive, slow approval process.

This doesn't work quite so well when you want autonomous systems, but even here the degere of autonomy is limited. Despite Musk, the days of Teslas in Space are not yet here.
posted by Devonian at 7:43 AM on July 17, 2019 [1 favorite]

I do wish people would stop using toasters as the default unit of computation.

It's almost as silly as the "X times more powerful than the Hiroshima bomb" metric that is rife in general science television programming.
posted by wolpfack at 7:51 AM on July 17, 2019

This seems like a good place to remind folks of Apollo 11 in Real Time, posted on the blue last month.
posted by HumanComplex at 7:56 AM on July 17, 2019

The original IBM PC from 1981 ran at 1.44 MHz, so the AGC was somewhat ahead it its time that way. I forget if it came with either 64 or 128 kb, though either would have the PC beat the AGC the other way.
posted by Quindar Beep at 7:57 AM on July 17, 2019

(I checked, minimum 16 kb and maximum 256 kb at launch. Metaphorical launch, not literal like the AGC)
posted by Quindar Beep at 7:58 AM on July 17, 2019

Since then, the tendency has been to use tech that's in many ways some way behind what would normally be thought of as cutting edge.

Honestly, I'm still blown away by the tech we use. There's software in there, sure, but our actual sensing hardware is used nowhere else in the world. You can get a reasonable accuracy with the solid state accelerometers + GPS in your phone, but we can do hundreds of times better using spinning wheels, in a denied environment, through power interrupts. Our accelerometers can operate and measure through staging events (up to 200g!) and are sensitive enough that if they're sat on a pier in the lab you can track the orbit of Mars through the gravitational changes. If there's a power fault, the mechanical configuration of the sensor acts as a memory and can help reinitialize the flight computer when it recovers.
posted by backseatpilot at 8:14 AM on July 17, 2019 [2 favorites]

Here is the AGC source code on GitHub.

Omega Tau podcast episodes:

No. 83 — How Apollo Flew to the Moon

No. 167 — The Apollo Guidance Computer

More links in the show notes.
posted by snuffleupagus at 8:52 AM on July 17, 2019 [2 favorites]

The original IBM PC from 1981 ran at 1.44 MHz

It was actually 4.77 MHz, although the clock architectures (and the rest of the design) are sufficiently different that you can't really use it as any sort of metric. You can rather think of the original PC as being some eight cycles of Moore's Law away from the AGC, so it's roughly as ahead of that as a mid-late 1990s PC would be from it. Which would be, what, somewhere around 500 MHz clock speed, 64 meg RAM, 256MB hd?
posted by Devonian at 8:52 AM on July 17, 2019

Have held a compute unit (forget the acronym) in my hand, like a small gray brick. There are greeting cards that have more cpu and memory. Still just amazing, what we could do if we had the same drive, determination... stuff.
posted by sammyo at 8:56 AM on July 17, 2019

Yeah, those AGC restoration videos have been amazing and some of the best of this nerdy side of YouTube.

Some of the things they had to do were just fucking amazing. Like rescuing the original microcode from core memory before they broke anything. Or drilling into epoxy encapsulated memory modules to make repairs and corrections. Or picking all the dust cruft and junk out of many of the connection pins and sockets, which are TINY and very delicate mechanical connections, even for today.

They even had to have new specialty connector pins re-manufactured by (AFAIR) one of the original AGC component manufacturers just so they could plug some of the parts together. (It might have not been one of the original manufacturers, but a specialty firm specializing in this kind of thing, I can't remember.)

They did some straight up computer archeology to make all of that go and it used some pretty impressive hardware hacking and debugging tools and code to make it all happen.

In the last video or one of the later videos one of the restoration and hacking team made a comment like "Well, going back to work at my job is going to be like going on vacation after all of this!"
posted by loquacious at 8:57 AM on July 17, 2019 [1 favorite]

I ran into a really cool article on this topic via MeFi's own nelson: Apollo 11 Had a Hidden Hero: Software, which is free to read in the online Wall Street Journal. "Perhaps the most dramatic moment of Apollo 11’s mission to the moon was when the Eagle began its final descent to the lunar surface and the ship’s computer became overloaded. Few were more nervous than the young computer programmer who had written the code for the landing." Neat interviews with some of the people behind the scenes.

From later in the article "If the computer could plot a course, why not have it steer it, too? Desperate to lose weight, NASA in 1964 decided to eliminate electromechanical flight controls meant to operate the rocket engines and thrusters." cough Airbus cough
posted by exogenous at 9:03 AM on July 17, 2019 [1 favorite]

Margaret Hamilton and the AGC source code:
posted by mikelieman at 9:12 AM on July 17, 2019 [5 favorites]

I wonder how the latency of the AGC functions compares to that of your typical smartphone app.
posted by clawsoon at 9:45 AM on July 17, 2019

Celebrating Apollo's 50th Anniversary: The Oldest Code on GitHub

As clever as the AGC software was, the engineers would have preferred even more compute power. The LM descent phase used quadratic guidance, essentially fitting the thrust to a parabola. This is an easy-to-compute solution, but not a great approximation. IIRC, mission planners were worried about the possibility of the solution becoming unstable and going crazy during flight, which didn't happen.

The Space Shuttle had a beefier computer which used numerical integration, which is a closer fit to reality than a quadratic curve.
posted by RobotVoodooPower at 9:59 AM on July 17, 2019 [2 favorites]

If you're in Boston this weekend, check out the MIT Museum's Lunar Day, which will feature a running AGC.
posted by dmd at 10:20 AM on July 17, 2019 [1 favorite]

I wonder how the latency of the AGC functions compares to that of your typical smartphone app.

It's hard to compare. The AGC used a very intense real time operating system that prioritized tasks specifically to deal with latency issues and to be extremely reliable. The AGC also isn't connected to the cloud and or otherwise connected to what we define today as a "network" based on the OSI model of network layers.

The AGC doesn't really have anything we would really recognize as a network stack. It also likely doesn't have what we would define today as a kernel.

A phone app can be doing any number of background tasks ranging from downloading advertisements to connecting and verifying with a whole spectrum of different servers in the cloud to be able to function, and any latency from those services accumulates or even destructively interfere.

The short answer is the AGC is effectively so low latency considering the low clock and bus speeds that it approaches zero latency. Even when they dealt with the AGC crashing on Apollo 11 it kept functioning as intended.

However, let's look at a different kind of phone app, not one that's 90% advertising software by volume. You can get apps that just view sensor data on your compass and accelerometers and everything else, and it is also extremely low latency thanks to the high clock cycles and bus speeds.

And you can definitely use a phone as a general purpose computer for, say, a robot or a drone. In theory you should be able to use one to land a robot or even a human on the moon. They're pretty reliable and computer science and programming has progressed a long way. Enough that some good, clean and sane code should be up for the task even without a real time operating system like the AGC.

But can I get a show of hands from the class of who is ready to trust their life in space to an iPhone or android phone over a space ready, radiation hardened real time operating system dedicated to the task? Anyone? Bueller? Bueller?

On that note you might have better reliability and latency from a RasperryPi or other embedded microcomputer. Or, hell, an industrial control computer running embedded Windows XP. Some of those boxes are basically crash proof because of the limited, specific use application set and OS config and hardware.
posted by loquacious at 10:22 AM on July 17, 2019 [4 favorites]

I felt for the AGC restorers when they discovered that a third diode had gone bad in the potted module - and that not only had that diode been changed in subsequent revisions of the unit, but the original supplier taken off the approved list. There are something like twenty more of those diodes in that unit...

One of the best documentary series about Apollo is the 2008 Moon Machines. Here's the one about the AGC - plenty of colour and humour alongside the solid tech reportage. All the rest are well worth watching.
posted by Devonian at 10:26 AM on July 17, 2019

I first got interested in the AGC by watching Vintage Space's video on gimbal lock. Ms. Teitel has a ton of awesome videos about the AGC and Apollo guidance in general if you poke around her channel.

I've since downloaded the code and tried to read through it, but it's, well, it's hard going. This book is supposed to be the gold standard, but I haven't read it yet. If I could not work for a while, one of my dream projects is to build a working disky running the code on something small like a Rasberry Pi.
posted by lumpenprole at 1:58 PM on July 17, 2019 [1 favorite]

AGC on Raspberry Pi, you ask?
AGC on Raspberry Pi.

 I do wish people would stop using toasters as the default unit of computation

Yeah, but did the AGC have a Bagel mode? Bet it didn't.
posted by scruss at 3:59 PM on July 17, 2019 [2 favorites]

The CSM did have a barbeque roll mode, though.

The running AGC on show at MIT is the one that was restored in the videos, btw. That's the only running AGC in existence.
posted by Devonian at 4:29 PM on July 17, 2019

Also in the Voyage of the Space Bagel, the CSM had two kinds of salmon, one in salad -

155:43:24 Aldrin: Okay. The more mundane affairs, now that we've left the Moon, [...] we have other foods that are more solid nature. You can probably see this shrimp cocktail meal. [Voice cut out] afternoon while the two of us had salmon salad. [Voice cut out] another early development was the use of bite-size food [voice cut out].

- and tanks full of lox.
posted by Devonian at 5:25 PM on July 17, 2019 [4 favorites]

my wife convinced me that qualifies me to call myself a rocket scientist, so that's what I'm going by now.
posted by backseatpilot

Good work.
posted by ninazer0 at 12:38 AM on July 18, 2019

The Guardian interviews Margaret Hamilton, head of the software team for crewed spacecraft including Apollo 11: "When I took over, one of the bosses at the top said he had no doubt I could do the job but was worried the men working in the group might rebel. Well, they didn’t."
posted by exogenous at 7:31 AM on July 22, 2019

« Older It’s the Twine that Binds   |   Brain hardware support for Bayesian processing... Newer »

This thread has been archived and is closed to new comments