Apollo Guidance Computer32 kilograms, 2,048 words of working memory and a keyboard of verbs and nouns. This is how Eagle got to the Moon.
The page has two parts. First the concepts: what the computer does, how the crew talked to it through the DSKY (the computer’s display and keyboard) and how the lunar module (LM) kept track of its attitude. Then the simulator, where you work through an introduction to the DSKY and three sequences from Apollo 11, key by key, and see the effect on the vehicle: the attitude of the LM, the trajectory, the view through the window and live telemetry.
The display on the right is a simulated DSKY now running V16 N36: it monitors the mission clock. R1 shows the hours, R2 the minutes, R3 the seconds with hundredths. Hover over the display (or tap it) to see what each field means.
1What the AGC is
The AGC was the on-board computer of the Apollo spacecraft, designed at the MIT Instrumentation Laboratory. Every lunar mission carried two: one in the command module (the Colossus software) and one in the lunar module (the Luminary software; for Apollo 11, version Luminary 099). The LM also had a second, simpler computer built by TRW: the AGS (Abort Guidance System), which could take the LM back into orbit if the AGC failed.
Its work came in three parts: navigation (where am I and how fast am I going, from the inertial platform (IMU), radar and stars), guidance (where do I need to get to and what acceleration do I need now) and control (start and throttle the engine, point the spacecraft with the small attitude thrusters, called the RCS).
The software ran on a small real-time operating system: an Executive that started jobs by priority and a Waitlist for tasks scheduled at precise times. When it had too much to do, it could make a controlled restart and keep only what was vital. That property saved the Apollo 11 landing (see the 1201/1202 alarms below).
2DSKY: display and keyboard
The DSKY (Display and Keyboard) was the only direct interface to the computer. The digits are electroluminescent and green. At the top are three two-digit fields; below them, three registers of five digits each, with a sign.
| Element | What it means |
|---|---|
| PROG | the major program now running (for example 63 = the braking phase of the descent). |
| VERB | the action: display, monitor, load, change program, ask for approval. |
| NOUN | the data the verb acts on: the clock, the altitude, the velocities, the angles. |
| R1 R2 R3 | the three values of the noun. A + or − sign means decimal; no sign means octal (the alarm codes). |
| COMP ACTY | lit while the computer is running a job; when it is off, the computer is just waiting. |
| The lamps | white: KEY REL, OPR ERR (operator error), STBY, NO ATT etc.; amber: PROG (program alarm), RESTART, ALT and VEL (the landing radar data are not good), GIMBAL LOCK, TEMP. |
In the simulator, when you hover over a field, a register or a lamp of the DSKY, an explanation appears: what the value means, what units it is in and how to read the format (for example, why +01234 means 123.4). On a touch screen, tap the field.
The keys
VERB and NOUN get ready for the two digits. ENTR executes. PRO (proceed) answers “yes, go on” to a request from the computer. CLR clears what you have typed, RSET turns off the error lamps, and KEY REL gives the keyboard back to the program after you have called up a display. + and − set the sign when you load numbers.
3Verb + Noun: the crew’s language
A command is a short sentence: a verb and a noun. VERB 1 6 NOUN 3 6 ENTR, abbreviated V16N36E, means “monitor (16) the clock (36)”. Programs use the same language the other way round: when the computer shows a verb and a noun that flash, it is asking you a question and waiting for the answer (usually PRO).
| Verb | Action |
|---|---|
| V05 | display in octal (e.g. N09, the alarm codes) |
| V06 | display in decimal |
| V16 | monitor in decimal, updated every second |
| V34 | terminate the current display or program |
| V35 | DSKY lamp test |
| V37 | change program (V37E, then the program number, E) |
| V50 | “please perform” (e.g. V50N18: rotate the spacecraft) |
| V57 | permit landing radar updates of the altitude |
| V82 | display the orbit parameters (N44) |
| V99 | “please enable engine ignition” (asks for PRO) |
| Noun | Data (R1 / R2 / R3) |
|---|---|
| N09 | alarm codes |
| N18 | desired attitude angles |
| N33 | time of ignition (TIG) |
| N36 | AGC clock: hours / minutes / seconds |
| N40 | time from ignition / ΔV to go / ΔV accumulated |
| N42, N44 | apolune / perilune / ΔV or time |
| N61 | time to throttle-up / time from ignition / crossrange |
| N62 | velocity / time from ignition / ΔV |
| N63 | inertial velocity / vertical velocity / altitude |
| N64 | LPD time + LPD angle / vertical velocity / altitude |
| N68 | distance to the site / time to go / Δh |
4How to enter commands
Crews wrote commands in shorthand: V for VERB, N for NOUN, E for ENTR. V16N36E means that you press, in order, VERB 1 6 NOUN 3 6 ENTR. The simulator’s steps use the same notation.
Step by step: V16N36E
| You press | What the DSKY shows |
|---|---|
| VERB | the VERB field blanks and waits for two digits; any flashing stops while you type. |
| 1 6 | 16 appears in VERB. A third digit lights OPR ERR. |
| NOUN | the NOUN field blanks and waits for two digits. |
| 3 6 | 36 appears in NOUN. |
| ENTR | the computer executes the command: R1, R2 and R3 show the hours, minutes and seconds. With verb 16 the values update every second. |
Nothing is executed until ENTR, so you can make corrections: CLR clears the field you are typing in, and pressing VERB or NOUN again rewrites that field from scratch.
Special cases
| You key in | What happens |
|---|---|
| V37E 63E | changes program. After the first ENTR the NOUN field flashes blank: the two digits you type now are the program number, without pressing NOUN. |
| V16E | a verb without a noun: it applies to the noun already on display. |
| V34E V35E V36E V57E V82E | verbs that need no noun: terminate, lamp test, fresh start, use the landing radar, orbit parameters. |
| PRO | answers “yes” to a flashing verb and noun. V34E answers “no” and abandons the program. ENTR on its own is not an answer. |
| KEY REL | while you are displaying something you asked for (for example V16N68), the program cannot show its requests and the KEY REL lamp flashes. KEY REL or V34E gives the keyboard back. |
| RSET | turns off the OPR ERR and PROG lamps; it does not cancel any command. |
| + − | the sign of a number when you load data with verbs 21–25. Loading is not simulated, so here they light OPR ERR. |
What lights OPR ERR
Digits typed without VERB or NOUN before them, a third digit in a field, an unknown verb or noun, a program that does not exist or is not allowed now (for example P40 before P30). Each time, the simulator shows a short message with the reason. Press RSET and enter the command again.
What the simulator understands
Verbs 05 (only with N09), 06, 16, 34, 35, 36, 37, 57 and 82; verbs 50 and 99 are shown only by the computer, as requests. Nouns 09, 18, 20, 33, 36, 40, 42, 43, 44, 45, 60, 61, 62, 63, 64, 68, 74, 76, 81, 85 and 94. Programs 00, 12, 30, 40, 63 and 68 are selected with V37; 64, 65 and 66 start by themselves or from the crew’s controls.
Computer keyboard and touch screen
| Key | DSKY key |
|---|---|
| V / N | VERB / NOUN |
| 0–9 | the digits |
| Enter or E | ENTR |
| P | PRO |
| C or Esc | CLR |
| R | RSET |
| K | KEY REL |
| + / − | + / − |
| Key | Crew panel |
|---|---|
| W / S | ACA forward / back |
| ↑ / ↓ | ROD switch: slower / faster descent |
| Y | rotate 180° (face up) |
| X | ENGINE STOP |
| Space | pause |
The ACA (Attitude Controller Assembly) is the hand controller the commander used to point the LM; in P64 the same controller moves the landing target. The ROD (Rate Of Descent) switch, in P66, increases or decreases the rate of descent by 1 ft/s (0.3 m/s) per click.
On a touch screen you press the DSKY keys directly. The ACA and ROD buttons repeat the command for as long as you hold them down. Every step in the simulator also has a “Type it for me” button, which presses the keys in order so that you can follow the sequence on the display.
5Programs
The major programs (shown in PROG) are the phases of the flight. The crew selected them with V37; some changed by themselves, for example from P63 to P64 at high gate.
High gate (a term borrowed from aviation) is the point where braking ends: about 2.4 km altitude (7,800 ft) and 7 km before the landing site, with the speed down to about 140 m/s. From there the LM pitches up towards vertical, and the crew sees the landing site through the window for the first time. Low gate is the end of the approach: about 150 m altitude and a few hundred metres from the target. From there the crew could let the computer land or take over control.
| Program | Role |
|---|---|
| P00 | idle (“POO”): the computer only navigates |
| P12 | lift-off from the Moon with the ascent engine (APS) |
| P30 | loads a manoeuvre computed on the ground: the time and the ΔV vector |
| P40 | performs the descent engine (DPS) burn for that manoeuvre |
| P52 | aligns the inertial platform on the stars |
| P63 | braking: from 15 km and ≈ 1,700 m/s down to high gate |
| P64 | approach: the LM tilts so that the crew can see the landing site; the angle shown is read on the LPD (Landing Point Designator) scale etched on the window |
| P65 | fully automatic landing (never used in flight) |
| P66 | the commander controls attitude and rate of descent, the computer throttles the engine |
| P68 | landing confirmation and position on the surface; the crew selects it with V37E68E once they are sure they do not have to lift off immediately |
6Navigation and LM attitude
The inertial platform (IMU) is a block of gyroscopes held fixed relative to the stars by three gimbals. The angles between the platform and the spacecraft give the attitude; the accelerometers on the platform give the change in velocity. From these the AGC keeps its state vector up to date: position and velocity.
The axes of the LM are not those of an aircraft. X points up, along the engine thrust. Z points forward, through the windows and the hatch. Y points to the right. Rotation about X is called yaw, about Y pitch, about Z roll.
Face down, face up
During braking the thrust has to point almost opposite to the velocity, so the X axis is nearly horizontal. Apollo 11 began the descent with its windows towards the Moon (face down), to recognise landmarks. A few minutes later the crew rotated the LM 180° about the X axis (yaw) to face up, so that the landing radar could see the ground. The window then showed the black sky and the Earth. At the start of P64 the spacecraft pitches up towards vertical and the ground reappears at the bottom of the window.
The landing radar and Δh
The altitude computed by the AGC came from inertial navigation, with an error of a few hundred metres. The landing radar (LR) measured the altitude directly. The difference, called Δh, appeared in register R3 of N68; that is why Aldrin called up V16N68. Once the flight controllers on the ground had approved the value and the crew had keyed V57E, the computer started using the radar and Δh fell towards zero. The ALT and VEL lamps on the DSKY go out when the radar has locked on to the ground.
7The descent, phase by phase
DOI (Descent Orbit Insertion) is a short burn of about 20–25 m/s, made half an orbit earlier. It lowers perilune from about 110 km to 15 km. PDI (Powered Descent Initiation) starts the descent engine near perilune, about 460 km from the landing site. For the first 26 seconds it runs at 10 %, while the engine lines up with the centre of mass, then at full thrust.
Braking (P63) lasts until high gate, the approach (P64) until low gate, and the last hundred metres are flown either by the computer (P65) or by the commander (P66).
Why 94 % and then “throttle recovery”? The descent engine (DPS) could be throttled continuously only between 10 % and 65 % of its rated thrust of 46.7 kN. Between 65 % and about 93 % the ablative combustion chamber eroded too quickly, so there the engine only worked in one fixed position, at maximum thrust (FTP, fixed throttle position: about 43.9 kN, or 94 % in the simulator). The guidance was designed to ask for more than 65 % for almost all of the braking phase, so the engine stayed at FTP. About two minutes before high gate the command dropped below the threshold and the engine moved into the throttleable range (throttle recovery), to leave a margin for corrections during the approach.
Every 2 seconds, the Luminary guidance computes the acceleration needed to reach a target point with the desired velocity, acceleration and “jerk”. The time left to the target (TGO) is recomputed in every cycle. The simulator uses the same form of guidance law, with approximate targets.
On Apollo 11, a small navigation error put Eagle about 6 km further downrange than planned. The spot the computer was taking it to was right next to West crater, in a boulder field. That is why Armstrong switched to P66 and flew manually for roughly another 400 metres. The simulator reproduces this situation.
8The 1201 and 1202 alarms
The rendezvous radar switch was in a position that made its electronics send the AGC thousands of useless pulses per second. The cause was a phase mismatch between the 800 Hz power supplies of the radar electronics and of the AGC: the angle counters kept oscillating, and the pulses ate up 13–15 % of the processor’s time. When Aldrin also called up the V16N68 monitor, the spare computing capacity ran out.
The Executive had no free memory areas left for a new job: 1202 means there were no “core sets” left, 1201 that there were no VAC areas left. The computer made a controlled restart, dropped the non-essential jobs and carried on with the guidance. There were five alarms, at 316, 356, 552, 578 and 594 seconds after PDI. Flight controllers Steve Bales and Jack Garman decided within seconds that the landing could go on.
9About the simulator
The simulator does not run the original Luminary code (Virtual AGC exists for that). It reproduces the visible behaviour: verbs, nouns, programs, flashing requests, alarms. Underneath, it runs real physics: lunar gravity, a mass that drops as propellant is used, the engine limits (10–65 % or 94 %) and a Luminary-style guidance law.
Simplifications: the flight is planar (no sideways motion), the Moon is spherical and does not rotate, the inertial platform is perfect, and the attitude is reduced to pitch and yaw. The angles in N18 and N20 are measured from the local vertical, not from the inertial platform. Guidance is recomputed every 0.5 s (in Luminary, every 2 s). The craters are generated procedurally; only West crater is deliberately placed next to the target. The initial altitude error of the AGC (≈ 850 m) was chosen for the simulator. The real DSKY showed imperial units (feet, ft/s, nautical miles); here you can choose them in the top bar. The default is metric.
How to use it
Pick a scenario from the top bar. The list of steps tells you what to key in and what it does; the keys and shortcuts are described in section 4. While you are waiting for an event, speed up time; the simulator goes back to 1× by itself when it needs you.
10Sources
The key sequences, mission times and displayed values come from the sources below. The guidance-law targets in the simulator are my own approximations, chosen so that the phases fall at the Apollo 11 times; they are not the constants of Luminary 099.
- Virtual AGC, Ron Burkey and contributors. Used for: the AGC and DSKY emulator, the original Colossus and Luminary code, the V35E, V16N36E, V37E00E and V05N09E examples.
- Moonjs: An Online Apollo Guidance Computer Simulator, Shahriar Iravanian. Used for: Virtual AGC running in the browser; example commands (V16N65E, V06N62E, V91E).
- Apollo Guidance Computer Simulator, Mau0x80, GitHub. Used for: the DSKY lamps and keys, the keyboard shortcuts. Note: their table of phases puts PDI at 101:36:14, which is actually the DOI time; PDI was at 102:33:05.
- Tales from the Lunar Module Guidance Computer, Don Eyles. Used for: the V16N68 sequence and the 1202 alarms, the contents of N63, N64 and N68, the LPD angle.
- LGC-Astronaut Interfaces During Landing (Luminary 1D), Don Eyles. Used for: the contents of N61, N62, N63, N64, N68 and N60, selecting P68 with V37E68E, LPD redesignation, the ROD switch (1 ft/s per click).
- A User’s Guide to the Luminary 1A Lunar Landing Programs, George W. Cherry and Don Eyles (MIT). Used for: the nominal conditions at PDI and at high gate (≈ 2.4 km, ≈ 7 km, ≈ 140 m/s).
- Apollo Experience Report: Descent and Ascent (TN D-6846), NASA. Used for: the nominal profiles of the Apollo 11 descent and ascent.
- Apollo Operations Handbook, LM, LGC/DSKY section (LMA790-3-LM 4.4), NASA / Grumman. Used for: the DSKY rules: flashing displays, KEY REL, restrictions on verbs and nouns.
- GSOP R-567, section 4: LM programs, MIT Instrumentation Laboratory. Used for: P12: vertical rise up to 40 ft/s, then pitchover towards horizontal.
- Luminary 069, P12.agc, Virtual AGC. Used for: the data shown in N76 at lift-off.
- Simple AGC, NASSP (Project Apollo for Orbiter). Used for: the sequence N62, V99N62 and N63 at PDI; the meaning of N64 and N68.
- LM Descent to the Moon, Part 1: Theory and Software, Exo Cruiser. Used for: the N63 values at ignition, the maximum thrust of 43,900 N after 26 s, the LPD angle of 33° at low gate.
- Apollo 11 1201 and 1202 alarms, Space Daily, after the MIT analysis of 4 August 1969. Used for: the times of the five alarms: 316, 356, 552, 578 and 594 s after PDI.
- The Apollo 11 Moon Landing, We Hack the Moon (Draper). Used for: the ALT and VEL lamps going out at ≈ 38,000 ft and the cause of the 1202 alarms.
How to key in commands
V16N36E = VERB 1 6 NOUN 3 6 ENTR. Nothing is executed until ENTR; CLR clears the field you are typing in. Hover over the display or the lamps to see what each value means.