Source Code

These source-code files derive from a printout of Luminary 210 (Apollo 15-17 Lunar Module guidance computer program), from the personal library of original AGC developer Don Eyles, digitally photographed at archive.org, financially sponsored by Jim Lawton, 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 210 OF AGC PROGRAM LUMINARY 
	BY NASA 2021112-161 17:11 MAR. 19,1971
Note that the date is the date of the printout, not the date of the program revision.

063770,000002:                                                                                                  ## Copyright:   Public domain.
063771,000003:                                                                                                  ## Filename:    KALMAN_FILTER.agc
063772,000004:                                                                                                  ## Purpose:     A section of Luminary revision 210.
063773,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
063774,000006:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 15-17.
063775,000007:                                                                                                  ##              This file is intended to be a faithful transcription, except
063776,000008:                                                                                                  ##              that the code format has been changed to conform to the
063777,000009:                                                                                                  ##              requirements of the yaYUL assembler rather than the
063778,000010:                                                                                                  ##              original YUL assembler.
063779,000011:                                                                                                  ## Reference:   pp. 1468 - 1469
063780,000012:                                                                                                  ## Assembler:   yaYUL
063781,000013:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
063782,000014:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
063783,000015:                                                                                                  ## Mod history: 2016-11-17 JL   Created from Luminary131 version.
063784,000016:                                                                                                  ##              2016-11-23 AS   Transcribed
063785,000017:                                                                                                  ##              2016-12-26 RSB  Comment-text proofed using ProoferComments
063786,000018:                                                                                                  ##                              and corrected errors found.
063787,000019: 

Page 1468

063789,000021: 17,3777  E6,1522                                  EBANK=   NO.UJETS                              
063790,000022: 16,3642                                           BANK     16                                    
063791,000023: 16,2000                                           SETLOC   DAPS1                                 
063792,000024: 16,2000                                           BANK                                           
063793,000025: 
063794,000026: 16,3642                                           COUNT*   $$/DAP                                
063795,000027: 
063796,000028: 16,3642           34743        RATELOOP           CA       TWO                                   
063797,000029: 16,3643           55743                           TS       DAPTEMP6                              
063798,000030: 16,3644           60000                           DOUBLE                                         
063799,000031: 16,3645           54002                           TS       Q                                     
063800,000032: 16,3646           51743                           INDEX    DAPTEMP6                              
063801,000033: 16,3647           11524                           CCS      TJP                                   
063802,000034: 16,3650           13652                           TCF      +2                                    
063803,000035: 16,3651           13671                           TCF      LOOPRATE                              
063804,000036: 16,3652           63732                           AD       -100MST6                              
063805,000037: 16,3653           00006                           EXTEND                                         
063806,000038: 16,3654           63710                           BZMF     SMALLTJU                              
063807,000039: 16,3655           51743                           INDEX    DAPTEMP6                              
063808,000040: 16,3656           11524                           CCS      TJP                                   
063809,000041: 16,3657           33732                           CA       -100MST6                              
063810,000042: 16,3660           13662                           TCF      +2                                    
063811,000043: 16,3661           43732                           CS       -100MST6                              
063812,000044: 16,3662           51743                           INDEX    DAPTEMP6                              
063813,000045: 16,3663           27524                           ADS      TJP                                   
063814,000046: 16,3664           51743                           INDEX    DAPTEMP6                              
063815,000047: 16,3665           11524                           CCS      TJP                                   
063816,000048: 16,3666           43616                           CS       -100MS                                #  0.1 AT 1
063817,000049: 16,3667           13671                           TCF      +2                                    
063818,000050: 16,3670           33616                           CA       -100MS                                
063819,000051: 16,3671           00006        LOOPRATE           EXTEND                                         
063820,000052: 16,3672           51743                           INDEX    DAPTEMP6                              
063821,000053: 16,3673           71521                           MP       NO.PJETS                              
063822,000054: 16,3674           30001                           CA       L                                     
063823,000055: 16,3675           51743                           INDEX    DAPTEMP6                              
063824,000056: 16,3676           55736                           TS       DAPTEMP1                              #  SIGNED TORQUE AT 1 JET-SEC FOR FILTER
063825,000057: 16,3677           00006                           EXTEND                                         
063826,000058: 16,3700           74733                           MP       BIT10                                 #  RESCALE TO 32; ONE BIT ABOUT 2 JET-MSEC
063827,000059: 16,3701           00006                           EXTEND                                         
063828,000060: 16,3702           63733                           BZMF     NEGTORK                               
063829,000061: 16,3703           50002        STORTORK           INDEX    Q                                     #  INCREMENT DOWNLIST REGISTER.
063830,000062: 16,3704           27513                           ADS      DOWNTORK                              #   NOTE:  NOT INITIALIZED; OVERFLOWS.
063831,000063: 
063832,000064: 16,3705           11743                           CCS      DAPTEMP6                              
063833,000065: 16,3706           13643                           TCF      RATELOOP   +1                         
063834,000066: 16,3707           13717                           TCF      ROTORQUE                              
063835,000067: 16,3710           34746        SMALLTJU           CA       ZERO                                  
063836,000068: 16,3711           51743                           INDEX    DAPTEMP6                              
063837,000069: 16,3712           57524                           XCH      TJP                                   
063838,000070: 16,3713           00006                           EXTEND                                         

Page 1469

063840,000072: 16,3714           74751                           MP       ELEVEN                                #  10.24 PLUS
063841,000073: 16,3715           30001                           CA       L                                     
063842,000074: 16,3716           13671                           TCF      LOOPRATE                              
063843,000075: 16,3717           31737        ROTORQUE           CA       DAPTEMP2                              
063844,000076: 16,3720           61740                           AD       DAPTEMP3                              
063845,000077: 16,3721           00006                           EXTEND                                         
063846,000078: 16,3722           71532                           MP       1JACCR                                
063847,000079: 16,3723           55746                           TS       JETRATER                              
063848,000080: 16,3724           41740                           CS       DAPTEMP3                              
063849,000081: 16,3725           61737                           AD       DAPTEMP2                              
063850,000082: 16,3726           00006                           EXTEND                                         
063851,000083: 16,3727           71531                           MP       1JACCQ                                
063852,000084: 16,3730           55745                           TS       JETRATEQ                              
063853,000085: 16,3731           12322                           TCF      BACKP                                 
063854,000086: 16,3732           77537        -100MST6           DEC      -160       B-14                       
063855,000087: 
063856,000088: 16,3733           40000        NEGTORK            COM                                            
063857,000089: 16,3734           24002                           INCR     Q                                     
063858,000090: 16,3735           13703                           TCF      STORTORK                              
063859,000091: 

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