Source Code

This source code is very close to the Apollo Guidance Computer software for the Apollo 13 Lunar module. This revision of the Luminary 131 program is from December of 1969, whereas there was a later revision in January of 1970, and still another revision in February, which is the code that flew on the mission. As far as this transcription is concerned, it was originally from a copy made in 1991 of a printout from the collection of AGC developer Don Eyles for collector David Craig. It was subsequently scanned by Gary Neff, reprocessed for online presentation at the now-discontinued History of Recent Science and Technology (HRST) website of MIT's Dibner Institute (the full-quality scans being discarded in the process), and finally transcribed by Ron Burkey for the Virtual AGC Project. Although a high-quality replacement scan for a completely illegible page was later provided by Gary Neff, the reduced legibility of the reprocessed HRST posting nevertheless caused many errors to be introduced into the transcription. Accordingly, a second scan of the same physical printout was made in 2017 for the Virtual AGC Project's collection at the Internet Archive, and used to correct the transcription errors. All of the scanned materials mentioned, as well as other Luminary 131 related material, are available online. Don Eyles apprently made additional hand-written notes in printout between 1991 and 2017, so the two scans are not identical in that respect. The page-headings in the printout read, in part:
	GAP:  ASSEMBLE REVISION 131 OF AGC PROGRAM LUMINARY BY NASA 2021112-091
	17:53 DEC. 19, 1969
Note that the date is the date the printout was made, not the date on which the program revision was released, although these happen to be very close together.

062096,000002:                                                                                                  ## Copyright:   Public domain.
062097,000003:                                                                                                  ## Filename:    KALMAN_FILTER.agc
062098,000004:                                                                                                  ## Purpose:     A section of Luminary 1C, revision 131.
062099,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
062100,000006:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 13.
062101,000007:                                                                                                  ##              This file is intended to be a faithful transcription, except
062102,000008:                                                                                                  ##              that the code format has been changed to conform to the
062103,000009:                                                                                                  ##              requirements of the yaYUL assembler rather than the
062104,000010:                                                                                                  ##              original YUL assembler.
062105,000011:                                                                                                  ## Reference:   pp. 1462-1463
062106,000012:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
062107,000013:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
062108,000014:                                                                                                  ## Mod history: 06/08/03 RSB.   Began transcribing.
062109,000015:                                                                                                  ##              05/14/05 RSB    Corrected website reference above
062110,000016:                                                                                                  ##              2017-01-06 RSB  Page numbers now agree with those on the
062111,000017:                                                                                                  ##                              original hardcopy, as opposed to the PDF page
062112,000018:                                                                                                  ##                              numbers in 1701.pdf.
062113,000019:                                                                                                  ##              2017-02-28 RSB  Proofed comment text using octopus/ProoferComments.
062114,000020: 

Page 1462

062116,000022: 17,3777  E6,1522                                  EBANK=   NO.UJETS                              
062117,000023: 16,3645                                           BANK     16                                    
062118,000024: 16,2000                                           SETLOC   DAPS1                                 
062119,000025: 16,2000                                           BANK                                           
062120,000026: 
062121,000027: 16,3645                                           COUNT*   $$/DAP                                
062122,000028: 
062123,000029: 16,3645           34752        RATELOOP           CA       TWO                                   
062124,000030: 16,3646           55743                           TS       DAPTEMP6                              
062125,000031: 16,3647           60000                           DOUBLE                                         
062126,000032: 16,3650           54002                           TS       Q                                     
062127,000033: 16,3651           51743                           INDEX    DAPTEMP6                              
062128,000034: 16,3652           11524                           CCS      TJP                                   
062129,000035: 16,3653           13655                           TCF      +2                                    
062130,000036: 16,3654           13674                           TCF      LOOPRATE                              
062131,000037: 16,3655           63735                           AD       -100MST6                              
062132,000038: 16,3656           00006                           EXTEND                                         
062133,000039: 16,3657           63713                           BZMF     SMALLTJU                              
062134,000040: 16,3660           51743                           INDEX    DAPTEMP6                              
062135,000041: 16,3661           11524                           CCS      TJP                                   
062136,000042: 16,3662           33735                           CA       -100MST6                              
062137,000043: 16,3663           13665                           TCF      +2                                    
062138,000044: 16,3664           43735                           CS       -100MST6                              
062139,000045: 16,3665           51743                           INDEX    DAPTEMP6                              
062140,000046: 16,3666           27524                           ADS      TJP                                   
062141,000047: 16,3667           51743                           INDEX    DAPTEMP6                              
062142,000048: 16,3670           11524                           CCS      TJP                                   
062143,000049: 16,3671           43621                           CS       -100MS                                #  0.1 AT 1
062144,000050: 16,3672           13674                           TCF      +2                                    
062145,000051: 16,3673           33621                           CA       -100MS                                
062146,000052: 16,3674           00006        LOOPRATE           EXTEND                                         
062147,000053: 16,3675           51743                           INDEX    DAPTEMP6                              
062148,000054: 16,3676           71521                           MP       NO.PJETS                              
062149,000055: 16,3677           30001                           CA       L                                     
062150,000056: 16,3700           51743                           INDEX    DAPTEMP6                              
062151,000057: 16,3701           55736                           TS       DAPTEMP1                              #  SIGNED TORQUE AT 1 JET-SEC FOR FILTER
062152,000058: 16,3702           00006                           EXTEND                                         
062153,000059: 16,3703           74742                           MP       BIT10                                 #  RESCALE TO 32; ONE BIT ABOUT 2 JET-MSEC
062154,000060: 16,3704           00006                           EXTEND                                         
062155,000061: 16,3705           63736                           BZMF     NEGTORK                               
062156,000062: 16,3706           50002        STORTORK           INDEX    Q                                     #  INCREMENT DOWNLIST REGISTER.
062157,000063: 16,3707           27513                           ADS      DOWNTORK                              #        NOTE:  NOT INITIALIZED; OVERFLOWS.
062158,000064: 
062159,000065: 16,3710           11743                           CCS      DAPTEMP6                              
062160,000066: 16,3711           13646                           TCF      RATELOOP   +1                         
062161,000067: 16,3712           13722                           TCF      ROTORQUE                              
062162,000068: 16,3713           34755        SMALLTJU           CA       ZERO                                  
062163,000069: 16,3714           51743                           INDEX    DAPTEMP6                              
062164,000070: 16,3715           57524                           XCH      TJP                                   
062165,000071: 16,3716           00006                           EXTEND                                         

Page 1463

062167,000073: 16,3717           74760                           MP       ELEVEN                                #  10.24 PLUS
062168,000074: 16,3720           30001                           CA       L                                     
062169,000075: 16,3721           13674                           TCF      LOOPRATE                              
062170,000076: 16,3722           31737        ROTORQUE           CA       DAPTEMP2                              
062171,000077: 16,3723           61740                           AD       DAPTEMP3                              
062172,000078: 16,3724           00006                           EXTEND                                         
062173,000079: 16,3725           71532                           MP       1JACCR                                
062174,000080: 16,3726           55746                           TS       JETRATER                              
062175,000081: 16,3727           41740                           CS       DAPTEMP3                              
062176,000082: 16,3730           61737                           AD       DAPTEMP2                              
062177,000083: 16,3731           00006                           EXTEND                                         
062178,000084: 16,3732           71531                           MP       1JACCQ                                
062179,000085: 16,3733           55745                           TS       JETRATEQ                              
062180,000086: 16,3734           12316                           TCF      BACKP                                 
062181,000087: 16,3735           77537        -100MST6           DEC      -160       B-14                       
062182,000088: 
062183,000089: 16,3736           40000        NEGTORK            COM                                            
062184,000090: 16,3737           24002                           INCR     Q                                     
062185,000091: 16,3740           13706                           TCF      STORTORK                              
062186,000092: 
062187,000093: 

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