Source Code

These source-code files derive from a printout of Luminary 116 (the Apollo 12 Lunar Module guidance computer program), from the personal library of original AGC developer Don Eyles, digitally photographed at archive.org, financially sponsored by Ron Burkey, and transcribed to source code by a team of volunteers. This colorized, syntax-highlighted form was created by assembling that transcribed source code. Note that the full page images are available on the Virtual AGC project page at archive.org, while reduced-size images are presented at the VirtualAGC project website. Report or fix any transcription errors at the Virtual AGC project code repository.

Notations on the program listing read, in part:

	GAP:  ASSEMBLE REVISION 116 OF AGC PROGRAM LUMINARY BY NASA 2021112-071
	19:09 AUG. 11,1969
Note that the date is the date of the printout, not the date of the program revision.

062487,000002:                                                                                                  ## Copyright:   Public domain.
062488,000003:                                                                                                  ## Filename:    KALMAN_FILTER.agc
062489,000004:                                                                                                  ## Purpose:     A section of Luminary revision 116.
062490,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM) 
062491,000006:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 12.
062492,000007:                                                                                                  ##              This file is intended to be a faithful transcription, except
062493,000008:                                                                                                  ##              that the code format has been changed to conform to the
062494,000009:                                                                                                  ##              requirements of the yaYUL assembler rather than the
062495,000010:                                                                                                  ##              original YUL assembler.
062496,000011:                                                                                                  ## Reference:   pp. 1460-1461
062497,000012:                                                                                                  ## Assembler:   yaYUL
062498,000013:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
062499,000014:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
062500,000015:                                                                                                  ## Mod history: 2017-01-22 MAS  Created from Luminary 99.
062501,000016:                                                                                                  ##              2017-01-23 RRB  Updated for Luminary 116.
062502,000017:                                                                                                  ##              2017-03-13 RSB  Proofed comment text via 3-way diff vs
062503,000018:                                                                                                  ##                              Luminary 99 and 131 ... no problems found.
062504,000019: 

Page 1460

062506,000021: 17,3777  E6,1522                                  EBANK=   NO.UJETS                              
062507,000022: 16,3645                                           BANK     16                                    
062508,000023: 16,2000                                           SETLOC   DAPS1                                 
062509,000024: 16,2000                                           BANK                                           
062510,000025: 
062511,000026: 16,3645                                           COUNT*   $$/DAP                                
062512,000027: 
062513,000028: 16,3645           34752        RATELOOP           CA       TWO                                   
062514,000029: 16,3646           55744                           TS       DAPTEMP6                              
062515,000030: 16,3647           60000                           DOUBLE                                         
062516,000031: 16,3650           54002                           TS       Q                                     
062517,000032: 16,3651           51744                           INDEX    DAPTEMP6                              
062518,000033: 16,3652           11524                           CCS      TJP                                   
062519,000034: 16,3653           13655                           TCF      +2                                    
062520,000035: 16,3654           13674                           TCF      LOOPRATE                              
062521,000036: 16,3655           63735                           AD       -100MST6                              
062522,000037: 16,3656           00006                           EXTEND                                         
062523,000038: 16,3657           63713                           BZMF     SMALLTJU                              
062524,000039: 16,3660           51744                           INDEX    DAPTEMP6                              
062525,000040: 16,3661           11524                           CCS      TJP                                   
062526,000041: 16,3662           33735                           CA       -100MST6                              
062527,000042: 16,3663           13665                           TCF      +2                                    
062528,000043: 16,3664           43735                           CS       -100MST6                              
062529,000044: 16,3665           51744                           INDEX    DAPTEMP6                              
062530,000045: 16,3666           27524                           ADS      TJP                                   
062531,000046: 16,3667           51744                           INDEX    DAPTEMP6                              
062532,000047: 16,3670           11524                           CCS      TJP                                   
062533,000048: 16,3671           43621                           CS       -100MS                                #  0.1 AT 1
062534,000049: 16,3672           13674                           TCF      +2                                    
062535,000050: 16,3673           33621                           CA       -100MS                                
062536,000051: 16,3674           00006        LOOPRATE           EXTEND                                         
062537,000052: 16,3675           51744                           INDEX    DAPTEMP6                              
062538,000053: 16,3676           71521                           MP       NO.PJETS                              
062539,000054: 16,3677           30001                           CA       L                                     
062540,000055: 16,3700           51744                           INDEX    DAPTEMP6                              
062541,000056: 16,3701           55737                           TS       DAPTEMP1                              #  SIGNED TORQUE AT 1 JET-SEC FOR FILTER
062542,000057: 16,3702           00006                           EXTEND                                         
062543,000058: 16,3703           74742                           MP       BIT10                                 #  RESCALE TO 32; ONE BIT ABOUT 2 JET-MSEC
062544,000059: 16,3704           00006                           EXTEND                                         
062545,000060: 16,3705           63736                           BZMF     NEGTORK                               
062546,000061: 16,3706           50002        STORTORK           INDEX    Q                                     #  INCREMENT DOWNLIST REGISTER.
062547,000062: 16,3707           27513                           ADS      DOWNTORK                              #    NOTE:  NOT INITIALIZED; OVERFLOWS.
062548,000063: 
062549,000064: 16,3710           11744                           CCS      DAPTEMP6                              
062550,000065: 16,3711           13646                           TCF      RATELOOP   +1                         
062551,000066: 16,3712           13722                           TCF      ROTORQUE                              
062552,000067: 16,3713           34755        SMALLTJU           CA       ZERO                                  
062553,000068: 16,3714           51744                           INDEX    DAPTEMP6                              
062554,000069: 16,3715           57524                           XCH      TJP                                   
062555,000070: 16,3716           00006                           EXTEND                                         

Page 1461

062557,000072: 16,3717           74760                           MP       ELEVEN                                #  10.24 PLUS
062558,000073: 16,3720           30001                           CA       L                                     
062559,000074: 16,3721           13674                           TCF      LOOPRATE                              
062560,000075: 16,3722           31740        ROTORQUE           CA       DAPTEMP2                              
062561,000076: 16,3723           61741                           AD       DAPTEMP3                              
062562,000077: 16,3724           00006                           EXTEND                                         
062563,000078: 16,3725           71532                           MP       1JACCR                                
062564,000079: 16,3726           55747                           TS       JETRATER                              
062565,000080: 16,3727           41741                           CS       DAPTEMP3                              
062566,000081: 16,3730           61740                           AD       DAPTEMP2                              
062567,000082: 16,3731           00006                           EXTEND                                         
062568,000083: 16,3732           71531                           MP       1JACCQ                                
062569,000084: 16,3733           55746                           TS       JETRATEQ                              
062570,000085: 16,3734           12316                           TCF      BACKP                                 
062571,000086: 16,3735           77537        -100MST6           DEC      -160       B-14                       
062572,000087: 
062573,000088: 16,3736           40000        NEGTORK            COM                                            
062574,000089: 16,3737           24002                           INCR     Q                                     
062575,000090: 16,3740           13706                           TCF      STORTORK                              
062576,000091: 
062577,000092: 

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