Source Code

These source-code files are part of a reconstructed copy of Luminary 97, the second release of the Apollo 11 Lunar Module (LM) Apollo Guidance Computer (AGC) software. It was created to fix two incorrect ephemeris constants in Luminary 96, as described by anomaly report LNY-59.

The reconstruction began with source code of Luminary 99 revision 1 previously transcribed from a digitized copy of that program. The code was then updated by undoing changes described in original Luminary memos 83 and 85, using asterisks indicating changed lines in the listing as a guide. The reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021152D. Note that page numbers in the reconstructed code match those on the Luminary 099 revision 001 printout, although the added code would likely have changed page numbers for a real Luminary 97 listing.

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.

062433,000002:                                                                                                  ## Copyright:   Public domain.
062434,000003:                                                                                                  ## Filename:    KALMAN_FILTER.agc
062435,000004:                                                                                                  ## Purpose:     A section of Luminary revision 97.
062436,000005:                                                                                                  ##              It is part of the reconstructed source code for the
062437,000006:                                                                                                  ##              second release of the flight software for the Lunar 
062438,000007:                                                                                                  ##              Module's (LM) Apollo Guidance Computer (AGC) for Apollo 11.
062439,000008:                                                                                                  ##              It was created to fix two incorrect ephemeris constants in
062440,000009:                                                                                                  ##              Luminary 96, as described by anomaly report LNY-59.
062441,000010:                                                                                                  ##              The code has been recreated from a copy of Luminary 99
062442,000011:                                                                                                  ##              revision 001, using asterisks indicating changed lines in
062443,000012:                                                                                                  ##              the listing and Luminary Memos #83 and #85, which list 
062444,000013:                                                                                                  ##              changes between Luminary 97 and 98, and 98 and 99. The
062445,000014:                                                                                                  ##              code has been adapted such that the resulting bugger words
062446,000015:                                                                                                  ##              exactly match those specified for Luminary 97 in NASA drawing
062447,000016:                                                                                                  ##              2021152D, which gives relatively high confidence that the
062448,000017:                                                                                                  ##              reconstruction is correct.
062449,000018:                                                                                                  ## Reference:   pp. 1470-1471
062450,000019:                                                                                                  ## Assembler:   yaYUL
062451,000020:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
062452,000021:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
062453,000022:                                                                                                  ## Mod history: 2019-07-28 MAS  Created from Luminary 99.
062454,000023: 

Page 1470

062456,000025: 17,3744  E6,1522                                  EBANK=   NO.UJETS                              
062457,000026: 16,3641                                           BANK     16                                    
062458,000027: 16,2000                                           SETLOC   DAPS1                                 
062459,000028: 16,2000                                           BANK                                           
062460,000029: 
062461,000030: 16,3641                                           COUNT*   $$/DAP                                
062462,000031: 
062463,000032: 16,3641           34752        RATELOOP           CA       TWO                                   
062464,000033: 16,3642           55744                           TS       DAPTEMP6                              
062465,000034: 16,3643           60000                           DOUBLE                                         
062466,000035: 16,3644           54002                           TS       Q                                     
062467,000036: 16,3645           51744                           INDEX    DAPTEMP6                              
062468,000037: 16,3646           11524                           CCS      TJP                                   
062469,000038: 16,3647           13651                           TCF      +2                                    
062470,000039: 16,3650           13670                           TCF      LOOPRATE                              
062471,000040: 16,3651           63731                           AD       -100MST6                              
062472,000041: 16,3652           00006                           EXTEND                                         
062473,000042: 16,3653           63707                           BZMF     SMALLTJU                              
062474,000043: 16,3654           51744                           INDEX    DAPTEMP6                              
062475,000044: 16,3655           11524                           CCS      TJP                                   
062476,000045: 16,3656           33731                           CA       -100MST6                              
062477,000046: 16,3657           13661                           TCF      +2                                    
062478,000047: 16,3660           43731                           CS       -100MST6                              
062479,000048: 16,3661           51744                           INDEX    DAPTEMP6                              
062480,000049: 16,3662           27524                           ADS      TJP                                   
062481,000050: 16,3663           51744                           INDEX    DAPTEMP6                              
062482,000051: 16,3664           11524                           CCS      TJP                                   
062483,000052: 16,3665           43615                           CS       -100MS                                #  0.1 AT 1
062484,000053: 16,3666           13670                           TCF      +2                                    
062485,000054: 16,3667           33615                           CA       -100MS                                
062486,000055: 16,3670           00006        LOOPRATE           EXTEND                                         
062487,000056: 16,3671           51744                           INDEX    DAPTEMP6                              
062488,000057: 16,3672           71521                           MP       NO.PJETS                              
062489,000058: 16,3673           30001                           CA       L                                     
062490,000059: 16,3674           51744                           INDEX    DAPTEMP6                              
062491,000060: 16,3675           55737                           TS       DAPTEMP1                              #  SIGNED TORQUE AT 1 JET-SEC FOR FILTER
062492,000061: 16,3676           00006                           EXTEND                                         
062493,000062: 16,3677           74742                           MP       BIT10                                 #  RESCALE TO 32; ONE BIT ABOUT 2 JET-MSEC
062494,000063: 16,3700           00006                           EXTEND                                         
062495,000064: 16,3701           63732                           BZMF     NEGTORK                               
062496,000065: 16,3702           50002        STORTORK           INDEX    Q                                     #  INCREMENT DOWNLIST REGISTER.
062497,000066: 16,3703           27513                           ADS      DOWNTORK                              #        NOTE:  NOT INITIALIZED; OVERFLOWS.
062498,000067: 
062499,000068: 16,3704           11744                           CCS      DAPTEMP6                              
062500,000069: 16,3705           13642                           TCF      RATELOOP   +1                         
062501,000070: 16,3706           13716                           TCF      ROTORQUE                              
062502,000071: 16,3707           34755        SMALLTJU           CA       ZERO                                  
062503,000072: 16,3710           51744                           INDEX    DAPTEMP6                              
062504,000073: 16,3711           57524                           XCH      TJP                                   
062505,000074: 16,3712           00006                           EXTEND                                         

Page 1471

062507,000076: 16,3713           74760                           MP       ELEVEN                                #  10.24 PLUS
062508,000077: 16,3714           30001                           CA       L                                     
062509,000078: 16,3715           13670                           TCF      LOOPRATE                              
062510,000079: 16,3716           31740        ROTORQUE           CA       DAPTEMP2                              
062511,000080: 16,3717           61741                           AD       DAPTEMP3                              
062512,000081: 16,3720           00006                           EXTEND                                         
062513,000082: 16,3721           71532                           MP       1JACCR                                
062514,000083: 16,3722           55747                           TS       JETRATER                              
062515,000084: 16,3723           41741                           CS       DAPTEMP3                              
062516,000085: 16,3724           61740                           AD       DAPTEMP2                              
062517,000086: 16,3725           00006                           EXTEND                                         
062518,000087: 16,3726           71531                           MP       1JACCQ                                
062519,000088: 16,3727           55746                           TS       JETRATEQ                              
062520,000089: 16,3730           12316                           TCF      BACKP                                 
062521,000090: 16,3731           77537        -100MST6           DEC      -160       B-14                       
062522,000091: 
062523,000092: 16,3732           40000        NEGTORK            COM                                            
062524,000093: 16,3733           24002                           INCR     Q                                     
062525,000094: 16,3734           13702                           TCF      STORTORK                              
062526,000095: 
062527,000096: 

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