Source Code

This is a reconstruction of the AGC program Luminary 99 Rev 0. It was the second release of the Lunar Module flight software targeted for use in Apollo 11, after Luminary 97. A bug (which had been around since at least Apollo 10, Luminary 69) was discovered in Rev 0 shortly before the Apollo 11 flight, resulting in a last minute revision into Rev 1, which is what actually flew rather than the Rev 0 presented here. A hardcopy of Rev 0 is known to exist — it belonged to AGC developer Allan Klumpp for many years — but unfortunately the Virtual AGC Project has not had access to that hardcopy. Thus the code you see here had been reconstructed (we believe accurately) rather than transcribed. The first step of the reconstruction of the Rev 0 source code was the transcription of the Rev 1 source code from a hardcopy in the MIT Museum collection. The process of reverting the active portion of the source code (i.e., other than program comments) from Rev 1 to Rev 0 was very minor, consisting only of moving the position of the STARTSB1 label in FRESH START AND RESTART. Allan had previously given us the checksums of the memory banks of Rev 0, and we have verified the program presented here has checksums identical to all banks of Allan's listing of Rev 0. The notations on Allan's Rev 0 program listing read, in part:

	GAP:  ASSEMBLE REVISION 099 OF AGC PROGRAM LUMINARY BY NASA 2021112-051

A single program comment is known to differ between Rev 0 and Rev 1, but these are harder to reconstruct and verify than changes to the active portion of the code. Thus it is possible that there are additional differences between the program comments in Rev 0 and Rev 1 that are unknown to us, and therefore are not reflected in the code presented here.

064783,000002:                                                                                                  ## Copyright:   Public domain.
064784,000003:                                                                                                  ## Filename:    KALMAN_FILTER.agc
064785,000004:                                                                                                  ## Purpose:     Part of the reconstructed source code for LMY99 Rev 0,
064786,000005:                                                                                                  ##              otherwise known as Luminary Rev 99, the second release
064787,000006:                                                                                                  ##              of the Apollo Guidance Computer (AGC) software for Apollo 11.
064788,000007:                                                                                                  ##              It differs from LMY99 Rev 1 (the flown version) only in the
064789,000008:                                                                                                  ##              placement of a single label. The corrections shown here have
064790,000009:                                                                                                  ##              been verified to have the same bank checksums as AGC developer
064791,000010:                                                                                                  ##              Allan Klumpp's copy of Luminary Rev 99, and so are believed
064792,000011:                                                                                                  ##              to be accurate. This file is intended to be a faithful 
064793,000012:                                                                                                  ##              recreation, except that the code format has been changed to 
064794,000013:                                                                                                  ##              conform to the requirements of the yaYUL assembler rather than 
064795,000014:                                                                                                  ##              the original YUL assembler.
064796,000015:                                                                                                  ##
064797,000016:                                                                                                  ## Assembler:   yaYUL
064798,000017:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
064799,000018:                                                                                                  ## Website:     www.ibiblio.org/apollo.
064800,000019:                                                                                                  ## Pages:       1470-1471
064801,000020:                                                                                                  ## Mod history: 2009-05-27 RSB  Adapted from the corresponding 
064802,000021:                                                                                                  ##                              Luminary131 file, using page 
064803,000022:                                                                                                  ##                              images from Luminary 1A.
064804,000023:                                                                                                  ##              2016-12-18 RSB  Proofed text comments with octopus/ProoferComments
064805,000024:                                                                                                  ##                              but no errors found.
064806,000025:                                                                                                  ##              2017-08-01 MAS  Created from LMY99 Rev 1.
064807,000026: 
064808,000027:                                                                                                  ## This source code has been transcribed or otherwise adapted from
064809,000028:                                                                                                  ## digitized images of a hardcopy from the MIT Museum.  The digitization
064810,000029:                                                                                                  ## was performed by Paul Fjeld, and arranged for by Deborah Douglas of
064811,000030:                                                                                                  ## the Museum.  Many thanks to both.  The images (with suitable reduction
064812,000031:                                                                                                  ## in storage size and consequent reduction in image quality as well) are
064813,000032:                                                                                                  ## available online at www.ibiblio.org/apollo.  If for some reason you
064814,000033:                                                                                                  ## find that the images are illegible, contact me at info@sandroid.org
064815,000034:                                                                                                  ## about getting access to the (much) higher-quality images which Paul
064816,000035:                                                                                                  ## actually created.
064817,000036:                                                                                                  ##
064818,000037:                                                                                                  ## The code has been modified to match LMY99 Revision 0, otherwise
064819,000038:                                                                                                  ## known as Luminary Revision 99, the Apollo 11 software release preceeding
064820,000039:                                                                                                  ## the listing from which it was transcribed. It has been verified to
064821,000040:                                                                                                  ## contain the same bank checksums as AGC developer Allan Klumpp's listing
064822,000041:                                                                                                  ## of Luminary Revision 99 (for which we do not have scans).
064823,000042:                                                                                                  ##
064824,000043:                                                                                                  ## Notations on Allan Klumpp's listing read, in part:
064825,000044:                                                                                                  ##
064826,000045:                                                                                                  ##      ASSEMBLE REVISION 099 OF AGC PROGRAM LUMINARY BY NASA 2021112-51
064827,000046: 

Page 1470

064829,000048: 17,3744  E6,1522                                  EBANK=   NO.UJETS                              
064830,000049: 16,3641                                           BANK     16                                    
064831,000050: 16,2000                                           SETLOC   DAPS1                                 
064832,000051: 16,2000                                           BANK                                           
064833,000052: 
064834,000053: 16,3641                                           COUNT*   $$/DAP                                
064835,000054: 
064836,000055: 16,3641           34752        RATELOOP           CA       TWO                                   
064837,000056: 16,3642           55744                           TS       DAPTEMP6                              
064838,000057: 16,3643           60000                           DOUBLE                                         
064839,000058: 16,3644           54002                           TS       Q                                     
064840,000059: 16,3645           51744                           INDEX    DAPTEMP6                              
064841,000060: 16,3646           11524                           CCS      TJP                                   
064842,000061: 16,3647           13651                           TCF      +2                                    
064843,000062: 16,3650           13670                           TCF      LOOPRATE                              
064844,000063: 16,3651           63731                           AD       -100MST6                              
064845,000064: 16,3652           00006                           EXTEND                                         
064846,000065: 16,3653           63707                           BZMF     SMALLTJU                              
064847,000066: 16,3654           51744                           INDEX    DAPTEMP6                              
064848,000067: 16,3655           11524                           CCS      TJP                                   
064849,000068: 16,3656           33731                           CA       -100MST6                              
064850,000069: 16,3657           13661                           TCF      +2                                    
064851,000070: 16,3660           43731                           CS       -100MST6                              
064852,000071: 16,3661           51744                           INDEX    DAPTEMP6                              
064853,000072: 16,3662           27524                           ADS      TJP                                   
064854,000073: 16,3663           51744                           INDEX    DAPTEMP6                              
064855,000074: 16,3664           11524                           CCS      TJP                                   
064856,000075: 16,3665           43615                           CS       -100MS                                #  0.1 AT 1
064857,000076: 16,3666           13670                           TCF      +2                                    
064858,000077: 16,3667           33615                           CA       -100MS                                
064859,000078: 16,3670           00006        LOOPRATE           EXTEND                                         
064860,000079: 16,3671           51744                           INDEX    DAPTEMP6                              
064861,000080: 16,3672           71521                           MP       NO.PJETS                              
064862,000081: 16,3673           30001                           CA       L                                     
064863,000082: 16,3674           51744                           INDEX    DAPTEMP6                              
064864,000083: 16,3675           55737                           TS       DAPTEMP1                              #  SIGNED TORQUE AT 1 JET-SEC FOR FILTER
064865,000084: 16,3676           00006                           EXTEND                                         
064866,000085: 16,3677           74742                           MP       BIT10                                 #  RESCALE TO 32; ONE BIT ABOUT 2 JET-MSEC
064867,000086: 16,3700           00006                           EXTEND                                         
064868,000087: 16,3701           63732                           BZMF     NEGTORK                               
064869,000088: 16,3702           50002        STORTORK           INDEX    Q                                     #  INCREMENT DOWNLIST REGISTER.
064870,000089: 16,3703           27513                           ADS      DOWNTORK                              #        NOTE:  NOT INITIALIZED; OVERFLOWS.
064871,000090: 
064872,000091: 16,3704           11744                           CCS      DAPTEMP6                              
064873,000092: 16,3705           13642                           TCF      RATELOOP   +1                         
064874,000093: 16,3706           13716                           TCF      ROTORQUE                              
064875,000094: 16,3707           34755        SMALLTJU           CA       ZERO                                  
064876,000095: 16,3710           51744                           INDEX    DAPTEMP6                              
064877,000096: 16,3711           57524                           XCH      TJP                                   
064878,000097: 16,3712           00006                           EXTEND                                         

Page 1471

064880,000099: 16,3713           74760                           MP       ELEVEN                                #  10.24 PLUS
064881,000100: 16,3714           30001                           CA       L                                     
064882,000101: 16,3715           13670                           TCF      LOOPRATE                              
064883,000102: 16,3716           31740        ROTORQUE           CA       DAPTEMP2                              
064884,000103: 16,3717           61741                           AD       DAPTEMP3                              
064885,000104: 16,3720           00006                           EXTEND                                         
064886,000105: 16,3721           71532                           MP       1JACCR                                
064887,000106: 16,3722           55747                           TS       JETRATER                              
064888,000107: 16,3723           41741                           CS       DAPTEMP3                              
064889,000108: 16,3724           61740                           AD       DAPTEMP2                              
064890,000109: 16,3725           00006                           EXTEND                                         
064891,000110: 16,3726           71531                           MP       1JACCQ                                
064892,000111: 16,3727           55746                           TS       JETRATEQ                              
064893,000112: 16,3730           12316                           TCF      BACKP                                 
064894,000113: 16,3731           77537        -100MST6           DEC      -160       B-14                       
064895,000114: 
064896,000115: 16,3732           40000        NEGTORK            COM                                            
064897,000116: 16,3733           24002                           INCR     Q                                     
064898,000117: 16,3734           13702                           TCF      STORTORK                              
064899,000118: 
064900,000119: 

End of include-file KALMAN_FILTER.agc.  Parent file is MAIN.agc