Source Code

These source-code files are part of a reconstructed copy of LM131 revision 1, the final release of the Apollo 13 Lunar Module (LM) Apollo Guidance Computer (AGC) software.

The source reconstruction began with source code of Luminary 131 previously transcribed from a digitized copy of that program. A dump of the flight spare core rope memory module B5, part number 2010802-171, serial number RAY 411, was obtained. This module is the only module different between Luminary 131 and LM131 revision 1. The dump was disassembled and all changes were incorporated into these source files. Note that page numbers in the reconstructed code match those on the Luminary 131 printout, although the changed code would likely have changed page numbers for a real LM131 revision 1 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.

061932,000002:                                                                                                  ## Copyright:   Public domain.
061933,000003:                                                                                                  ## Filename:    KALMAN_FILTER.agc
061934,000004:                                                                                                  ## Purpose:     A section of LM131 revision 1.
061935,000005:                                                                                                  ##              It is part of the reconstructed source code for the final
061936,000006:                                                                                                  ##              release of the flight software for the Lunar Module's (LM)
061937,000007:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 13. The code has
061938,000008:                                                                                                  ##              been reconstructed from a listing of Luminary 131 and a dump
061939,000009:                                                                                                  ##              of a core rope memory module B5, part number 2010802-171,
061940,000010:                                                                                                  ##              which is the only module different between LM131 revision 1
061941,000011:                                                                                                  ##              and Luminary 131. The executable generated from this source
061942,000012:                                                                                                  ##              has been verified against the module dump, so while the names,
061943,000013:                                                                                                  ##              comments, and ordering may not be exactly correct, the
061944,000014:                                                                                                  ##              resulting binary is.
061945,000015:                                                                                                  ## Reference:   pp. 1462-1463
061946,000016:                                                                                                  ## Assembler:   yaYUL
061947,000017:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
061948,000018:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
061949,000019:                                                                                                  ## Mod history: 2022-10-28 MAS  Created from Luminary 131.
061950,000020: 

Page 1462

061952,000022: 17,3777  E6,1522                                  EBANK=   NO.UJETS                              
061953,000023: 16,3645                                           BANK     16                                    
061954,000024: 16,2000                                           SETLOC   DAPS1                                 
061955,000025: 16,2000                                           BANK                                           
061956,000026: 
061957,000027: 16,3645                                           COUNT*   $$/DAP                                
061958,000028: 
061959,000029: 16,3645           34752        RATELOOP           CA       TWO                                   
061960,000030: 16,3646           55743                           TS       DAPTEMP6                              
061961,000031: 16,3647           60000                           DOUBLE                                         
061962,000032: 16,3650           54002                           TS       Q                                     
061963,000033: 16,3651           51743                           INDEX    DAPTEMP6                              
061964,000034: 16,3652           11524                           CCS      TJP                                   
061965,000035: 16,3653           13655                           TCF      +2                                    
061966,000036: 16,3654           13674                           TCF      LOOPRATE                              
061967,000037: 16,3655           63735                           AD       -100MST6                              
061968,000038: 16,3656           00006                           EXTEND                                         
061969,000039: 16,3657           63713                           BZMF     SMALLTJU                              
061970,000040: 16,3660           51743                           INDEX    DAPTEMP6                              
061971,000041: 16,3661           11524                           CCS      TJP                                   
061972,000042: 16,3662           33735                           CA       -100MST6                              
061973,000043: 16,3663           13665                           TCF      +2                                    
061974,000044: 16,3664           43735                           CS       -100MST6                              
061975,000045: 16,3665           51743                           INDEX    DAPTEMP6                              
061976,000046: 16,3666           27524                           ADS      TJP                                   
061977,000047: 16,3667           51743                           INDEX    DAPTEMP6                              
061978,000048: 16,3670           11524                           CCS      TJP                                   
061979,000049: 16,3671           43621                           CS       -100MS                                #  0.1 AT 1
061980,000050: 16,3672           13674                           TCF      +2                                    
061981,000051: 16,3673           33621                           CA       -100MS                                
061982,000052: 16,3674           00006        LOOPRATE           EXTEND                                         
061983,000053: 16,3675           51743                           INDEX    DAPTEMP6                              
061984,000054: 16,3676           71521                           MP       NO.PJETS                              
061985,000055: 16,3677           30001                           CA       L                                     
061986,000056: 16,3700           51743                           INDEX    DAPTEMP6                              
061987,000057: 16,3701           55736                           TS       DAPTEMP1                              #  SIGNED TORQUE AT 1 JET-SEC FOR FILTER
061988,000058: 16,3702           00006                           EXTEND                                         
061989,000059: 16,3703           74742                           MP       BIT10                                 #  RESCALE TO 32; ONE BIT ABOUT 2 JET-MSEC
061990,000060: 16,3704           00006                           EXTEND                                         
061991,000061: 16,3705           63736                           BZMF     NEGTORK                               
061992,000062: 16,3706           50002        STORTORK           INDEX    Q                                     #  INCREMENT DOWNLIST REGISTER.
061993,000063: 16,3707           27513                           ADS      DOWNTORK                              #        NOTE:  NOT INITIALIZED; OVERFLOWS.
061994,000064: 
061995,000065: 16,3710           11743                           CCS      DAPTEMP6                              
061996,000066: 16,3711           13646                           TCF      RATELOOP   +1                         
061997,000067: 16,3712           13722                           TCF      ROTORQUE                              
061998,000068: 16,3713           34755        SMALLTJU           CA       ZERO                                  
061999,000069: 16,3714           51743                           INDEX    DAPTEMP6                              
062000,000070: 16,3715           57524                           XCH      TJP                                   
062001,000071: 16,3716           00006                           EXTEND                                         

Page 1463

062003,000073: 16,3717           74760                           MP       ELEVEN                                #  10.24 PLUS
062004,000074: 16,3720           30001                           CA       L                                     
062005,000075: 16,3721           13674                           TCF      LOOPRATE                              
062006,000076: 16,3722           31737        ROTORQUE           CA       DAPTEMP2                              
062007,000077: 16,3723           61740                           AD       DAPTEMP3                              
062008,000078: 16,3724           00006                           EXTEND                                         
062009,000079: 16,3725           71532                           MP       1JACCR                                
062010,000080: 16,3726           55746                           TS       JETRATER                              
062011,000081: 16,3727           41740                           CS       DAPTEMP3                              
062012,000082: 16,3730           61737                           AD       DAPTEMP2                              
062013,000083: 16,3731           00006                           EXTEND                                         
062014,000084: 16,3732           71531                           MP       1JACCQ                                
062015,000085: 16,3733           55745                           TS       JETRATEQ                              
062016,000086: 16,3734           12316                           TCF      BACKP                                 
062017,000087: 16,3735           77537        -100MST6           DEC      -160       B-14                       
062018,000088: 
062019,000089: 16,3736           40000        NEGTORK            COM                                            
062020,000090: 16,3737           24002                           INCR     Q                                     
062021,000091: 16,3740           13706                           TCF      STORTORK                              
062022,000092: 
062023,000093: 

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