Source Code

These source-code files were transcribed from scans made from Don Eyles's personal copy of Luminary 069. They were scanned at archive.org's Boston facility, and the scanning was sponsored by Onno Hommes. The code was transcribed from these scans by a team of volunteers who are referenced in the program comments. Comments from the original source code are prefixed with a single '#' symbol, whereas comments added later are prefixed by "##" or "###". In some cases, where similar code blocks exist in previously-transcribed AGC programs (primarily Luminary 99, from Apollo 11) those code blocks were used as a starting point and then corrected to agree with the Luminary 69 scans. The full scans are available at the Virtual AGC project's collection at archive.org, while more-convenient reduced-size (but reduced-quality) images are available at the main Virtual AGC website. Report any errors noted by creating an issue report at the Virtual AGC project's GitHub repository. Notations on the program listing read, in part:

	GAP:  ASSEMBLE REVISION 069 OF AGC PROGRAM LUMINARY BY NASA 2021112-011
	19:02 NOV. 25,1968
Note that the date is the date of the printout, not the date of the program revision.

014701,000002:                                                                                                  ## Copyright:   Public domain.
014702,000003:                                                                                                  ## Filename:    IMU_COMPENSATION_PACKAGE.agc
014703,000004:                                                                                                  ## Purpose:     The main source file for Luminary revision 069.
014704,000005:                                                                                                  ##              It is part of the source code for the original release
014705,000006:                                                                                                  ##              of the flight software for the Lunar Module's (LM) Apollo
014706,000007:                                                                                                  ##              Guidance Computer (AGC) for Apollo 10. The actual flown
014707,000008:                                                                                                  ##              version was Luminary 69 revision 2, which included a
014708,000009:                                                                                                  ##              newer lunar gravity model and only affected module 2.
014709,000010:                                                                                                  ##              This file is intended to be a faithful transcription, except
014710,000011:                                                                                                  ##              that the code format has been changed to conform to the
014711,000012:                                                                                                  ##              requirements of the yaYUL assembler rather than the
014712,000013:                                                                                                  ##              original YUL assembler.
014713,000014:                                                                                                  ## Reference:   pp. 339-350
014714,000015:                                                                                                  ## Assembler:   yaYUL
014715,000016:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
014716,000017:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
014717,000018:                                                                                                  ## Mod history: 2016-12-13 MAS  Created from Luminary 99.
014718,000019:                                                                                                  ##              2016-12-14 MAS  Updated from comment-proofed Luminary 99 version.
014719,000020:                                                                                                  ##              2017-01-19 RRB  Updated for Luminary 69.
014720,000021:                                                                                                  ##              2017-01-25 RSB  Proofed comment text using octopus/prooferComments
014721,000022:                                                                                                  ##                              and fixed errors found.
014722,000023:                                                                                                  ##              2017-03-07 RSB  Comment-text fixes noted in proofing Luminary 116.
014723,000024: 

Page 339

014725,000026: 07,2667                                           BANK     7                                     
014726,000027: 06,2000                                           SETLOC   IMUCOMP                               
014727,000028: 06,2000                                           BANK                                           
014728,000029: 
014729,000030: 06,3263  E3,1460                                  EBANK=   NBDX                                  
014730,000031: 
014731,000032: 06,3263                                           COUNT*   $$/ICOMP                              
014732,000033: 06,3263           33531        1/PIPA             CAF      LGCOMP                                #  SAVE EBANK OF CALLING PROGRAM
014733,000034: 06,3264           56003                           XCH      EBANK                                 
014734,000035: 06,3265           54163                           TS       MODE                                  
014735,000036: 
014736,000037: 06,3266           11477                           CCS      GCOMPSW                               #  BYPASS IF GCOMPSW NEGATIVE
014737,000038: 06,3267           13272                           TCF      +3                                    
014738,000039: 06,3270           13272                           TCF      +2                                    
014739,000040: 06,3271           13353                           TCF      IRIG1                                 #  RETURN
014740,000041: 
014741,000042: 06,3272           34751        1/PIPA1            CAF      FOUR                                  #  PIPAZ, PIPAY, PIPAX
014742,000043: 06,3273           54132                           TS       BUF        +2                         
014743,000044: 
014744,000045: 06,3274           50132                           INDEX    BUF        +2                         
014745,000046: 06,3275           31453                           CA       PIPASCF                               #  (P.P.M.) X 2(-9)
014746,000047: 06,3276           00006                           EXTEND                                         
014747,000048: 06,3277           50132                           INDEX    BUF        +2                         
014748,000049: 06,3300           70324                           MP       DELVX                                 #  (PP) X 2(+14) NOW (PIPA PULSES) X 2(+5)
014749,000050: 06,3301           54002                           TS       Q                                     #  SAVE MAJOR PART
014750,000051: 
014751,000052: 06,3302           30001                           CA       L                                     #  MINOR PART
014752,000053: 06,3303           00006                           EXTEND                                         
014753,000054: 06,3304           74746                           MP       BIT6                                  #  SCALE 2(+9)   SHIFT RIGHT 9
014754,000055: 06,3305           50132                           INDEX    BUF        +2                         
014755,000056: 06,3306           54325                           TS       DELVX      +1                         #  FRACTIONAL PIPA PULSES SCALED 2(+14)
014756,000057: 
014757,000058: 06,3307           30002                           CA       Q                                     #  MAJOR PART
014758,000059: 06,3310           00006                           EXTEND                                         
014759,000060: 06,3311           74746                           MP       BIT6                                  #  SCALE 2(+9)   SHIFT RIGHT 9
014760,000061: 06,3312           50132                           INDEX    BUF        +2                         
014761,000062: 06,3313           20325                           DAS      DELVX                                 #  (PIPAI) + (PIPAI)(SFE)
014762,000063: 

Lines from here to the bottom of the page angle and start to overlap. The code until the MP BIT4 is legible. It is assumed that the illegible portions are identical to their Luminary 99 counterparts. - RRB 2017
The comments are legible, except that the last line is rather tricky, and can be verified directly. - RSB 2017

014766,000067: 06,3314           50132                           INDEX    BUF        +2                         
014767,000068: 06,3315           41452                           CS       PIPABIAS                              #  (PIPA PULSES)/(CS) X 2(-5)             *
014768,000069: 06,3316           00006                           EXTEND                                         
014769,000070: 06,3317           71075                           MP       1/PIPADT                              #  (CS) X 2(+8) NOW (PIPA PULSES) X 2(+3) *
014770,000071: 06,3320           00006                           EXTEND                                         
014771,000072: 06,3321           74750                           MP       BIT4                                  #  SCALE 2(+11) SHIFT RIGHT 11            *
014772,000073: 06,3322           50132                           INDEX    BUF        +2                         
014773,000074: 06,3323           20325                           DAS      DELVX                                 #  (PIPAI) + (PIPAI)(SFE) - (BIAS)(DELTAT)
014774,000075: 
014775,000076: 06,3324           10132                           CCS      BUF        +2                         #  PIPAZ, PIPAY, PIPAX
014776,000077: 06,3325           67746                           AD       NEG1                                  
014777,000078: 06,3326           13273                           TCF      1/PIPA1    +1                         

Page 340

014779,000080: 06,3327           13330                           NOOP                                           #  LESS THAN ZERO IMPOSSIBLE
014780,000081: 

Page 341

014782,000083: 06,3330           55477        IRIGCOMP           TS       GCOMPSW                               #  INDICATE COMMANDS 2 PULSES OR LESS.
014783,000084: 06,3331           54130                           TS       BUF                                   #  INDEX COUNTER . IRIGX, IRIGY, IRIGZ.
014784,000085: 
014785,000086: 06,3332           03356                           TC       IRIGX                                 #  COMPENSATE ACCELERATION TERMS
014786,000087: 
014787,000088: 06,3333           41460                           CS       NBDX                                  #  (GYRO PULSES)/(CS) X 2(-5)
014788,000089: 06,3334           03454                           TC       DRIFTSUB                              #  -(NBOX)(DELTAT)   (GYRO PULSES) X 2(+14)
014789,000090: 
014790,000091: 06,3335           03373                           TC       IRIGY                                 #  COMPENSATE ACCELERATION TERMS
014791,000092: 
014792,000093: 06,3336           41461                           CS       NBDY                                  #  (GYRO PULSES)/(CS) X 2(-5)
014793,000094: 06,3337           03454                           TC       DRIFTSUB                              #  -(NBDY)(DELTAT)   (GYRO PULSES) X 2(+14)
014794,000095: 
014795,000096: 06,3340           03410                           TC       IRIGZ                                 #  COMPENSATE ACCELERATION TERMS
014796,000097: 
014797,000098: 06,3341           31462                           CA       NBDZ                                  #  (GYRO PULSES)/(CS) X 2(-5)
014798,000099: 06,3342           03454                           TC       DRIFTSUB                              #  +(NBDZ)(DELTAT)   (GYRO PULSES) X 2(+14)
014799,000100: 
014800,000101: 06,3343           11477                           CCS      GCOMPSW                               #  ARE GYRO COMMANDS GREATER THAN 2 PULSES
014801,000102: 06,3344           13346                           TCF      +2                                    #  YES   SEND OUT GYRO TORQUING COMMANDS.
014802,000103: 06,3345           13353                           TCF      IRIG1                                 #  NO    RETURN
014803,000104: 
014804,000105: 06,3346           35031                           CA       PRIO21                                #  PRIO GREATER THAN SERVICER
014805,000106: 06,3347           05072                           TC       NOVAC                                 #  SEND OUT GYRO TORQUING COMMANDS.
014806,000107: 06,3350  E3,1460                                  EBANK=   NBDX                                  
014807,000108: 06,3350           03507 14063                     2CADR    1/GYRO                                
014808,000109: 
014809,000110: 06,3352           00003                           RELINT                                         
014810,000111: 06,3353           30163        IRIG1              CA       MODE                                  #  RESTORE CALLERS EBANK
014811,000112: 06,3354           54003                           TS       EBANK                                 
014812,000113: 06,3355           14631                           TCF      SWRETURN                              
014813,000114: 

Page 342

014815,000116: 06,3356           00006        IRIGX              EXTEND                                         
014816,000117: 06,3357           22156                           QXCH     MPAC       +2                         #  SAVE Q
014817,000118: 06,3360           00006                           EXTEND                                         
014818,000119: 06,3361           40325                           DCS      DELVX                                 #  (PIPA PULSES) X 2(+14)
014819,000120: 06,3362           52155                           DXCH     MPAC                                  
014820,000121: 06,3363           31463                           CA       ADIAX                                 #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)            *
014821,000122: 06,3364           03425                           TC       GCOMPSUB                              #  -(ADIAX)(PIPAX)          (GYRO PULSES) X 2(+14)
014822,000123: 
014823,000124: 06,3365           00006                           EXTEND                                         #  
014824,000125: 06,3366           40327                           DCS      DELVY                                 #        (PIPA PULSES) X 2(+14)
014825,000126: 06,3367           52155                           DXCH     MPAC                                  #  
014826,000127: 06,3370           41466                           CS       ADSRAX                                #        (GYRO PULSES)/(PIPA PULSE) X 2(-6)      *
014827,000128: 06,3371           03425                           TC       GCOMPSUB                              #        -(ADSRAX)(PIPAY)   (GYRO PULSES) X 2(+14)
014828,000129: 
014829,000130:                                                                                                  #                EXTEND                  ***
014830,000131:                                                                                                  #                DCS     DELVZ           ***     (PIPA PULSES) X 2(+14)
014831,000132:                                                                                                  #                DXCH    MPAC            ***
014832,000133:                                                                                                  #                CA      ADOAX           ***     (GYRO PULSES)/(PIPA PULSE) X 2(-6)      *
014833,000134:                                                                                                  #                TC      GCOMPSUB        ***     -(ADOAX)(PIPAZ)    (GYRO PULSES) X 2(+14)
014834,000135: 
014835,000136: 06,3372           00156                           TC       MPAC       +2                         
014836,000137: 
014837,000138: 06,3373           00006        IRIGY              EXTEND                                         
014838,000139: 06,3374           22156                           QXCH     MPAC       +2                         #  SAVE Q
014839,000140: 06,3375           00006                           EXTEND                                         
014840,000141: 06,3376           40327                           DCS      DELVY                                 #  (PIPA PULSES) X 2(+14)
014841,000142: 06,3377           52155                           DXCH     MPAC                                  
014842,000143: 06,3400           31464                           CA       ADIAY                                 #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)            *
014843,000144: 06,3401           03425                           TC       GCOMPSUB                              #  -(ADIAY)(PIPAY)          (GYRO PULSES) X 2(+14)
014844,000145: 
014845,000146: 06,3402           00006                           EXTEND                                         
014846,000147: 06,3403           40331                           DCS      DELVZ                                 #  (PIPA PULSES) X 2(+14)
014847,000148: 06,3404           52155                           DXCH     MPAC                                  
014848,000149: 06,3405           41467                           CS       ADSRAY                                #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)            *
014849,000150: 06,3406           03425                           TC       GCOMPSUB                              #  +(ADSRAY)(PIPAZ)              (GYRO PULSES) X 2(+14)
014850,000151: 
014851,000152:                                                                                                  #                EXTEND                  ***
014852,000153:                                                                                                  #                DCS     DELVX           ***     (PIPA PULSES) X 2(+14)
014853,000154:                                                                                                  #                DXCH    MPAC            ***
014854,000155:                                                                                                  #                CA      ADOAY           ***     (GYRO PULSES)/(PIPA PULSE) X 2(-6)      *
014855,000156:                                                                                                  #                TC      GCOMPSUB        ***     -(ADOAY)(PIPAX)   (GYRO PULSES) X 2(+14)
014856,000157: 
014857,000158: 06,3407           00156                           TC       MPAC       +2                         
014858,000159: 
014859,000160: 06,3410           00006        IRIGZ              EXTEND                                         
014860,000161: 06,3411           22156                           QXCH     MPAC       +2                         #  SAVE Q
014861,000162: 06,3412           00006                           EXTEND                                         
014862,000163: 06,3413           40327                           DCS      DELVY                                 #  (PIPA PULSES) X 2(+14)
014863,000164: 06,3414           52155                           DXCH     MPAC                                  
014864,000165: 06,3415           31470                           CA       ADSRAZ                                #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)            *

Page 343

014866,000167: 06,3416           03425                           TC       GCOMPSUB                              #  -(ADSRAZ)(PIPAY)        (GYRO PULSES) X 2(+14)
014867,000168: 
014868,000169: 06,3417           00006                           EXTEND                                         
014869,000170: 06,3420           40331                           DCS      DELVZ                                 #  (PIPA PULSES) X 2(+14)
014870,000171: 06,3421           52155                           DXCH     MPAC                                  
014871,000172: 06,3422           31465                           CA       ADIAZ                                 #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)            *
014872,000173: 06,3423           03425                           TC       GCOMPSUB                              #  -(ADIAZ)(PIPAZ)          (GYRO PULSES) X 2(+14)
014873,000174: 
014874,000175:                                                                                                  #                EXTEND                  ***
014875,000176:                                                                                                  #                DCS     DELVX           ***     (PIPA PULSE) X 2(+14)
014876,000177:                                                                                                  #                DXCH    MPAC            ***
014877,000178:                                                                                                  #                CS      ADOAZ           ***     (GYRO PULSES)/(PIPA PULSE) X 2(-6)      *
014878,000179:                                                                                                  #                TC      GCOMPSUB        ***     +(ADOAZ)(PIPAX)    (GYRO PULSES) X 2(+14)
014879,000180: 
014880,000181: 06,3424           00156                           TC       MPAC       +2                         
014881,000182: 

Page 344

014883,000184: 06,3425           56154        GCOMPSUB           XCH      MPAC                                  #  ADIA OR ADSRA COEFFICIENT ARRIVES IN A
014884,000185: 06,3426           00006                           EXTEND                                         #  C(MPAC) = (PIPA PULSES) X 2(+14)
014885,000186: 06,3427           70154                           MP       MPAC                                  #  (GYRO PULSES)/(PIPA PULSE) X 2(-6)            *
014886,000187: 06,3430           52123                           DXCH     VBUF                                  #  NOW = (GYRO PULSES) X 2(+8)                   *
014887,000188: 
014888,000189: 06,3431           30155                           CA       MPAC       +1                         #  MINOR PART PIPA PULSES
014889,000190: 06,3432           00006                           EXTEND                                         
014890,000191: 06,3433           70154                           MP       MPAC                                  #  ADIA OR ADSRA
014891,000192: 06,3434           54001                           TS       L                                     
014892,000193: 06,3435           34755                           CAF      ZERO                                  
014893,000194: 06,3436           20123                           DAS      VBUF                                  #  NOW = (GYRO PULSES) X 2(+8)                   *
014894,000195: 
014895,000196: 06,3437           30122                           CA       VBUF                                  #  PARTIAL RESULT - MAJOR
014896,000197: 06,3440           00006                           EXTEND                                         
014897,000198: 06,3441           74743                           MP       BIT9                                  #  SCALE 2(+6)   SHIFT RIGHT 6                   *
014898,000199: 06,3442           50130                           INDEX    BUF                                   #  RESULT = (GYRO PULSES) X 2(+14)
014899,000200: 06,3443           21472                           DAS      GCOMP                                 #  HI(ADIA)(PIPAI) OR HI(ADSRA)(PIPAI)
014900,000201: 
014901,000202: 06,3444           30123                           CA       VBUF       +1                         #  PARTIAL RESULT - MINOR
014902,000203: 06,3445           00006                           EXTEND                                         
014903,000204: 06,3446           74743                           MP       BIT9                                  #  SCALE 2(+6)   SHIFT RIGHT 6                   *
014904,000205: 06,3447           54001                           TS       L                                     
014905,000206: 06,3450           34755                           CAF      ZERO                                  
014906,000207: 06,3451           50130                           INDEX    BUF                                   #  RESULT = (GYRO PULSES) X 2(+14)
014907,000208: 06,3452           21472                           DAS      GCOMP                                 #  (ADIA)(PIPAI) OR (ADSRA)(PIPAI)
014908,000209: 
014909,000210: 06,3453           00002                           TC       Q                                     
014910,000211: 

Page 345

014912,000213: 06,3454           00006        DRIFTSUB           EXTEND                                         
014913,000214: 06,3455           22131                           QXCH     BUF        +1                         
014914,000215: 
014915,000216: 06,3456           00006                           EXTEND                                         #  C(A) = NBD    (GYRO PULSES)/(CS) X 2(-5)
014916,000217: 06,3457           71075                           MP       1/PIPADT                              #  (CS) X 2(+8)  NOW (GYRO PULSES) X 2(+3)
014917,000218: 06,3460           22155                           LXCH     MPAC       +1                         #  SAVE FOR FRACTIONAL COMPENSATION
014918,000219: 06,3461           00006                           EXTEND                                         
014919,000220: 06,3462           74750                           MP       BIT4                                  #  SCALE 2(+11)  SHIFT RIGHT 11
014920,000221: 06,3463           50130                           INDEX    BUF                                   
014921,000222: 06,3464           21472                           DAS      GCOMP                                 #  HI(NBD)(DELTAT)       (GYRO PULSES) X 2(+14)
014922,000223: 
014923,000224: 06,3465           30155                           CA       MPAC       +1                         #  NOW MINOR PART
014924,000225: 06,3466           00006                           EXTEND                                         
014925,000226: 06,3467           74750                           MP       BIT4                                  #  SCALE 2(+11)          SHIFT RIGHT 11
014926,000227: 06,3470           54001                           TS       L                                     
014927,000228: 06,3471           34755                           CAF      ZERO                                  
014928,000229: 06,3472           50130                           INDEX    BUF                                   #  ADD IN FRACTIONAL COMPENSATION
014929,000230: 06,3473           21472                           DAS      GCOMP                                 #  (NBD)(DELTAT)         (GYRO PULSES) X 2(+14)
014930,000231: 
014931,000232: 06,3474           34752        DRFTSUB2           CAF      TWO                                   #  PIPAX, PIPAY, PIPAZ
014932,000233: 06,3475           60130                           AD       BUF                                   
014933,000234: 06,3476           56130                           XCH      BUF                                   
014934,000235: 06,3477           50000                           INDEX    A                                     
014935,000236: 06,3500           11471                           CCS      GCOMP                                 #  ARE GYRO COMMANDS 1 PULSE OR GREATER
014936,000237: 06,3501           13503                           TCF      +2                                    #  YES
014937,000238: 06,3502           00131                           TC       BUF        +1                         #  NO
014938,000239: 
014939,000240: 06,3503           73553                           MASK     COMPCHK                               #  DEC -1
014940,000241: 06,3504           10000                           CCS      A                                     #  ARE GYRO COMMANDS GREATER THAN 2 PULSES
014941,000242: 06,3505           55477                           TS       GCOMPSW                               #  YES - SET GCOMPSW POSITIVE
014942,000243: 06,3506           00131                           TC       BUF        +1                         #  NO
014943,000244: 

Page 346

014945,000246: 06,3507           34751        1/GYRO             CAF      FOUR                                  #  PIPAZ, PIPAY, PIPAX
014946,000247: 06,3510           54130                           TS       BUF                                   
014947,000248: 
014948,000249: 06,3511           50130                           INDEX    BUF                                   #  SCALE GYRO COMMANDS FOR IMUPULSE
014949,000250: 06,3512           31472                           CA       GCOMP      +1                         #  FRACTIONAL PULSES
014950,000251: 06,3513           00006                           EXTEND                                         
014951,000252: 06,3514           74744                           MP       BIT8                                  #  SHIFT RIGHT 7
014952,000253: 06,3515           50130                           INDEX    BUF                                   
014953,000254: 06,3516           55472                           TS       GCOMP      +1                         #  FRACTIONAL PULSES SCALED
014954,000255: 
014955,000256: 06,3517           34755                           CAF      ZERO                                  #  SET GCOMP = 0 FOR DAS INSTRUCTION
014956,000257: 06,3520           50130                           INDEX    BUF                                   
014957,000258: 06,3521           57471                           XCH      GCOMP                                 #  GYRO PULSES
014958,000259: 06,3522           00006                           EXTEND                                         
014959,000260: 06,3523           74744                           MP       BIT8                                  #  SHIFT RIGHT 7
014960,000261: 06,3524           50130                           INDEX    BUF                                   
014961,000262: 06,3525           21472                           DAS      GCOMP                                 #  ADD THESE TO FRACTIONAL PULSES ABOVE
014962,000263: 
014963,000264: 06,3526           10130                           CCS      BUF                                   #  PIPAZ, PIPAY, PIPAX
014964,000265: 06,3527           67746                           AD       NEG1                                  
014965,000266: 06,3530           13510                           TCF      1/GYRO     +1                         
014966,000267: 06,3531           01471        LGCOMP             ECADR    GCOMP                                 #  LESS THAN ZERO IMPOSSIBLE
014967,000268: 
014968,000269: 06,3532           33531                           CAF      LGCOMP                                
014969,000270: 06,3533           04616                           TC       BANKCALL                              
014970,000271: 06,3534           17276                           CADR     IMUPULSE                              #  CALL GYRO TORQUING ROUTINE
014971,000272: 06,3535           04616                           TC       BANKCALL                              
014972,000273: 06,3536           17671                           CADR     IMUSTALL                              #  WAIT FOR PULSES TO GET OUT
014973,000274: 06,3537           15155                           TCF      ENDOFJOB                              #  TEMPORARY
014974,000275: 
014975,000276: 06,3540           34751        GCOMP1             CAF      FOUR                                  #  PIPAZ, PIPAY, PIPAX
014976,000277: 06,3541           54130                           TS       BUF                                   
014977,000278: 
014978,000279: 06,3542           50130                           INDEX    BUF                                   #  RESCALE
014979,000280: 06,3543           31472                           CA       GCOMP      +1                         
014980,000281: 06,3544           00006                           EXTEND                                         
014981,000282: 06,3545           74744                           MP       BIT8                                  #  SHIFT MINOR PART LEFT 7 - MAJOR PART = 0
014982,000283: 06,3546           50130                           INDEX    BUF                                   
014983,000284: 06,3547           23472                           LXCH     GCOMP      +1                         #  BITS 8-14 OF MINOR PART WERE = 0
014984,000285: 
014985,000286: 06,3550           10130                           CCS      BUF                                   #  PIPAZ, PIPAY, PIPAX
014986,000287: 06,3551           67746                           AD       NEG1                                  
014987,000288: 06,3552           13541                           TCF      GCOMP1     +1                         
014988,000289: 06,3553           77776        COMPCHK            DEC      -1         B-14                       #  LESS THAN ZERO IMPOSSIBLE
014989,000290: 06,3554           15155                           TCF      ENDOFJOB                              
014990,000291: 

Page 347

014992,000293: 06,3555           11477        NBDONLY            CCS      GCOMPSW                               #  BYPASS IF GCOMPSW NEGATIVE
014993,000294: 06,3556           13561                           TCF      +3                                    
014994,000295: 06,3557           13561                           TCF      +2                                    
014995,000296: 06,3560           15155                           TCF      ENDOFJOB                              
014996,000297: 
014997,000298: 06,3561           00004                           INHINT                                         
014998,000299: 06,3562           10076                           CCS      FLAGWRD2                              #  PREREAD T3RUPT MAY COINCIDE
014999,000300: 06,3563           15155                           TCF      ENDOFJOB                              
015000,000301: 06,3564           15155                           TCF      ENDOFJOB                              
015001,000302: 06,3565           13566                           TCF      +1                                    
015002,000303: 
015003,000304: 06,3566           30104                           CA       FLAGWRD8                              #  IF SURFACE FLAG IS SET, SET TEM1
015004,000305: 06,3567           74744                           MASK     BIT8                                  #  POSITIVE SO THAT THE ACCELERATION TERMS
015005,000306: 06,3570           54141                           TS       TEM1                                  #  WILL BE COMPENSATED.
015006,000307: 06,3571           00006                           EXTEND                                         
015007,000308: 06,3572           13575                           BZF      +3                                    #  ARE WE ON THE SURFACE
015008,000309: 
015009,000310: 06,3573           04674                           TC       IBNKCALL                              #  ON THE SURFACE
015010,000311: 06,3574           77533                           CADR     PIPASR     +3                         #  READ PIPAS, BUT DO NOT SCALE THEM
015011,000312: 
015012,000313: 06,3575           30025                           CA       TIME1                                 #  (CS) X 2(+14)
015013,000314: 06,3576           57075                           XCH      1/PIPADT                              #  PREVIOUS TIME
015014,000315: 06,3577           00003                           RELINT                                         
015015,000316: 06,3600           40000                           COM                                            
015016,000317: 06,3601           61075                           AD       1/PIPADT                              #  PRESENT TIME - PREVIOUS TIME
015017,000318: 06,3602           64736        NBD2               AD       HALF                                  #  CORRECT FOR POSSIBLE TIME1 TICK
015018,000319: 06,3603           64736                           AD       HALF                                  
015019,000320: 06,3604           56001                           XCH      L                                     #  IF TIME1 DID NOT TICK, REMOVE RESULTING
015020,000321: 06,3605           56001                           XCH      L                                     #  OVERFLOW.
015021,000322: 
015022,000323: 06,3606           00006        NBD3               EXTEND                                         #  C(A) = DELTAT         (CS) X 2(+14)
015023,000324: 06,3607           74742                           MP       BIT10                                 #  SHIFT RIGHT 5
015024,000325: 06,3610           52125                           DXCH     VBUF       +2                         
015025,000326: 
015026,000327: 06,3611           34755                           CA       ZERO                                  
015027,000328: 06,3612           55477                           TS       GCOMPSW                               #  INDICATE COMMANDS 2 PULSES OR LESS.
015028,000329: 06,3613           54130                           TS       BUF                                   #  INDEX  X, Y, Z.
015029,000330: 
015030,000331: 06,3614           10141                           CCS      TEM1                                  #  IF SURFACE FLAG IS SET,
015031,000332: 06,3615           03356                           TC       IRIGX                                 #  COMPENSATE ACCELERATION TERMS.
015032,000333: 
015033,000334: 06,3616           00006                           EXTEND                                         
015034,000335: 06,3617           30125                           DCA      VBUF       +2                         
015035,000336: 06,3620           52155                           DXCH     MPAC                                  #  DELTAT NOW SCALED (CS) X 2(+19)
015036,000337: 
015037,000338: 06,3621           41460                           CS       NBDX                                  #  (GYRO PULSES)/(CS) X 2(-5)
015038,000339: 06,3622           03644                           TC       FBIASSUB                              #  -(NBOX)(DELTAT)       (GYRO PULSES) X 2(+14)
015039,000340: 
015040,000341: 06,3623           10141                           CCS      TEM1                                  #  IF SURFACE FLAG IS SET,
015041,000342: 06,3624           03373                           TC       IRIGY                                 #  COMPENSATE ACCELERATION TERMS.

Page 348

015043,000344: 06,3625           00006                           EXTEND                                         
015044,000345: 06,3626           40125                           DCS      VBUF       +2                         
015045,000346: 06,3627           52155                           DXCH     MPAC                                  #  DELTAT SCALED (CS) X 2(+19)
015046,000347: 06,3630           31461                           CA       NBDY                                  #  (GYRO PULSES)/(CS) X 2(-5)
015047,000348: 06,3631           03644                           TC       FBIASSUB                              #  -(NBDY)(DELTAT)       (GYRO PULSES) X 2(+14)
015048,000349: 
015049,000350: 06,3632           10141                           CCS      TEM1                                  #  IF SURFACE FLAG IS SET,
015050,000351: 06,3633           03410                           TC       IRIGZ                                 #  COMPENSATE ACCELERATION TERMS
015051,000352: 
015052,000353: 06,3634           00006                           EXTEND                                         
015053,000354: 06,3635           40125                           DCS      VBUF       +2                         
015054,000355: 06,3636           52155                           DXCH     MPAC                                  #  DELTAT SCALED (CS) X 2(+19)
015055,000356: 06,3637           41462                           CS       NBDZ                                  #  (GYRO PULSES)/(CS) X 2(-5)
015056,000357: 06,3640           03644                           TC       FBIASSUB                              #  +(NBDZ)(DELTAT)       (GYRO PULSES) X 2(+14)
015057,000358: 
015058,000359: 06,3641           11477                           CCS      GCOMPSW                               #  ARE GYRO COMMANDS GREATER THAN 2 PULSES
015059,000360: 06,3642           13507                           TCF      1/GYRO                                #  YES
015060,000361: 06,3643           15155                           TCF      ENDOFJOB                              #  NO
015061,000362: 

Page 349

015063,000364: 06,3644           56002        FBIASSUB           XCH      Q                                     
015064,000365: 06,3645           54131                           TS       BUF        +1                         
015065,000366: 
015066,000367: 06,3646           30002                           CA       Q                                     #  NBD SCALED (GYRO PULSES)/(CS) X 2(-5)
015067,000368: 06,3647           00006                           EXTEND                                         
015068,000369: 06,3650           70154                           MP       MPAC                                  #  DELTAT SCALED (CS) X 2(+19)
015069,000370: 06,3651           50130                           INDEX    BUF                                   
015070,000371: 06,3652           21472                           DAS      GCOMP                                 #  HI(NBD)(DELTAT)       (GYRO PULSES) X 2(+14)
015071,000372: 
015072,000373: 06,3653           30002                           CA       Q                                     #  NOW FRACTIONAL PART
015073,000374: 06,3654           00006                           EXTEND                                         
015074,000375: 06,3655           70155                           MP       MPAC       +1                         
015075,000376: 06,3656           54001                           TS       L                                     
015076,000377: 06,3657           34755                           CAF      ZERO                                  
015077,000378: 06,3660           50130                           INDEX    BUF                                   
015078,000379: 06,3661           21472                           DAS      GCOMP                                 #  (NBD)(DELTAT)         (GYRO PULSES) X 2(+14)
015079,000380: 
015080,000381: 06,3662           13474                           TCF      DRFTSUB2                              #  CHECK MAGNITUDE OF COMPENSATION
015081,000382: 
015082,000383: 06,3663           04616        LASTBIAS           TC       BANKCALL                              
015083,000384: 06,3664           17252                           CADR     PIPUSE1                               
015084,000385: 
015085,000386: 06,3665           11477                           CCS      GCOMPSW                               
015086,000387: 06,3666           13671                           TCF      +3                                    
015087,000388: 06,3667           13671                           TCF      +2                                    
015088,000389: 06,3670           15155                           TCF      ENDOFJOB                              
015089,000390: 
015090,000391: 06,3671           30104                           CA       FLAGWRD8                              #  IF SURFACE FLAG IS SET, SET TEM1
015091,000392: 06,3672           74744                           MASK     SURFFBIT                              #  POSITIVE SO THAT THE ACCELERATION TERMS
015092,000393: 06,3673           54141                           TS       TEM1                                  #  WILL BE COMPENSATED.
015093,000394: 
015094,000395: 06,3674           37715                           CAF      PRIO31                                #  2 SECONDS SCALED (CS) X 2(+8)
015095,000396: 06,3675           57075                           XCH      1/PIPADT                              
015096,000397: 06,3676           40000                           COM                                            
015097,000398: 06,3677           61235                           AD       PIPTIME    +1                         
015098,000399: 06,3700           13602                           TCF      NBD2                                  
015099,000400: 
015100,000401: 06,3701           33531        GCOMPZER           CAF      LGCOMP                                #  ROUTINE TO ZERO GCOMP BEFORE FIRST
015101,000402: 06,3702           56003                           XCH      EBANK                                 #  CALL TO 1/PIPA
015102,000403: 06,3703           54163                           TS       MODE                                  
015103,000404: 
015104,000405: 06,3704           34755                           CAF      ZERO                                  
015105,000406: 06,3705           55477                           TS       GCOMPSW                               
015106,000407: 06,3706           55471                           TS       GCOMP                                 
015107,000408: 06,3707           55472                           TS       GCOMP      +1                         
015108,000409: 06,3710           55473                           TS       GCOMP      +2                         
015109,000410: 06,3711           55474                           TS       GCOMP      +3                         
015110,000411: 06,3712           55475                           TS       GCOMP      +4                         

Page 350

015112,000413: 06,3713           55476                           TS       GCOMP      +5                         
015113,000414: 
015114,000415: 06,3714           13353                           TCF      IRIG1                                 #  RESTORE EBANK AND RETURN
015115,000416: 

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