Source Code

These source-code files are part of a reconstructed copy of Luminary 178, the final release of the Apollo 14 Lunar Module (LM) Apollo Guidance Computer (AGC) software.

The reconstruction began with source code of Zerlina 56, Luminary 210, and Luminary 131, previously transcribed from digitized copies of those programs. The code was created by combining the three, using Zerlina 56 as a base, since it was based off of Luminary 183. The differences between the three were carefully merged using the Luminary memos as a guide, with all changes made after Luminary 178 being backed out. The reconstruction was verified by matching memory-bank checksums to those listed in drawing 2021152N. Note that page numbers in the reconstructed code match those for the baseline log section mentioned in each file's changelog; the page numbers for a real Luminary 178 listing would be different.

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.

014168,000002:                                                                                                  ## Copyright:   Public domain.
014169,000003:                                                                                                  ## Filename:    IMU_COMPENSATION_PACKAGE.agc
014170,000004:                                                                                                  ## Purpose:     A section of Luminary revision 178.
014171,000005:                                                                                                  ##              It is part of the reconstructed source code for the final
014172,000006:                                                                                                  ##              release of the flight software for the Lunar Module's
014173,000007:                                                                                                  ##              (LM) Apollo Guidance Computer (AGC) for Apollo 14. The
014174,000008:                                                                                                  ##              code has been recreated from copies of Zerlina 56, Luminary
014175,000009:                                                                                                  ##              210, and Luminary 131, as well as many Luminary memos.
014176,000010:                                                                                                  ##              It has been adapted such that the resulting bugger words
014177,000011:                                                                                                  ##              exactly match those specified for Luminary 178 in NASA
014178,000012:                                                                                                  ##              drawing 2021152N, which gives relatively high confidence
014179,000013:                                                                                                  ##              that the reconstruction is correct.
014180,000014:                                                                                                  ## Reference:   pp. 331-342
014181,000015:                                                                                                  ## Assembler:   yaYUL
014182,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
014183,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
014184,000018:                                                                                                  ## Mod history: 2019-08-14 MAS  Created from Zerlina 56.
014185,000019:                                                                                                  ##              2019-09-03 MAS  Removed Zerlina-specific scaling changes.
014186,000020: 

Page 331

014188,000022: 07,2661                                           BANK     7                                     
014189,000023: 06,2000                                           SETLOC   IMUCOMP                               
014190,000024: 06,2000                                           BANK                                           
014191,000025: 
014192,000026: 06,3271  E3,1460                                  EBANK=   NBDX                                  
014193,000027: 
014194,000028: 06,3271                                           COUNT*   $$/ICOMP                              
014195,000029: 06,3271           33537        1/PIPA             CAF      LGCOMP                                #  SAVE EBANK OF CALLING PROGRAM
014196,000030: 06,3272           56003                           XCH      EBANK                                 
014197,000031: 06,3273           54163                           TS       MODE                                  
014198,000032: 
014199,000033: 06,3274           11477                           CCS      GCOMPSW                               #  BYPASS IF GCOMPSW NEGATIVE
014200,000034: 06,3275           13300                           TCF      +3                                    
014201,000035: 06,3276           13300                           TCF      +2                                    
014202,000036: 06,3277           13361                           TCF      IRIG1                                 #  RETURN
014203,000037: 
014204,000038: 06,3300           34751        1/PIPA1            CAF      FOUR                                  #  PIPAZ, PIPAY, PIPAX
014205,000039: 06,3301           54132                           TS       BUF        +2                         
014206,000040: 
014207,000041: 06,3302           50132                           INDEX    BUF        +2                         
014208,000042: 06,3303           31453                           CA       PIPASCF                               #  (P.P.M.) X 2(-9)
014209,000043: 06,3304           00006                           EXTEND                                         
014210,000044: 06,3305           50132                           INDEX    BUF        +2                         
014211,000045: 06,3306           70324                           MP       DELVX                                 #  (PP) X 2(+14) NOW (PIPA PULSES) X 2(+5)
014212,000046: 06,3307           54002                           TS       Q                                     #  SAVE MAJOR PART
014213,000047: 
014214,000048: 06,3310           30001                           CA       L                                     #  MINOR PART
014215,000049: 06,3311           00006                           EXTEND                                         
014216,000050: 06,3312           74746                           MP       BIT6                                  #  SCALE 2(+9)   SHIFT RIGHT 9
014217,000051: 06,3313           50132                           INDEX    BUF        +2                         
014218,000052: 06,3314           54325                           TS       DELVX      +1                         #  FRACTIONAL PIPA PULSES SCALED 2(+14)
014219,000053: 
014220,000054: 06,3315           30002                           CA       Q                                     #  MAJOR PART
014221,000055: 06,3316           00006                           EXTEND                                         
014222,000056: 06,3317           74746                           MP       BIT6                                  #  SCALE 2(+9)   SHIFT RIGHT 9
014223,000057: 06,3320           50132                           INDEX    BUF        +2                         
014224,000058: 06,3321           20325                           DAS      DELVX                                 #  (PIPAI) + (PIPAI)(SFE)
014225,000059: 
014226,000060: 06,3322           50132                           INDEX    BUF        +2                         
014227,000061: 06,3323           41452                           CS       PIPABIAS                              #  (PIPA PULSES)/(CS) X 2(-3)            *
014228,000062: 06,3324           00006                           EXTEND                                         
014229,000063: 06,3325           71074                           MP       1/PIPADT                              #  (CS) X 2(+8) NOW (PIPA PULSES) X 2(+5)*
014230,000064: 06,3326           00006                           EXTEND                                         
014231,000065: 06,3327           74746                           MP       BIT6                                  #  SCALE 2(+9) SHIFT RIGHT 9             *
014232,000066: 06,3330           50132                           INDEX    BUF        +2                         
014233,000067: 06,3331           20325                           DAS      DELVX                                 #  (PIPAI) + (PIPAI)(SFE) - (BIAS)(DELTAT)
014234,000068: 
014235,000069: 06,3332           10132                           CCS      BUF        +2                         #  PIPAZ, PIPAY, PIPAX
014236,000070: 06,3333           67752                           AD       NEG1                                  
014237,000071: 06,3334           13301                           TCF      1/PIPA1    +1                         
014238,000072: 

Page 332

014240,000074: 06,3335           13336                           NOOP                                           #  LESS THAN ZERO IMPOSSIBLE
014241,000075: 

Page 333

014243,000077: 06,3336           55477        IRIGCOMP           TS       GCOMPSW                               #  INDICATE COMMANDS 2 PULSES OR LESS.
014244,000078: 06,3337           54130                           TS       BUF                                   #  INDEX COUNTER . IRIGX, IRIGY, IRIGZ.
014245,000079: 
014246,000080: 06,3340           03364                           TC       IRIGX                                 #  COMPENSATE ACCELERATION TERMS
014247,000081: 
014248,000082: 06,3341           41460                           CS       NBDX                                  #  (GYRO PULSES)/(CS) X 2(-5)
014249,000083: 06,3342           03462                           TC       DRIFTSUB                              #  -(NBOX)(DELTAT)   (GYRO PULSES) X 2(+14)
014250,000084: 
014251,000085: 06,3343           03401                           TC       IRIGY                                 #  COMPENSATE ACCELERATION TERMS
014252,000086: 
014253,000087: 06,3344           41461                           CS       NBDY                                  #  (GYRO PULSES)/(CS) X 2(-5)
014254,000088: 06,3345           03462                           TC       DRIFTSUB                              #  -(NBDY)(DELTAT)   (GYRO PULSES) X 2(+14)
014255,000089: 
014256,000090: 06,3346           03416                           TC       IRIGZ                                 #  COMPENSATE ACCELERATION TERMS
014257,000091: 
014258,000092: 06,3347           31462                           CA       NBDZ                                  #  (GYRO PULSES)/(CS) X 2(-5)
014259,000093: 06,3350           03462                           TC       DRIFTSUB                              #  +(NBDZ)(DELTAT)   (GYRO PULSES) X 2(+14)
014260,000094: 
014261,000095: 06,3351           11477                           CCS      GCOMPSW                               #  ARE GYRO COMMANDS GREATER THAN 2 PULSES
014262,000096: 06,3352           13354                           TCF      +2                                    #  YES  SEND OUT GYRO TORQUING COMMANDS.
014263,000097: 06,3353           13361                           TCF      IRIG1                                 #  NO   RETURN
014264,000098: 
014265,000099: 06,3354           35031                           CA       PRIO21                                #  PRIO GREATER THAN SERVICER
014266,000100: 06,3355           05072                           TC       NOVAC                                 #  SEND OUT GYRO TORQUING COMMANDS.
014267,000101: 06,3356  E3,1460                                  EBANK=   NBDX                                  
014268,000102: 06,3356           03515 14063                     2CADR    1/GYRO                                
014269,000103: 
014270,000104: 06,3360           00003                           RELINT                                         
014271,000105: 06,3361           30163        IRIG1              CA       MODE                                  #  RESTORE CALLERS EBANK
014272,000106: 06,3362           54003                           TS       EBANK                                 
014273,000107: 06,3363           14631                           TCF      SWRETURN                              
014274,000108: 

Page 334

014276,000110: 06,3364           00006        IRIGX              EXTEND                                         
014277,000111: 06,3365           22156                           QXCH     MPAC       +2                         #  SAVE Q
014278,000112: 06,3366           00006                           EXTEND                                         
014279,000113: 06,3367           40325                           DCS      DELVX                                 #  (PIPA PULSES) X 2(+14)
014280,000114: 06,3370           52155                           DXCH     MPAC                                  
014281,000115: 06,3371           31463                           CA       ADIAX                                 #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)     *
014282,000116: 06,3372           03433                           TC       GCOMPSUB                              #  -(ADIAX)(PIPAX)   (GYRO PULSES) X 2(+14)
014283,000117: 
014284,000118: 06,3373           00006                           EXTEND                                         
014285,000119: 06,3374           40327                           DCS      DELVY                                 #  (PIPA PULSES) X 2(+14)
014286,000120: 06,3375           52155                           DXCH     MPAC                                  
014287,000121: 06,3376           41466                           CS       ADSRAX                                #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)     *
014288,000122: 06,3377           03433                           TC       GCOMPSUB                              #  -(ADSRAX)(PIPAY)  (GYRO PULSES) X 2(+14)
014289,000123: 
014290,000124:                                                                                                  #                EXTEND                             ***
014291,000125:                                                                                                  #                DCS             DELVZ              ***    (PIPA PULSES) X 2(+14)
014292,000126:                                                                                                  #                DXCH            MPAC               ***
014293,000127:                                                                                                  #                CA              ADOAX              ***    (GYRO PULSES)/(PIPA PULSE) X 2(-6)     *
014294,000128:                                                                                                  #                TC              GCOMPSUB           ***    -(ADOAX)(PIPAZ)   (GYRO PULSES) X 2(+14)
014295,000129: 
014296,000130: 06,3400           00156                           TC       MPAC       +2                         
014297,000131: 
014298,000132: 06,3401           00006        IRIGY              EXTEND                                         
014299,000133: 06,3402           22156                           QXCH     MPAC       +2                         #  SAVE Q
014300,000134: 06,3403           00006                           EXTEND                                         
014301,000135: 06,3404           40327                           DCS      DELVY                                 #  (PIPA PULSES) X 2(+14)
014302,000136: 06,3405           52155                           DXCH     MPAC                                  
014303,000137: 06,3406           31464                           CA       ADIAY                                 #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)    *
014304,000138: 06,3407           03433                           TC       GCOMPSUB                              #  -(ADIAY)(PIPAY)   (GYRO PULSES) X 2(+14)
014305,000139: 
014306,000140: 06,3410           00006                           EXTEND                                         
014307,000141: 06,3411           40331                           DCS      DELVZ                                 #  (PIPA PULSES) X 2(+14)
014308,000142: 06,3412           52155                           DXCH     MPAC                                  
014309,000143: 06,3413           41467                           CS       ADSRAY                                #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)     *
014310,000144: 06,3414           03433                           TC       GCOMPSUB                              #  +(ADSRAY)(PIPAZ)  (GYRO PULSES) X 2(+14)
014311,000145: 
014312,000146:                                                                                                  #                EXTEND                              ***
014313,000147:                                                                                                  #                DCS             DELVX               ***   (PIPA PULSES) X 2(+14)
014314,000148:                                                                                                  #                DXCH            MPAC                ***
014315,000149:                                                                                                  #                CA              ADOAY               ***   (GYRO PULSES)/(PIPA PULSE) X 2(-6)     *
014316,000150:                                                                                                  #                TC              GCOMPSUB            ***   -(ADOAY)(PIPAX)   (GYRO PULSES) X 2(+14)
014317,000151: 
014318,000152: 06,3415           00156                           TC       MPAC       +2                         
014319,000153: 
014320,000154: 06,3416           00006        IRIGZ              EXTEND                                         
014321,000155: 06,3417           22156                           QXCH     MPAC       +2                         #  SAVE Q
014322,000156: 06,3420           00006                           EXTEND                                         
014323,000157: 06,3421           40327                           DCS      DELVY                                 #  (PIPA PULSES) X 2(+14)
014324,000158: 06,3422           52155                           DXCH     MPAC                                  
014325,000159: 06,3423           31470                           CA       ADSRAZ                                #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)    *
014326,000160: 

Page 335

014328,000162: 06,3424           03433                           TC       GCOMPSUB                              #  -(ADSRAZ)(PIPAY)  (GYRO PULSES) X 2(+14)
014329,000163: 
014330,000164: 06,3425           00006                           EXTEND                                         
014331,000165: 06,3426           40331                           DCS      DELVZ                                 #  (PIPA PULSES) X 2(+14)
014332,000166: 06,3427           52155                           DXCH     MPAC                                  
014333,000167: 06,3430           31465                           CA       ADIAZ                                 #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)     *
014334,000168: 06,3431           03433                           TC       GCOMPSUB                              #  -(ADIAZ)(PIPAZ)   (GYRO PULSES) X 2(+14)
014335,000169: 
014336,000170:                                                                                                  #                EXTEND                              ***
014337,000171:                                                                                                  #                DCS             DELVX               ***   (PIPA PULSE) X 2(+14)
014338,000172:                                                                                                  #                DXCH            MPAC                ***
014339,000173:                                                                                                  #                CS              ADOAZ               ***   (GYRO PULSES)/(PIPA PULSE) X 2(-6)     *
014340,000174:                                                                                                  #                TC              GCOMPSUB            ***   +(ADOAZ)(PIPAX)   (GYRO PULSES) X 2(+14)
014341,000175: 
014342,000176: 06,3432           00156                           TC       MPAC       +2                         
014343,000177: 

Page 336

014345,000179: 06,3433           56154        GCOMPSUB           XCH      MPAC                                  #  ADIA OR ADSRA COEFFICIENT ARRIVES IN A
014346,000180: 06,3434           00006                           EXTEND                                         #  C(MPAC) = (PIPA PULSES) X 2(+14)
014347,000181: 06,3435           70154                           MP       MPAC                                  #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)      *
014348,000182: 06,3436           52123                           DXCH     VBUF                                  #  NOW = (GYRO PULSES) X 2(+8)             *
014349,000183: 
014350,000184: 06,3437           30155                           CA       MPAC       +1                         #  MINOR PART PIPA PULSES
014351,000185: 06,3440           00006                           EXTEND                                         
014352,000186: 06,3441           70154                           MP       MPAC                                  #  ADIA OR ADSRA
014353,000187: 06,3442           54001                           TS       L                                     
014354,000188: 06,3443           34755                           CAF      ZERO                                  
014355,000189: 06,3444           20123                           DAS      VBUF                                  #  NOW = (GYRO PULSES) X 2(+8)             *
014356,000190: 
014357,000191: 06,3445           30122                           CA       VBUF                                  #  PARTIAL RESULT - MAJOR
014358,000192: 06,3446           00006                           EXTEND                                         
014359,000193: 06,3447           74743                           MP       BIT9                                  #  SCALE 2(+6)      SHIFT RIGHT 6          *
014360,000194: 06,3450           50130                           INDEX    BUF                                   #  RESULT = (GYRO PULSES) X 2(+14)
014361,000195: 06,3451           21472                           DAS      GCOMP                                 #  HI(ADIA)(PIPAI)  OR  HI(ADSRA)(PIPAI)
014362,000196: 
014363,000197: 06,3452           30123                           CA       VBUF       +1                         #  PARTIAL RESULT - MINOR
014364,000198: 06,3453           00006                           EXTEND                                         
014365,000199: 06,3454           74743                           MP       BIT9                                  #  SCALE 2(+6)      SHIFT RIGHT 6          *
014366,000200: 06,3455           54001                           TS       L                                     
014367,000201: 06,3456           34755                           CAF      ZERO                                  
014368,000202: 06,3457           50130                           INDEX    BUF                                   #  RESULT = (GYRO PULSES) X 2(+14)
014369,000203: 06,3460           21472                           DAS      GCOMP                                 #  (ADIA)(PIPAI)  OR  (ADSRA)(PIPAI)
014370,000204: 
014371,000205: 06,3461           00002                           TC       Q                                     
014372,000206: 

Page 337

014374,000208: 06,3462           00006        DRIFTSUB           EXTEND                                         
014375,000209: 06,3463           22131                           QXCH     BUF        +1                         
014376,000210: 
014377,000211: 06,3464           00006                           EXTEND                                         #  C(A) = NBD    (GYRO PULSES)/(CS) X 2(-5)
014378,000212: 06,3465           71074                           MP       1/PIPADT                              #  (CS) X 2(+8)   NOW (GYRO PULSES) X 2(+3)
014379,000213: 06,3466           22155                           LXCH     MPAC       +1                         #  SAVE FOR FRACTIONAL COMPENSATION
014380,000214: 06,3467           00006                           EXTEND                                         
014381,000215: 06,3470           74750                           MP       BIT4                                  #  SCALE 2(+11)     SHIFT RIGHT 11
014382,000216: 06,3471           50130                           INDEX    BUF                                   
014383,000217: 06,3472           21472                           DAS      GCOMP                                 #  HI(NBD)(DELTAT)   (GYRO PULSES) X 2(+14)
014384,000218: 
014385,000219: 06,3473           30155                           CA       MPAC       +1                         #  NOW MINOR PART
014386,000220: 06,3474           00006                           EXTEND                                         
014387,000221: 06,3475           74750                           MP       BIT4                                  #  SCALE 2(+11)     SHIFT RIGHT 11
014388,000222: 06,3476           54001                           TS       L                                     
014389,000223: 06,3477           34755                           CAF      ZERO                                  
014390,000224: 06,3500           50130                           INDEX    BUF                                   #  ADD IN FRACTIONAL COMPENSATION
014391,000225: 06,3501           21472                           DAS      GCOMP                                 #  (NBD)(DELTAT)     (GYRO PULSES) X 2(+14)
014392,000226: 
014393,000227: 06,3502           34752        DRFTSUB2           CAF      TWO                                   #  PIPAX, PIPAY, PIPAZ
014394,000228: 06,3503           60130                           AD       BUF                                   
014395,000229: 06,3504           56130                           XCH      BUF                                   
014396,000230: 06,3505           50000                           INDEX    A                                     
014397,000231: 06,3506           11471                           CCS      GCOMP                                 #  ARE GYRO COMMANDS 1 PULSE OR GREATER
014398,000232: 06,3507           13511                           TCF      +2                                    #  YES
014399,000233: 06,3510           00131                           TC       BUF        +1                         #  NO
014400,000234: 
014401,000235: 06,3511           73561                           MASK     COMPCHK                               #  DEC -1
014402,000236: 06,3512           10000                           CCS      A                                     #  ARE GYRO COMMANDS GREATER THAN 2 PULSES
014403,000237: 06,3513           55477                           TS       GCOMPSW                               #  YES - SET GCOMPSW POSITIVE
014404,000238: 06,3514           00131                           TC       BUF        +1                         #  NO
014405,000239: 

Page 338

014407,000241: 06,3515           34751        1/GYRO             CAF      FOUR                                  #  PIPAZ, PIPAY, PIPAX
014408,000242: 06,3516           54130                           TS       BUF                                   
014409,000243: 
014410,000244: 06,3517           50130                           INDEX    BUF                                   #  SCALE GYRO COMMANDS FOR IMUPULSE
014411,000245: 06,3520           31472                           CA       GCOMP      +1                         #  FRACTIONAL PULSES
014412,000246: 06,3521           00006                           EXTEND                                         
014413,000247: 06,3522           74744                           MP       BIT8                                  #  SHIFT RIGHT 7
014414,000248: 06,3523           50130                           INDEX    BUF                                   
014415,000249: 06,3524           55472                           TS       GCOMP      +1                         #  FRACTIONAL PULSES SCALED
014416,000250: 
014417,000251: 06,3525           34755                           CAF      ZERO                                  #  SET GCOMP = 0 FOR DAS INSTRUCTION
014418,000252: 06,3526           50130                           INDEX    BUF                                   
014419,000253: 06,3527           57471                           XCH      GCOMP                                 #  GYRO PULSES
014420,000254: 06,3530           00006                           EXTEND                                         
014421,000255: 06,3531           74744                           MP       BIT8                                  #  SHIFT RIGHT 7
014422,000256: 06,3532           50130                           INDEX    BUF                                   
014423,000257: 06,3533           21472                           DAS      GCOMP                                 #  ADD THESE TO FRACTIONAL PULSES ABOVE
014424,000258: 
014425,000259: 06,3534           10130                           CCS      BUF                                   #  PIPAZ, PIPAY, PIPAX
014426,000260: 06,3535           67752                           AD       NEG1                                  
014427,000261: 06,3536           13516                           TCF      1/GYRO     +1                         
014428,000262: 06,3537           01471        LGCOMP             ECADR    GCOMP                                 #  LESS THAN ZERO IMPOSSIBLE
014429,000263: 
014430,000264: 06,3540           33537                           CAF      LGCOMP                                
014431,000265: 06,3541           04616                           TC       BANKCALL                              
014432,000266: 06,3542           17307                           CADR     IMUPULSE                              #  CALL GYRO TORQUING ROUTINE
014433,000267: 06,3543           04616                           TC       BANKCALL                              
014434,000268: 06,3544           17722                           CADR     IMUSTALL                              #  WAIT FOR PULSES TO GET OUT
014435,000269: 06,3545           15155                           TCF      ENDOFJOB                              #  TEMPORARY
014436,000270: 
014437,000271: 06,3546           34751        GCOMP1             CAF      FOUR                                  #  PIPAZ, PIPAY, PIPAX
014438,000272: 06,3547           54130                           TS       BUF                                   
014439,000273: 
014440,000274: 06,3550           50130                           INDEX    BUF                                   #  RESCALE
014441,000275: 06,3551           31472                           CA       GCOMP      +1                         
014442,000276: 06,3552           00006                           EXTEND                                         
014443,000277: 06,3553           74744                           MP       BIT8                                  #  SHIFT MINOR PART LEFT 7 - MAJOR PART = 0
014444,000278: 06,3554           50130                           INDEX    BUF                                   
014445,000279: 06,3555           23472                           LXCH     GCOMP      +1                         #  BITS 8-14 OF MINOR PART WERE = 0
014446,000280: 
014447,000281: 06,3556           10130                           CCS      BUF                                   #  PIPAZ, PIPAY, PIPAX
014448,000282: 06,3557           67752                           AD       NEG1                                  
014449,000283: 06,3560           13547                           TCF      GCOMP1     +1                         
014450,000284: 06,3561           77776        COMPCHK            DEC      -1         B-14                       #  LESS THAN ZERO IMPOSSIBLE
014451,000285: 06,3562           15155                           TCF      ENDOFJOB                              
014452,000286: 

Page 339

014454,000288: 06,3563           11477        NBDONLY            CCS      GCOMPSW                               #  BYPASS IF GCOMPSW NEGATIVE
014455,000289: 06,3564           13567                           TCF      +3                                    
014456,000290: 06,3565           13567                           TCF      +2                                    
014457,000291: 06,3566           15155                           TCF      ENDOFJOB                              
014458,000292: 
014459,000293: 06,3567           00004                           INHINT                                         
014460,000294: 06,3570           10076                           CCS      FLAGWRD2                              #  PREREAD T3RUPT MAY COINCIDE
014461,000295: 06,3571           15155                           TCF      ENDOFJOB                              
014462,000296: 06,3572           15155                           TCF      ENDOFJOB                              
014463,000297: 06,3573           13574                           TCF      +1                                    
014464,000298: 
014465,000299: 06,3574           30104                           CA       FLAGWRD8                              #  IF SURFACE FLAG IS SET, SET TEM1
014466,000300: 06,3575           74744                           MASK     BIT8                                  #  POSITIVE SO THAT THE ACCELERATION TERMS
014467,000301: 06,3576           54141                           TS       TEM1                                  #  WILL BE COMPENSATED.
014468,000302: 06,3577           00006                           EXTEND                                         
014469,000303: 06,3600           13603                           BZF      +3                                    #  ARE WE ON THE SURFACE
014470,000304: 
014471,000305: 06,3601           04674                           TC       IBNKCALL                              #  ON THE SURFACE
014472,000306: 06,3602           77543                           CADR     PIPASR     +3                         #  READ PIPAS, BUT DO NOT SCALE THEM
014473,000307: 
014474,000308: 06,3603           30025                           CA       TIME1                                 #  (CS) X 2(+14)
014475,000309: 06,3604           57074                           XCH      1/PIPADT                              #  PREVIOUS TIME
014476,000310: 06,3605           00003                           RELINT                                         
014477,000311: 06,3606           40000                           COM                                            
014478,000312: 06,3607           61074                           AD       1/PIPADT                              #  PRESENT TIME - PREVIOUS TIME
014479,000313: 06,3610           64736        NBD2               AD       HALF                                  #  CORRECT FOR POSSIBLE TIME1 TICK
014480,000314: 06,3611           64736                           AD       HALF                                  
014481,000315: 06,3612           56001                           XCH      L                                     #  IF TIME1 DID NOT TICK, REMOVE RESULTING
014482,000316: 06,3613           56001                           XCH      L                                     #  OVERFLOW.
014483,000317: 
014484,000318: 06,3614           00006        NBD3               EXTEND                                         #  C(A) = DELTAT    (CS) X 2(+14)
014485,000319: 06,3615           74742                           MP       BIT10                                 #  SHIFT RIGHT 5
014486,000320: 06,3616           52125                           DXCH     VBUF       +2                         
014487,000321: 
014488,000322: 06,3617           34755                           CA       ZERO                                  
014489,000323: 06,3620           55477                           TS       GCOMPSW                               #  INDICATE COMMANDS 2 PULSES OR LESS.
014490,000324: 06,3621           54130                           TS       BUF                                   #  INDEX  X, Y, Z.
014491,000325: 
014492,000326: 06,3622           10141                           CCS      TEM1                                  #  IF SURFACE FLAG IS SET,
014493,000327: 06,3623           03364                           TC       IRIGX                                 #  COMPENSATE ACCELERATION TERMS.
014494,000328: 
014495,000329: 06,3624           00006                           EXTEND                                         
014496,000330: 06,3625           30125                           DCA      VBUF       +2                         
014497,000331: 06,3626           52155                           DXCH     MPAC                                  #  DELTAT NOW SCALED (CS) X 2(+19)
014498,000332: 
014499,000333: 06,3627           41460                           CS       NBDX                                  #  (GYRO PULSES)/(CS) X 2(-5)
014500,000334: 06,3630           03652                           TC       FBIASSUB                              #  -(NBOX)(DELTAT)   (GYRO PULSES) X 2(+14)
014501,000335: 
014502,000336: 06,3631           10141                           CCS      TEM1                                  #  IF SURFACE FLAG IS SET,
014503,000337: 06,3632           03401                           TC       IRIGY                                 #  COMPENSATE ACCELERATION TERMS.
014504,000338: 

Page 340

014506,000340: 06,3633           00006                           EXTEND                                         
014507,000341: 06,3634           40125                           DCS      VBUF       +2                         
014508,000342: 06,3635           52155                           DXCH     MPAC                                  #  DELTAT SCALED (CS) X 2(+19)
014509,000343: 06,3636           31461                           CA       NBDY                                  #  (GYRO PULSES)/(CS) X 2(-5)
014510,000344: 06,3637           03652                           TC       FBIASSUB                              #  -(NBDY)(DELTAT)   (GYRO PULSES) X 2(+14)
014511,000345: 
014512,000346: 06,3640           10141                           CCS      TEM1                                  #  IF SURFACE FLAG IS SET,
014513,000347: 06,3641           03416                           TC       IRIGZ                                 #  COMPENSATE ACCELERATION TERMS
014514,000348: 
014515,000349: 06,3642           00006                           EXTEND                                         
014516,000350: 06,3643           40125                           DCS      VBUF       +2                         
014517,000351: 06,3644           52155                           DXCH     MPAC                                  #  DELTAT SCALED (CS) X 2(+19)
014518,000352: 06,3645           41462                           CS       NBDZ                                  #  (GYRO PULSES)/(CS) X 2(-5)
014519,000353: 06,3646           03652                           TC       FBIASSUB                              #  +(NBDZ)(DELTAT)   (GYRO PULSES) X 2(+14)
014520,000354: 
014521,000355: 06,3647           11477                           CCS      GCOMPSW                               #  ARE GYRO COMMANDS GREATER THAN 2 PULSES
014522,000356: 06,3650           13515                           TCF      1/GYRO                                #  YES
014523,000357: 06,3651           15155                           TCF      ENDOFJOB                              #  NO
014524,000358: 

Page 341

014526,000360: 06,3652           56002        FBIASSUB           XCH      Q                                     
014527,000361: 06,3653           54131                           TS       BUF        +1                         
014528,000362: 
014529,000363: 06,3654           30002                           CA       Q                                     #  NBD SCALED (GYRO PULSES)/(CS) X 2(-5)
014530,000364: 06,3655           00006                           EXTEND                                         
014531,000365: 06,3656           70154                           MP       MPAC                                  #  DELTAT SCALED (CS) X 2(+19)
014532,000366: 06,3657           50130                           INDEX    BUF                                   
014533,000367: 06,3660           21472                           DAS      GCOMP                                 #  HI(NBD)(DELTAT)   (GYRO PULSES) X 2(+14)
014534,000368: 
014535,000369: 06,3661           30002                           CA       Q                                     #  NOW FRACTIONAL PART
014536,000370: 06,3662           00006                           EXTEND                                         
014537,000371: 06,3663           70155                           MP       MPAC       +1                         
014538,000372: 06,3664           54001                           TS       L                                     
014539,000373: 06,3665           34755                           CAF      ZERO                                  
014540,000374: 06,3666           50130                           INDEX    BUF                                   
014541,000375: 06,3667           21472                           DAS      GCOMP                                 #  (NBD)(DELTAT)     (GYRO PULSES) X 2(+14)
014542,000376: 
014543,000377: 06,3670           13502                           TCF      DRFTSUB2                              #  CHECK MAGNITUDE OF COMPENSATION
014544,000378: 
014545,000379: 06,3671           04616        LASTBIAS           TC       BANKCALL                              
014546,000380: 06,3672           17263                           CADR     PIPUSE1                               
014547,000381: 
014548,000382: 06,3673           11477                           CCS      GCOMPSW                               
014549,000383: 06,3674           13677                           TCF      +3                                    
014550,000384: 06,3675           13677                           TCF      +2                                    
014551,000385: 06,3676           15155                           TCF      ENDOFJOB                              
014552,000386: 
014553,000387: 06,3677           30104                           CA       FLAGWRD8                              #  IF SURFACE FLAG IS SET, SET TEM1
014554,000388: 06,3700           74744                           MASK     SURFFBIT                              #  POSITIVE SO THAT THE ACCELERATION TERMS
014555,000389: 06,3701           54141                           TS       TEM1                                  #  WILL BE COMPENSATED.
014556,000390: 
014557,000391: 06,3702           37721                           CAF      PRIO31                                #  2 SECONDS SCALED (CS) X 2(+8)
014558,000392: 06,3703           57074                           XCH      1/PIPADT                              
014559,000393: 06,3704           40000                           COM                                            
014560,000394: 06,3705           61234                           AD       PIPTIME    +1                         
014561,000395: 06,3706           13610                           TCF      NBD2                                  
014562,000396: 
014563,000397: 06,3707           33537        GCOMPZER           CAF      LGCOMP                                #  ROUTINE TO ZERO GCOMP BEFORE FIRST
014564,000398: 06,3710           56003                           XCH      EBANK                                 #  CALL TO 1/PIPA
014565,000399: 06,3711           54163                           TS       MODE                                  
014566,000400: 
014567,000401: 06,3712           34755                           CAF      ZERO                                  
014568,000402: 06,3713           55477                           TS       GCOMPSW                               
014569,000403: 06,3714           55471                           TS       GCOMP                                 
014570,000404: 06,3715           55472                           TS       GCOMP      +1                         
014571,000405: 06,3716           55473                           TS       GCOMP      +2                         
014572,000406: 06,3717           55474                           TS       GCOMP      +3                         
014573,000407: 06,3720           55475                           TS       GCOMP      +4                         
014574,000408: 

Page 342

014576,000410: 06,3721           55476                           TS       GCOMP      +5                         
014577,000411: 
014578,000412: 06,3722           13361                           TCF      IRIG1                                 #  RESTORE EBANK AND RETURN
014579,000413: 

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