Source Code

These source-code files are part of a reconstructed copy of Luminary 69/2, the flown, final release of the Apollo 10 Lunar Module (LM) Apollo Guidance Computer (AGC) software.

The reconstruction is based on the source code of Luminary 69 — i.e., the initial, unflown version, "revision 0" — of which a contemporary listing was available. The code was then updated by incorporating the differences between Luminary 69 and Luminary 69/2, known from other contemporary documentation. The only such difference is the implementation in Luminary 69/2 of the "R-2 Lunar Potential Model", the source code for which was taken from program Luminary 99/1 (Apollo 11 LM), of which a contemporary listing was also available. Finally, the now-reconstructed Luminary 69/2 was then validated by assembling it to executable form and verifying that its memory banks had the correct checksums, known from still other contemporary documentation.

Note that page numbers in the reconstructed code match those in the original Luminary 69 program listing, or in the ORBITAL INTEGRATION log section, in Luminary 99/1. Page numbers would certainly differ somewhat in a contemporary Luminary 69/2 listing. Moreover, annotations that were not present in the contemporary source code have been added to the reconstructed code to justify each change in Luminary 69/2 relative to Luminary 69. Here's a guide to the Apollo documentation referenced in those annotations:
Comments from the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository.

063529,000002:                                                                                                  ## Copyright:   Public domain.
063530,000003:                                                                                                  ## Filename:    KALMAN_FILTER.agc
063531,000004:                                                                                                  ## Purpose:     A section of LUM69 revision 2.
063532,000005:                                                                                                  ##              It is part of the reconstructed source code for the flown
063533,000006:                                                                                                  ##              version of the flight software for the Lunar Module's (LM)
063534,000007:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 10. The code has
063535,000008:                                                                                                  ##              been recreated from a copy of Luminary revsion 069, using
063536,000009:                                                                                                  ##              changes present in Luminary 099 which were described in
063537,000010:                                                                                                  ##              Luminary memos 75 and 78. The code has been adapted such
063538,000011:                                                                                                  ##              that the resulting bugger words exactly match those specified
063539,000012:                                                                                                  ##              for LUM69 revision 2 in NASA drawing 2021152B, which gives
063540,000013:                                                                                                  ##              relatively high confidence that the reconstruction is correct.
063541,000014:                                                                                                  ## Reference:   pp. 1465-1466
063542,000015:                                                                                                  ## Assembler:   yaYUL
063543,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
063544,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
063545,000018:                                                                                                  ## Mod history: 2019-07-27 MAS  Created from Luminary 69.
063546,000019: 

Page 1465

063548,000021: 17,3700  E6,1522                                  EBANK=   NO.UJETS                              
063549,000022: 16,3624                                           BANK     16                                    
063550,000023: 16,2000                                           SETLOC   DAPS1                                 
063551,000024: 16,2000                                           BANK                                           
063552,000025: 
063553,000026: 16,3624                                           COUNT*   $$/DAP                                
063554,000027: 
063555,000028: 16,3624           34752        RATELOOP           CA       TWO                                   
063556,000029: 16,3625           55742                           TS       DAPTEMP6                              
063557,000030: 16,3626           60000                           DOUBLE                                         
063558,000031: 16,3627           54002                           TS       Q                                     
063559,000032: 16,3630           51742                           INDEX    DAPTEMP6                              
063560,000033: 16,3631           11524                           CCS      TJP                                   
063561,000034: 16,3632           13634                           TCF      +2                                    
063562,000035: 16,3633           13653                           TCF      LOOPRATE                              
063563,000036: 16,3634           63714                           AD       -100MST6                              
063564,000037: 16,3635           00006                           EXTEND                                         
063565,000038: 16,3636           63672                           BZMF     SMALLTJU                              
063566,000039: 16,3637           51742                           INDEX    DAPTEMP6                              
063567,000040: 16,3640           11524                           CCS      TJP                                   
063568,000041: 16,3641           33714                           CA       -100MST6                              
063569,000042: 16,3642           13644                           TCF      +2                                    
063570,000043: 16,3643           43714                           CS       -100MST6                              
063571,000044: 16,3644           51742                           INDEX    DAPTEMP6                              
063572,000045: 16,3645           27524                           ADS      TJP                                   
063573,000046: 16,3646           51742                           INDEX    DAPTEMP6                              
063574,000047: 16,3647           11524                           CCS      TJP                                   
063575,000048: 16,3650           43600                           CS       -100MS                                #  0.1 AT 1
063576,000049: 16,3651           13653                           TCF      +2                                    
063577,000050: 16,3652           33600                           CA       -100MS                                
063578,000051: 16,3653           00006        LOOPRATE           EXTEND                                         
063579,000052: 16,3654           51742                           INDEX    DAPTEMP6                              
063580,000053: 16,3655           71521                           MP       NO.PJETS                              
063581,000054: 16,3656           30001                           CA       L                                     
063582,000055: 16,3657           51742                           INDEX    DAPTEMP6                              
063583,000056: 16,3660           55735                           TS       DAPTEMP1                              #  SIGNED TORQUE AT 1 JET-SEC FOR FILTER
063584,000057: 16,3661           00006                           EXTEND                                         
063585,000058: 16,3662           74742                           MP       BIT10                                 #  RESCALE TO 32; ONE BIT ABOUT 2 JET-MSEC
063586,000059: 16,3663           00006                           EXTEND                                         
063587,000060: 16,3664           63715                           BZMF     NEGTORK                               
063588,000061: 16,3665           50002        STORTORK           INDEX    Q                                     #  INCREMENT DOWNLIST REGISTER.
063589,000062: 16,3666           27513                           ADS      DOWNTORK                              #    NOTE: NOT INITIALIZED; OVERFLOWS.
063590,000063: 
063591,000064: 16,3667           11742                           CCS      DAPTEMP6                              
063592,000065: 16,3670           13625                           TCF      RATELOOP   +1                         
063593,000066: 16,3671           13701                           TCF      ROTORQUE                              
063594,000067: 16,3672           34755        SMALLTJU           CA       ZERO                                  
063595,000068: 16,3673           51742                           INDEX    DAPTEMP6                              
063596,000069: 16,3674           57524                           XCH      TJP                                   
063597,000070: 16,3675           00006                           EXTEND                                         

Page 1466

063599,000072: 16,3676           74760                           MP       ELEVEN                                #  10.24 PLUS
063600,000073: 16,3677           30001                           CA       L                                     
063601,000074: 16,3700           13653                           TCF      LOOPRATE                              
063602,000075: 16,3701           31736        ROTORQUE           CA       DAPTEMP2                              
063603,000076: 16,3702           61737                           AD       DAPTEMP3                              
063604,000077: 16,3703           00006                           EXTEND                                         
063605,000078: 16,3704           71532                           MP       1JACCR                                
063606,000079: 16,3705           55745                           TS       JETRATER                              
063607,000080: 16,3706           41737                           CS       DAPTEMP3                              
063608,000081: 16,3707           61736                           AD       DAPTEMP2                              
063609,000082: 16,3710           00006                           EXTEND                                         
063610,000083: 16,3711           71531                           MP       1JACCQ                                
063611,000084: 16,3712           55744                           TS       JETRATEQ                              
063612,000085: 16,3713           12305                           TCF      BACKP                                 
063613,000086: 16,3714           77537        -100MST6           DEC      -160       B-14                       
063614,000087: 
063615,000088: 16,3715           40000        NEGTORK            COM                                            
063616,000089: 16,3716           24002                           INCR     Q                                     
063617,000090: 16,3717           13665                           TCF      STORTORK                              
063618,000091: 
063619,000092: 

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