Skip to content

About

Apollo 11 guidance computer (AGC) source code explained: Python translations of Comanche055 and Luminary099, plus an interactive replay of the Moon landing mission with live DSKYs, trajectory, the running code and real NASA audio.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Latest commit

 

History

12 Commits

Folders and files

Repository files navigation

Apollo 11 Explained: the Apollo Guidance Computer (AGC) source code, made readable

The original Apollo 11 source code for the Apollo Guidance Computer (AGC), Comanche055 for the Command Module Columbia and Luminary099 for the Lunar Module Eagle, explained with readable Python translations and an interactive replay of the Moon landing mission.

Watch the live mission replay →

Apollo 11 Live: trajectory, the two DSKYs, and the AGC code running during the 1202 alarm

What's inside

Live mission viewer

Replay Apollo 11 from launch to splashdown on the real mission clock (Ground Elapsed Time). Three panels show the trajectory, Columbia's and Eagle's DSKYs as the astronauts saw them (including the 1202 and 1201 program alarms during the landing), and the AGC source that was running at that moment, with a Python translation alongside. Real air-to-ground voices from NASA's recordings play as the mission passes each line. The DSKYs take keyboard input (pause and key V16 N36 ENTR for the AGC clock, V35 ENTR for a lamp test). The rendezvous is drawn to scale: Eagle catching up with Columbia, braking, station-keeping and docking, following the crew's range calls in the Apollo Flight Journal. Works offline as one HTML file.

Jump to a moment: Translunar injection · Lunar orbit insertion · Powered descent · 1202 alarm · Touchdown · First step · Lunar liftoff · Docking in lunar orbit · Entry · Splashdown

Python walkthroughs

explained/: Python walkthroughs, from how the AGC worked (ones'-complement numbers, the Executive and Waitlist, the interpreter, the DSKY) through every mission phase: the P11 launch monitor, free-return coast, P52 star alignment, P40 burns, P63–P66 landing guidance, P12 ascent, rendezvous (P32–P35, P20 radar navigation), and P61–P67 entry. Each module cites original routines by file and label, and saves figures to explained/figures/. See explained/README.md for the module guide.

Original flight software

Comanche055/ and Luminary099/: the original flight software for the Command Module Columbia and the Lunar Module Eagle, unchanged.

Background

The Apollo Guidance Computer (AGC) was built by the MIT Instrumentation Laboratory. It had 36,864 words of fixed core-rope memory and 2,048 words of erasable memory (15-bit words plus parity). The software team was led by Margaret Hamilton. During the landing on 20 July 1969, the LM computer raised 1202 and 1201 program alarms (executive overflow) and its restart protection kept the guidance running, so Mission Control called "Go". Eagle landed at Tranquility Base at 102:45:40 GET.

Run it locally

python -m venv .venv && source .venv/bin/activate
pip install -r explained/requirements.txt
python explained/mission.py              # narrated walkthrough of all 12 phases, writes the figures
python explained/live/build.py           # builds explained/live/apollo11_live.html
open explained/live/apollo11_live.html   # works offline

See explained/README.md for the module guide, the mission timeline and the simplifications made.

How the viewer is built

explained/live/build.py reruns the simulations, places them on the real Apollo 11 timeline from the Mission Report, and quotes the matching AGC source lines straight from Comanche055/ and Luminary099/. It then writes everything into one self-contained HTML page. A GitHub Actions workflow rebuilds and deploys the page on every push to main.

Credits

The AGC software was written at the MIT Instrumentation Laboratory, led by Margaret Hamilton (CM and LM flight software) and many others. The source here was transcribed by the Virtual AGC project and comes from chrislgarry/Apollo-11.

Licence

  • Comanche055/ and Luminary099/: the original AGC source, in the public domain (see AGC-LICENSE.md).
  • explained/ (the Python walkthroughs, figures and live viewer): MIT.

About

Apollo 11 guidance computer (AGC) source code explained: Python translations of Comanche055 and Luminary099, plus an interactive replay of the Moon landing mission with live DSKYs, trajectory, the running code and real NASA audio.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages