Slashdot Mirror


How They Built the Software of Apollo 11

LinuxScribe tips a piece up at Linux.com with inside details on the design and construction of the Apollo 11 code. There are some analogies to open source development but they are slim. MIT drafted the code — to run on the Apollo Guidance Computer, a device with less grunt than an IBM XT — it had 2K of memory and a 1-MHz clock speed. It was an amazing machine for its time. NASA engineers tested, polished, simulated, and refined the code. "The software was programmed on IBM punch cards. They had 80-columns and were 'assembled' to instruction binary on mainframes... and it took hours. ... During the mission, most of the software code couldn't be changed because it was hard-coded into the hardware, like ROM today... But during pre-launch design simulations, problems that came up in the code could sometimes be finessed by... computer engineers using a small amount of erasable memory that was available for the programs. The software used a low-level assembly language and was controlled using pairs or segments of numbers entered into a square-shaped, numeric-only keyboard called a Display and Keyboard Unit... The two-digit codes stood for 'nouns' or 'verbs,' and were used to enter commands or data, such as spacecraft docking angles or time spans for operations." Reader Smark adds, "The Google Code Blog announced today that the Virtual AGC and AGS project has transcribed the Command Module and Lunar Excursion Module code used during the Apollo 11 moon landing. The code is viewable at the VirtualAGC Google Code Page."

17 of 220 comments (clear)

  1. Fake by Yuioup · · Score: 4, Funny

    Wow. They sure went out of their way to fake the moon landing. I bet the source-code is fake too :-P

    Y

    1. Re:Fake by MichaelSmith · · Score: 5, Informative

      This is an Apollo DSKY BTW. A Classic command would have been

      [VERB]66[PRO]

      Which loosely translated means give me manual control, I need to land this sucker. If you watch the descent movies you will hear "P66" being called out by the LMP a few minutes before landing. Interesting to note that the 6 is right beside PRO. I wonder if there is a bit of clever UI design in that.

    2. Re:Fake by commodore64_love · · Score: 5, Informative

      This Apollo computer has specs almost identical to ancient 1970s home technologies like the Atari VCS/2600 game console (1 megahertz, 2K ROM). Or an Atari 400/Commodore VIC-20 computers (1 megahertz, ~8K RAM). That gives you a rough idea of how "weak" the computer inside Apollo truly was.

      --
      "I disapprove of what you say, but I will defend to the death your right to say it." - historian Evelyn Beatrice Hall
    3. Re:Fake by CWRUisTakingMyMoney · · Score: 4, Informative

      Just to be pedantic, it was actually the Commander (Armstrong) who actually flew the LM to the surface, not the misnomered LMP, who mainly monitored things and called out warnings and readings. So if anyone said P66 (which the transcript doesn't indicate literally happened), it was more likely the Commander, who would've entered the program. The transcript has Armstrong saying "I'm going to..." when he goes into P66.

      --
      Those who anthropomorphize science and/or nature already believe in an intelligent designer.
    4. Re:Fake by iocat · · Score: 5, Insightful

      I think you've got the analogy backwards. It actually shows how powerful and capable those early micros were. Kind of embarassing when your multi-gigahertz PC can barely run a word processor, or stalls when trying to display a photo, huh?

      --

      Dude, I think I can see my house from here.

  2. Space, Spacecraft *and* Code by MrKaos · · Score: 5, Funny

    I think I just had a geekgasm.

    --
    My ism, it's full of beliefs.
  3. README.txt by Norsefire · · Score: 4, Funny

    For Vista, the following steps may need to be performed manually after installation:

    1.
    2.

    -- README.txt

    Wow, even rocket scientists don't know how to make code work on Vista.

  4. Re:Proper Old Skool by Norsefire · · Score: 4, Insightful

    Except if you screwed up you didn't cause several people to explode.

  5. Calculating trajectories for Apollo program by bAdministrator · · Score: 5, Interesting

    http://embedded.com/columns/technicalinsights/218401508?pgno=1

    "Calculating trajectories for Apollo program"
    "Jack Crenshaw describes what he and team members did to research trajectories for the Apollo missions."

  6. Re:Proper Old Skool by MichaelSmith · · Score: 4, Interesting

    It was amazing they did so well on Apollo. The only real guidance screw up was on Apollo 11. Every other landing was spot on. Apollo 12 had been targeted for the middle of surveyor crater and was dead on when Pete Conrad got his first look at the landing sight. He had to fly manually to avoid the target.

  7. Re:Proper Old Skool by morgan_greywolf · · Score: 5, Funny

    As some one old enough to enter raw hex in to a hex keypad on a machine with an LED display having hand assembled the code in the back of her math exercise book during a math lesson (when I should have been learning stats) this doesn't sound too different.

    You kids and yer "raw hex keypads" and "LED readouts." Why, back in my day, we had toggle switches and light bulbs! And we liked it that way! Now you kids get off my law.....hey, wait...you're a girl? You can stay. :)

  8. Waist deep in snow, uphill both ways by 140Mandak262Jamuna · · Score: 4, Funny

    In those days we had to program the computer the size of a school bus strapped to our backs while trudging through the waist deep snow, for five miles one way, uphill both ways, without mittens while the politicians were whipping us yelling, "you don't want the Ruskies to win, do you?", those were the days boys. Now these young whippersnappers are using laptops with 8 Gigs of RAM and still could not write a simple javascript engine with a just in time debugger without creating a buffer overflow vulnerability while fed very long unicode strings.... bah... now get off my lawn.

    --
    sed -e 's/Chuck Norris/Rajnikant/g' joke > fact
  9. Interesting story on the virtualAGC page by cluke · · Score: 4, Interesting

    Next time you think you have a tight deadline:

    "Final exam (for the advanced student)
    Prior to the descent of Apollo 14's LM to the lunar surface, a short in the LM control panel caused the abort switch to be triggered intermittently. If this actually happened during the landing, an abort would have automatically occurred (meaning that the lower stage of the LM would have been jettisoned and the upper stage would have blasted back into space). No landing would have been possible, and the astronauts would have faced the grave situation of needing rescue by the command module. It was therefore necessary, in the orbit or two before descent, for the some of the software designers to work out a fix for this problem that allowed a software lockout of the abort switch during the initial phase of the descent, but also allowed reenabling the abort switch later in the descent, in case the astronauts needed to use it. They did, in fact, work out such a fix. Your mission, should you choose to accept it, is this: Work out such a fix and send it to me. Remember, your fix can only involve erasable memory, since the core-rope containing the program cannot be altered. The fix needs to be keyed in at the DSKY by the astronauts. You have about 90 minutes to figure it out. Go!"

    http://www.ibiblio.org/apollo/index.html#Final_exam_for_the_advanced_student_

  10. Re:Proper Old Skool by Anonymous Coward · · Score: 5, Interesting

    The problem with Apollo 11's guidance wasn't the equpment, it was the moon. Look up MASCONs. Essentially, the moon's density varies from spot to spot and these differences in density changed the gravitational force affecting the LM during its descent. This, in turn, added errors that couldn't be accounted for, pre-flight.

    What they did on subsequent flights was to use radar doppler data on the LM as it came around from the backside of the moon to determine the difference between the expected flight path and the actual flight path. Once they had this data, they updated the LM's guidance computer to correct for this effect.

    One trickiness is that the state vector of the LM was a 6-tuple. Rather than update the state vector, they figured out that they could just update the range to the landing site by updating 1 number.

    Google search for Emil Scheisser. He's the guy who figured this out.

  11. Re:Proper Old Skool by icebrain · · Score: 5, Informative

    They overshot the original intended landing point by about 4 miles because of a timing error--the descent burn started about four seconds late.

    The rocks-and-boulders-and-crater thing you're thinking of was a different issue.

    --
    The meek may inherit the earth, but the strong shall take the stars.
  12. Re:Proper Old Skool by infolation · · Score: 4, Informative

    The LM initially overshot because the crew were distracted by alarms caused by the computer being unable to process all its tasks simultaneously. These alarms, in turn, had been triggered because ground simulations hadn't taken account of hardware powering up in a random order which generated data from two radars instead of one, which overloaded the computer.

    Armstrong's boulder avoidance flying was undertaken after the crew realised they'd overshot the target site by 4 seconds.

    (Unfortunately I find this subject insanely fascinating)

  13. Supergeek Builds Homemade Functional AGC by Anonymous Coward · · Score: 4, Interesting

    This guy wins the ubergeek crown of all time. He actually built a fully functional version of an AGC out of discrete IC chips. Granted, it is not a true AGC clone, since the exact chips could not be procured in 2000-2004, but he did build a functional workalike of the AGC out of individual TTL chips, and wrote two software emulators, and got his modernized hardware reproduction AGC to run actual original AGC machine code software.