Simulation of the Apollo Guidance Computer Julian Webb
Simulation of the Apollo Guidance Computer Julian Webb University of the West of England, Bristol, UK julian 2. webb@uwe. ac. uk WEBB 1 G 146/MAPLD 2004
Introduction z Main aim of project: y. To produce a fully functional Block II LGC (Lunar Module version of the AGC) simulator/emulator running the original MIT-produced code and interacting with the user via reasonably accurate simulations of spacecraft controls z Though currently based on the LGC, the simulator would, with some alteration, also be able to represent the CMC z The AGC simulator is very much a “work in progress”! WEBB 2 G 146/MAPLD 2004
Motivations z Why? y. To provide a working AGC based on original materials rather than a functional simulation y. To provide an interesting and accessible history of computing educational resource y. To honour the efforts of the programmers, engineers and managers involved at MIT/Draper Labs y. To preserve some AGC materials in a machinereadable form y. To facilitate statistical analysis of AGC performance y. To allow better comparison with other 1960’s computers (has the AGC had a bad press? ) WEBB 3 G 146/MAPLD 2004
Simulator basics z The simulator provides a real-time emulation of the LGC, DSKY and other associated LM systems in a package for use under Windows XP z Written in C++ (the AGC itself) and Visual Basic (DSKY and other systems) y these two major components communicate via DLLs y also possible to interface other programs to AGC z The AGC simulator adjusts its speed automatically to give the correct 11. 7 s clock rate WEBB 4 G 146/MAPLD 2004
Sources used z Available sources y. Documentation x. History of Recent Science and Technology project (mostly ex -MIT/Draper Labs documents) x. Apollo Lunar Surface Journal (operational documentation, checklists etc. ) y. Source code listings (pdf files) x. Luminary 1 C (for LGC - two versions prior to Apollo 13 flight release) x. Colossus 249 (for CMC - as flown on Apollo 9) y. See References slide for more details WEBB 5 G 146/MAPLD 2004
Construction z Method y. Luminary source code entry (c 1500 pages) xavailable as MS Excel and text files y‘YUL assembler’ written (in Perl) y. Assembled machine code checked against original core listing (and later against another AGC enthusiast’s version) y. AGC written and tested y. Interface DLL written y. DSKY and other components written y. Testing against original LM checklists WEBB 6 G 146/MAPLD 2004
Difficulties encountered z Difficulties - documentation y. Lack of coherent documentation - many documents available but spread over a period of 10 years y. Some documentation misleading (to the historian) due to numerous version changes - care required to interpret the documents in relation to their context y. Documentation mainly aimed at informing MIT staff (for obvious reasons) - hence much background research required y. Little documentation for YUL assembler y. Lack of machine-readable source code WEBB 7 G 146/MAPLD 2004
Technical difficulties z Difficulties - technical y. Precise understanding of operation of several instructions required investigation of the microcode and. . . ysome microcode control pulses are not well documented y. A few questions remain concerning the YUL assembler output y. Uplink loads not documented - necessary to simulate these to provide (e. g. ) appropriate mission time, vehicle mass WEBB 8 G 146/MAPLD 2004
System boundaries z Difficulties - system boundaries y LGC linked to other LM systems and to the mission control environment y Necessary to provide at least a basic simulation of many of these external systems y Full emulation limited (at present) to LGC, DSKY and AOT y Other systems provided in simulation as required by LGC functionality y A major omission is the AGS which seems to have little internal technical documentation remaining (especially regarding the AEA) y Microcode - simulation of this is a proposed later stage of this project WEBB 9 G 146/MAPLD 2004
Educational features z One aim of this project is to provide an educational facility z Demonstration mode: y allows pre-prepared scripts to interact with the simulation whilst providing an explanatory commentary y features of the AGC can be shown either in isolation or in the context of a mission y this facility can be seen in the poster presentation z Also available is a fault-creation facility to demonstrate the effect of (e. g. ) parity errors, DSKY display malfunctions etc. WEBB 10 G 146/MAPLD 2004
y. LGC Progress so far x. Full instruction set operational x. Timers and external interrupts operational x. Fully functional DSKY y. Associated spacecraft systems x. Major associated LM switches and circuit-breakers implemented x. Mechanically functional AOT (no simulated starfield) x. Limited ACA/TTCA hand-controller simulation and RCS graphic x. Limited IMU functionality y. External systems WEBB x. Basic telemetry downlink display x. Executive and Waitlist display x. Basic statistical display 11 G 146/MAPLD 2004
Work to do y. The following features are planned for the future (not in any particular order): x. Fully implement IMU x. Simulate vehicle dynamics x. Finish implementation of AOT to permit starbased alignments x. Emulation of microcode instructions x. Improve statistical performance analysis WEBB 12 G 146/MAPLD 2004
Conclusion y. The current simulator provides enough functionality to gain useful insights into the operational use of the LGC and associated environment y. Future work will extend the simulation to provide for spacecraft manoeuvring y. The intention is to allow a full LM descent, landing, ascent and rendezvous to be demonstrated WEBB 13 G 146/MAPLD 2004
Acknowledgments z Thanks are due to Ron Burkey (who has been working independently on an AGC simulator) for providing a series of stimulating questions during my work and for permitting the checking of the assembled Luminary code against his own machine code created in an alternative way WEBB 14 G 146/MAPLD 2004
Acronyms y y y y WEBB ACA – Attitude Controller Assembly AEA – Abort Electronics Assembly (the AGS digital computer system) AGC – Apollo Guidance Computer (cf CMC and LGC) AGS – Abort Guidance System – backup to PGNS to allow rendezvous AOT – Alignment Optical Telescope CMC – Command Module Computer DSKY – Di. Splay and Ke. Yboard for AGC IMU – Inertial Measurement Unit ISS – Inertial Sub. Section LGC – Lunar module Guidance Computer PGNCS – Primary Guidance, Navigation and Control Section PGNS – Primary Guidance and Navigation Section RCS – Reaction Control System (on LM 16 jets arranged in two systems) TTCA – Throttle/Translation Controller Assembly YUL – AGC assembler (original written at Christmas) 15 G 146/MAPLD 2004
References z Some resources of interest to AGC historians. . . y History of Recent Science and Technology - 77 documents more-or-less relating to the development of the AGC http: //www. hrst. mit. edu/hrs/apollo (N. B. site is not always available) (A set of convenient indices to these documents is available at my website: http: //www. cems. uwe. ac. uk/~jtwebb/agc) y Apollo Lunar Surface Journal - contains several interesting LM operational documents plus complete surface transcripts http: //www. hq. nasa. gov/alsj y Eldon C. Hall, Journey to the Moon: The History of the Apollo Guidance Computer, AIAA, Reston, VA, 1996 Should be read in conjunction with: Hugh Blair-Smith, Annotations to Journey to the Moon, http: //www. hrst. mit. edu/hrs/apollo/ public/blairsmith. htm WEBB 16 G 146/MAPLD 2004
- Slides: 16