Source Code

These source-code files are part of a reconstructed copy of Comanche 51, the initial release (though not the final mission release) of the Apollo 11 Command Module (CM) Apollo Guidance Computer (AGC) software. The flown, final release was Comanche 55. The reconstruction is believed to be exactly accurate, but in the absence of an actual Apollo-era listing of Comanche 51, some explanation of the reconstruction process is needed to insure confidence in that accuracy.

The starting point was the source code of Comanche 55, whose original source code is available. Comanche 55 source code was then modified by undoing changes known to have been made between revisions 51 and 55. The most-significant steps involved reverting changes related to the R-2 lunar potential model, the details of which were known from the previous, separate, independent reconstruction of the Apollo 10 Lunar Module software Luminary 69/2. The now-reconstructed Comanche 51 source code was verified by assembling it and checking that the assembled code had the expected known-correct memory-bank checksums. Note that page numbers in the reconstructed code match those on the Comanche 55 or Luminary 69 printouts, although the source code would likely have different page numbers in a contemporary Comanche 51 listing.

Annotations that were not present in the contemporary source code have been added to the reconstructed code to justify each change relative to Comanche 55. Here's a guide to some of the Apollo documentation relevant to those annotations:
Among documentation not actually referenced in the annotations, there is a short writeup about the reconstruction process in our software repository that may be helpful in understanding it from a different perspective. There's also a handy table that lists what the number of memory-words should be for each routine in Comanche 51, which could make a nice double-check; however, we've not performed that double-check ourselves.

Comments expected to have been present in 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.

058370,000002:                                                                                                  ## Copyright:   Public domain.
058371,000003:                                                                                                  ## Filename:    TIME_OF_FREE_FALL.agc
058372,000004:                                                                                                  ## Purpose:     A section of Comanche revision 051.
058373,000005:                                                                                                  ##              It is part of the reconstructed source code for the
058374,000006:                                                                                                  ##              original release of the flight software for the Command
058375,000007:                                                                                                  ##              Module's (CM) Apollo Guidance Computer (AGC) for Apollo 11.
058376,000008:                                                                                                  ##              The code has been recreated from a copy of Comanche 055. It
058377,000009:                                                                                                  ##              has been adapted such that the resulting bugger words
058378,000010:                                                                                                  ##              exactly match those specified for Comanche 51 in NASA drawing
058379,000011:                                                                                                  ##              2021153D, which gives relatively high confidence that the
058380,000012:                                                                                                  ##              reconstruction is correct.
058381,000013:                                                                                                  ## Reference:   pp. 1373-1388
058382,000014:                                                                                                  ## Assembler:   yaYUL
058383,000015:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
058384,000016:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
058385,000017:                                                                                                  ## Mod history: 2019-07-30 MAS  Created from Comanche 55.
058386,000018: 

Page 1373

058388,000020:                                                                                                  #  THE TFF SUBROUTINES MAY BE USED IN EITHER EARTH OR MOON CENTERED COORDINATES.  THE TFF ROUTINES NEVER
058389,000021:                                                                                                  #  KNOW WHICH ORIGIN APPLIES.  IT IS THE USER WHO KNOWS, AND WHO SUPPLIES RONE, VONE AND 1/SQRT(MU) AT THE
058390,000022:                                                                                                  #  APPROPRIATE SCALE LEVEL FOR THE PROPER PRIMARY BODY.
058391,000023: 
058392,000024:                                                                                                  #        EARTH ORIGIN    POSITION        -29     METERS
058393,000025:                                                                                                  #                        VELOCITY        -7      METERS/CENTISECOND
058394,000026:                                                                                                  #                        1/SQRT(MU)      +17     SQRT(CS SQ/METERS CUBED)
058395,000027: 
058396,000028:                                                                                                  #        MOON ORIGIN     POSITION        -27     METERS
058397,000029:                                                                                                  #                        VELOCITY        -5      METERS/CENTISECONDS
058398,000030:                                                                                                  #                        1/SQRT(MU)      +14     SQRT(CS SQ/METERS CUBED)
058399,000031: 
058400,000032:                                                                                                  #  ALL DATA PROVIDED TO AND RECEIVED FROM ANY TFF SUBROUTINE WILL BE AT ONE OF THE LEVELS ABOVE.  IN ALL CASES,
058401,000033:                                                                                                  #  THE FREE FALL TIME IS RETURNED IN CENTISECONDS AT (-28).  PROGRAM TFF/CONIC WILL GENERATE VONE/RTMU AND
058402,000034:                                                                                                  #  LEAVE IT IN VONE' AT (+10) IF EARTH ORIGIN AND (+9) IF MOON ORIGIN.
058403,000035: 
058404,000036:                                                                                                  #  THE USER MUST STORE THE STATE VECTOR IN RONE, VONE  AND MU IN THE FORM 1/SQRT(MU) IN TFF/RTMU
058405,000037:                                                                                                  #  AT THE PROPER SCALE BEFORE CALLING TFF/CONIC.  SINCE RONE, VONE ARE IN THE EXTENDED VERB STORAGE AREA,
058406,000038:                                                                                                  #  THE USER MUST ALSO LOCK OUT THE EXTENDED VERBS, AND RELEASE THEM WHEN FINISHED.
058407,000039: 
058408,000040:                                                                                                  #  PROGRAMS CALC/TFF AND CALC/TPER ASSUME THAT THE TERMINAL RADIUS IS LESS THAN THE PRESENT
058409,000041:                                                                                                  #  RADIUS.  THIS RESTRICTION CAN BE REMOVED BY A 15 W CODING CHANGE, BUT AT PRESENT IT IS NOT DEEMED NECESSARY.
058410,000042: 
058411,000043:                                                                                                  #  THE FOLLOWING ERASABLE QUANTITIES ARE USED BY THE TFF ROUTINES, AND ARE LOCATED IN THE PUSH LIST.
058412,000044: 
058413,000045:                                                                                                  #                                        BELOW   E:  IS USED FOR EARTH ORIGIN SCALE
058414,000046:                                                                                                  #                                                M:  IS USED FOR MOON  ORIGIN SCALE
058415,000047: 
058416,000048:                                                                                                  # TFFSW          =       119D            BIT1    0 = CALCTFF             1 = CALCTPER
058417,000049: 23,3772                        TFFDELQ            =        10D                                   #        Q2-Q1                   E: (-16)  M: (-15)
058418,000050: 23,3772                        RMAG1              =        12D                                   #        ABVAL(RN)  M            E: (-29)  M: (-27)
058419,000051:                                                                                                  # RPER           =       14D             PERIGEE RADIUS  M       E: (-29)  M: (-27)
058420,000052: 23,3772                        TFFQ1              =        14D                                   #        R.V / SQRT(MUE)         E: (-16)  M: (-15)
058421,000053:                                                                                                  # SDELF/2                                SIN(THETA) /2
058422,000054: 23,3772                        CDELF/2            =        14D                                   #        COS(THETA) /2
058423,000055:                                                                                                  # RAPO           =       16D             APOGEE RADIUS  M        E: (-29)  M: (-27)
058424,000056: 23,3772                        NRTERM             =        16D                                   #        TERMINAL RADIUS  M      E: (-29+NR)
058425,000057:                                                                                                  #                                          M: (-27+NR)
058426,000058: 23,3772                        RTERM              =        18D                                   #        TERMINAL RADIUS  M      E: (-29)  M: (-27)
058427,000059: 23,3772                        TFFVSQ             =        20D                                   #        -(V SQUARED/MU)  1/M    E: (20)   M: (18)
058428,000060: 23,3772                        TFF1/ALF           =        22D                                   #        SEMI MAJ AXIS  M        E: (-22-2 NA)
058429,000061:                                                                                                  #                                          M: (-20-2 NA)
058430,000062: 23,3772                        TFFRTALF           =        24D                                   #        SQRT(ALFA)              E:(10+NA) M: (9+NA)
058431,000063: 23,3772                        TFFALFA            =        26D                                   #        ALFA  1/M               E:(26-NR) M: (24-NR)
058432,000064: 23,3772                        TFFNP              =        28D                                   #        SEMI LATUS RECTUM  M    E: (-38+2 NR)
058433,000065:                                                                                                  #                                          M: (-36+2 NR)
058434,000066: 23,3772                        TFF/RTMU           =        30D                                   #        1/SQRT(MU)              E: (17)   M: (14)
058435,000067: 23,3772                        NRMAG              =        32D                                   #        PRESENT RADIUS  M       E: (-29+NR)
058436,000068:                                                                                                  #                                          M: (-27+NR)
058437,000069: 23,3772                        TFFX               =        34D                                   
058438,000070: 23,3772                        TFFTEM             =        36D                                   #        TEMPORARY

Page 1374

058440,000072:                                                                                                  #                REGISTERS S1, S2 ARE UNTOUCHED BY ANY TFF SUBROUTINE
058441,000073:                                                                                                  #                INDEX REGISTERS X1, X2 ARE USED BY ALL TFF SUBROUTINES.  THEY ARE ESTAB-
058442,000074:                                                                                                  #                LISHED IN TFF/CONIC AND MUST BE PRESERVED BETWEEN CALLS TO SUBSEQUENT
058443,000075:                                                                                                  #                SUBROUTINES.
058444,000076:                                                                                                  #                -NR                             C(X1) = NORM COUNT OF RMAG
058445,000077:                                                                                                  #                -NA                             C(X2) = NORM COUNT OF SQRT(ABS(ALFA))
058446,000078: 

Page 1375

058448,000080:                                                                                                  #  SUBROUTINE NAME:  TFFCONIC                    DATE:  01.29.67
058449,000081:                                                                                                  #  MOD NO:  0                                    LOG SECTION:  TIME OF FREE FALL
058450,000082:                                                                                                  #  MOD BY:  RR BAIRNSFATHER
058451,000083:                                                                                                  #  MOD NO:  1    MOD BY:  RR BAIRNSFATHER        DATE: 11 APR 67
058452,000084:                                                                                                  #  MOD NO:  2    MOD BY:  RR BAIRNSFATHER        DATE: 21 NOV 67         ADD MOON MU.
058453,000085:                                                                                                  #  MOD NO:  3    MOD BY:  RR BAIRNSFATHER        DATE: 21 MAR 68         ACCEPT DIFFERENT EARTH/MOON SCALES
058454,000086: 
058455,000087:                                                                                                  #  FUNCTIONAL DESCRIPTION:  THIS SUBROUTINE IS CALLED TO COMPUTE THOSE CONIC PARAMETERS REQUIRED BY THE TFF
058456,000088:                                                                                                  #        SUBROUTINES AND TO ESTABLISH THEM IN THE PUSH LIST AREA.  THE PARAMETERS ARE LISTED UNDER OUTPUT.
058457,000089:                                                                                                  #        THE EQUATIONS ARE
058458,000090:                                                                                                  #                -   -  -
058459,000091:                                                                                                  #                H = RN*VN                       ANGULAR MOMENTUM
058460,000092:                                                                                                  #                      - -
058461,000093:                                                                                                  #                LCP = H.H / MU                  SEMI LATUS RECTUM
058462,000094:                                                                                                  #                              -  -
058463,000095:                                                                                                  #                ALFA = 2/RN - VN.VN / MU        RECIPROCAL SEMI MAJ AXIS, SIGNED
058464,000096: 
058465,000097:                                                                                                  #        AND ALFA IS POS FOR ELLIPTIC ORBITS
058466,000098:                                                                                                  #                      0 FOR PARABOLIC ORBITS
058467,000099:                                                                                                  #                    NEG FOR HYPERBOLIC ORBITS.
058468,000100:                                                                                                  #        SUBROUTINE ALSO COMPUTES AND SAVES RMAG.
058469,000101: 
058470,000102:                                                                                                  #  CALLING SEQUENCE:
058471,000103:                                                                                                  #        TFFCONIC EXPECTS CALLER TO ENTER WITH CORRECT GRAVITATIONAL CONSTANT IN MPAC, IN THE FORM
058472,000104:                                                                                                  #        1/SQRT(MU).  PROGRAM WILL SAVE IN TFF/RTMU.  THE SCALE IS DETERMINED BY WHETHER EARTH OR MOON
058473,000105:                                                                                                  #        ORIGIN IS USED.  THE CALLER MUST LOCK OUT THE EXTENDED VERBS BEFORE PROVIDING STATE VECTOR IN RONE,
058474,000106:                                                                                                  #        VONE AT PROPER SCALE.  THE EXTENDED VERBS MUST BE RESTORED WHEN THE CALLER IS FINISHED USING THE
058475,000107:                                                                                                  #        TFF ROUTINES.
058476,000108: 
058477,000109:                                                                                                  #        ENTRY POINT TFFCONMU EXPECTS THAT TFF/RTMU IS ALREADY LOADED.
058478,000110: 
058479,000111:                                                                                                  #        TO SPECIFY MU:  DLOAD   CALL            IF MU ALREADY STORED:           CALL
058480,000112:                                                                                                  #                                YOURMU          1/RTMU E:(17) M:(14)                    TFFCONMU
058481,000113:                                                                                                  #                                TFFCONIC
058482,000114:                                                                                                  #        PUSHLOC = PDL+0, ARBITRARY IF LEQ 18D
058483,000115: 
058484,000116:                                                                                                  #  SUBROUTINES CALLED:  NONE
058485,000117: 
058486,000118:                                                                                                  #  NORMAL EXIT MODES:  RVQ
058487,000119: 
058488,000120:                                                                                                  #  ALARMS:  NONE
058489,000121: 
058490,000122:                                                                                                  #  OUTPUT:       THE FOLLOWING ARE STORED IN THE PUSH LIST AREA.
058491,000123:                                                                                                  #                RMAG1           E:(-29) M:(-27)         M  RN, PRESENT RADIUS LENGTH.
058492,000124:                                                                                                  #                NRMAG           E:(-29+NR)              M  RMAG, NORMALIZED
058493,000125:                                                                                                  #                                M:(-27+NR)
058494,000126:                                                                                                  #                X1                                      -NR, NORM COUNT
058495,000127:                                                                                                  #                TFFNP           E:(-38+2NR)             M  LCP, SEMI LATUS RECTUM, WEIGHTED BY NR.  FOR VGAMCALC
058496,000128:                                                                                                  #                                M:(-36+2NR)
058497,000129:                                                                                                  #                TFF/RTMU        E:(17) M:(14)           1/SQRT(MU)
058498,000130:                                                                                                  #                TFFVSQ          E:(20) M:(18)           1/M  -(V SQ/MU):  PRESENT VELOCITY, NORMLIZED.  FOR VGAMCALC
058499,000131:                                                                                                  #                TFFALFA         E:(26-NR)               1/M  ALFA, WEIGHTED BY NR
058500,000132:                                                                                                  #                                M:(24-NR)
058501,000133:                                                                                                  #                TFFRTALF        E:(10+NA)               SQRT(ALFA), NORMALIZED
058502,000134:                                                                                                  #                                M:(9+NA)

Page 1376

058504,000136:                                                                                                  #                X2                                      -NA, NORM COUNT
058505,000137:                                                                                                  #                TFF1/ALF        E:(-22-2NA)             SIGNED SEMI MAJ AXIS, WEIGHTED BY NA
058506,000138:                                                                                                  #                                M:(-20-2NA)
058507,000139:                                                                                                  #                PUSHLOC AT PDL+0
058508,000140: 
058509,000141:                                                                                                  #        THE FOLLOWING IS STORED IN GENERAL ERASABLE
058510,000142:                                                                                                  #                VONE'           E:(10) M:(9)            V/RT(MU), NORMALIZED VELOCITY
058511,000143: 
058512,000144:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED:
058513,000145:                                                                                                  #                RONE            E:(-29) M:(-27)         M  STATE VECTOR         LEFT BY CALLER
058514,000146:                                                                                                  #                VONE            E:(-7) M:(-5)           M/CS  STATE VECTOR      LEFT BY CALLER
058515,000147:                                                                                                  #                TFF/RTMU        E:(17) M:(14)           1/RT(CS SQ/M CUBE)      IF ENTER VIA TFFCONMU.
058516,000148: 
058517,000149:                                                                                                  #  DEBRIS:       QPRET,  PDL+0 ... PDL+3
058518,000150: 
058519,000151: 33,3776                                           BANK     33                                    
058520,000152: 27,2000                                           SETLOC   TOF-FF                                
058521,000153: 27,2000                                           BANK                                           
058522,000154: 
058523,000155: 27,2757                                           COUNT*   $$/TFF                                
058524,000156: 
058525,000157: 27,2757           00037        TFFCONIC           STORE    TFF/RTMU                              #  1/SQRT(MU)    E:(17) M:(14)
058526,000158: 
058527,000159: 27,2760           53575        TFFCONMU           VLOAD    UNIT                                  #  COME HERE WITH TFFRTMU LOADED.
058528,000160: 27,2761           02327                                    RONE                                  #  SAVED RN.  M  E:(-29) M:(-27)
058529,000161: 27,2762           77725                           PDDL                                           #  UR/2 TO PDL+0, +5
058530,000162: 27,2763           00045                                    36D                                   #  MAGNITUDE
058531,000163: 27,2764           00015                           STORE    RMAG1                                 #  M  E:(-29) M:(-27)
058532,000164: 
058533,000165: 27,2765           77701                           NORM                                           
058534,000166: 27,2766           00047                                    X1                                    #  -NR
058535,000167: 27,2767           24041                           STOVL    NRMAG                                 #  RMAG  M  E:(-29+NR) M:(-27+NR)
058536,000168: 27,2770           02335                                    VONE                                  #  SAVED VN.  M/CS  E:(-7) M:(-5)
058537,000169: 27,2771           77761                           VXSC                                           
058538,000170: 27,2772           00037                                    TFF/RTMU                              #  E:(17) M:(14)
058539,000171: 27,2773           02372                           STORE    VONE'                                 #  VN/SQRT(MU)  E:(10) M:(9)
058540,000172: 
058541,000173: 27,2774           47361                           VXSC     VXV                                   
058542,000174: 27,2775           00041                                    NRMAG                                 #  E:(-29+NR) M:(-27+NR)
058543,000175:                                                                                                  #  UR/2 FROM PDL
058544,000176: 27,2776           47572                           VSL1     VSQ                                   #  BEFORE:  E:(-19+NR) M:(-18+NR)
058545,000177: 27,2777           14035                           STODL    TFFNP                                 #  LC P  M  E:(-38+2NR) M:(-36+2NR)
058546,000178:                                                                                                  #  SAVE ALSO FOR VGAMCALC
058547,000179: 27,3000           15325                                    TFF1/4                                
058548,000180: 27,3001           63271                           DDV      PDVL                                  #  (2/RMAG)  1/M  E:(26-NR) M:(24-NR)
058549,000181: 27,3002           00041                                    NRMAG                                 #  RMAG  M  E:(-29+NR) M:(-27+NR)
058550,000182: 27,3003           02372                                    VONE'                                 #  SAVED VN.  E:(10) M:(9)
058551,000183: 27,3004           57436                           VSQ      DCOMP                                 #  KEEP MPAC+2 HONEST FOR SQRT.
058552,000184: 27,3005           00025                           STORE    TFFVSQ                                #  -(V SQ/MU)  E:(20) M:(18)
058553,000185:                                                                                                  #  SAVE FOR VGAMCALC
058554,000186: 27,3006           43257                           SR*      DAD                                   

Page 1377

058556,000188: 27,3007           20573                                    0          -6,1                       #  GET -VSQ/MU  E:(26-NR) M:(24-NR)
058557,000189: 27,3010           77626                           STADR                                          
058558,000190:                                                                                                  #  2/RMAG  FROM PDL+2
058559,000191: 27,3011           77744                           STORE    TFFALFA                               #  ALFA  1/M  E:(26-NR) M:(24-NR)
058560,000192: 27,3012           41457                           SL*      PUSH                                  #  TEMP SAVE ALFA  E:(20) M:(18)
058561,000193: 27,3013           20173                                    0          -6,1                       
058562,000194: 27,3014           75446                           ABS      SQRT                                  #  E:(10) M:(9)
058563,000195: 27,3015           77701                           NORM                                           
058564,000196: 27,3016           00050                                    X2                                    #  X2 = -NA
058565,000197: 27,3017           00031                           STORE    TFFRTALF                              #  SQRT( ABS(ALFA) )  E:(10+NA) M:(9+NA)
058566,000198: 27,3020           75316                           DSQ      SIGN                                  #  NOT SO ACCURATE, BUT OK
058567,000199:                                                                                                  #  ALFA FROM PDL+2  E:(20) M:(18)
058568,000200: 27,3021           55254                           BZE      BDDV                                  #  SET 1/ALFA =0, TO SHOW SMALL ALFA
058569,000201: 27,3022           57024                                    +2                                    
058570,000202: 27,3023           15325                                    TFF1/4                                
058571,000203: 27,3024           00027                 +2        STORE    TFF1/ALF                              #  1/ALFA  E:(-22-2NA) M:(-20-2NA)
058572,000204: 27,3025           77616        DUMPCNIC           RVQ                                            
058573,000205:                                                                                                  #                        39 W

Page 1378

058575,000207:                                                                                                  #  SUBROUTINE NAME:  TFFRP/RA                    DATE: 01.17.67
058576,000208:                                                                                                  #  MOD NO:  0                                    LOG SECTION:  TIME OF FREE FALL
058577,000209:                                                                                                  #  MOD BY:  RR BAIRNSFATHER
058578,000210:                                                                                                  #  MOD NO:  1    MOD BY:  RR BAIRNSFATHER        DATE: 11 APR 67
058579,000211:                                                                                                  #  MOD NO:  2    MOD BY:  RR BAIRNSFATHER        DATE: 21 MAR 68         ACCEPT DIFFERENT EARTH/MOON SCALES
058580,000212:                                                                                                  #                                                                        ALSO IMPROVE ACCURACY OF RAPO.
058581,000213: 
058582,000214:                                                                                                  #  FUNCTIONAL DESCRIPTION:  USED BY CALCTPER AND TFF DISPLAYS TO CALCULATE PERIGEE RADIUS AND ALSO
058583,000215:                                                                                                  #        APOGEE RADIUS FOR A GENERAL CONIC.
058584,000216:                                                                                                  #        PROGRAM GIVES PERIGEE RADIUS AS         APOGEE RADIUS IS GIVEN BY
058585,000217:                                                                                                  #                RP = P/(1+E)                            RA = (1+E) / ALFA
058586,000218:                                                                                                  #        WHERE    2
058587,000219:                                                                                                  #                E  = 1 - P ALFA
058588,000220:                                                                                                  #        IF RA IS NEGATIVE OR SHOWS DIVIDE OVERFLOW, THEN RA = POSMAX BECAUSE
058589,000221:                                                                                                  #                1. APOGEE RADIUS IS NOT MEANINGFUL FOR HYPERBOLA
058590,000222:                                                                                                  #                2. APOGEE RADIUS IS NOT DEFINED FOR PARABOLA
058591,000223:                                                                                                  #                3. APOGEE RADIUS EXCEEDS THE SCALING FOR ELLIPSE.
058592,000224: 
058593,000225:                                                                                                  #        THIS SUBROUTINE REQUIRES THE SIGNED RECIPROCAL SEMI MAJ AXIS, ALFA, AND SEMI LATUS RECTUM AS DATA.
058594,000226: 
058595,000227:                                                                                                  #  CALLING SEQUENCE:     CALL
058596,000228:                                                                                                  #                                TFFRP/RA
058597,000229:                                                                                                  #        PUSHLOC = PDL+0, ARBITRARY IF LEQ 10D
058598,000230:                                                                                                  #        C(MPAC) UNSPECIFIED
058599,000231: 
058600,000232:                                                                                                  #  SUBROUTINES CALLED:   NONE
058601,000233: 
058602,000234:                                                                                                  #  NORMAL EXIT MODE:     RVQ
058603,000235:                                                                                                  #        IF ELLIPSE, WITHIN NORMAL SCALING, RAPO IS CORRECT.
058604,000236:                                                                                                  #        OTHERWISE, RAPO = POSMAX.
058605,000237: 
058606,000238:                                                                                                  #  ALARMS:       NONE
058607,000239: 
058608,000240:                                                                                                  #  OUTPUT:       STORED IN PUSH LIST AREA.  SCALE OF OUTPUT AGREES WITH DATA SUPPLIED TO TFF/CONIC.
058609,000241:                                                                                                  #        RPER    E:(-29) M:(-27)         M       PERIGEE RADIUS          DESTROYED BY CALCTFF/CALCTPER, TFFTRIG.
058610,000242:                                                                                                  #        RAPO    E:(-29) M:(-27)         M       APOGEE RADIUS           WILL BE DESTROYED BY CALCTFF/CALCTPER
058611,000243:                                                                                                  #        PUSHLOC AT PDL+0
058612,000244: 
058613,000245:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED:
058614,000246:                                                                                                  #        TFFALFA E:(26-NR)               M       1/SEMI MAJ AXIS LEFT BY TFFCONIC
058615,000247:                                                                                                  #                M:(24-NR)
058616,000248:                                                                                                  #        TFFNP   E:(-38+2NR)             M       LC P, SEMI LATUS RECTUM LEFT BY TFFCONIC
058617,000249:                                                                                                  #                M:(-36+2NR)
058618,000250:                                                                                                  #        X1                              -NR, NORM COUNT OF RMAG         LEFT BY TFFCONIC
058619,000251:                                                                                                  #        X2                              -NA, NORM COUNT OF ALFA         LEFT BY TFFCONIC
058620,000252: 
058621,000253:                                                                                                  #  DEBRIS:       QPRET, PDL+0 ... PDL+1
058622,000254: 

Page 1379

058624,000256: 27,3026                        RAPO               =        16D                                   #  APOGEE RADIUS  M  E:(-29) M:(-27)
058625,000257: 27,3026                        RPER               =        14D                                   #  PERIGEE RADIUS  M  E:(-29) M:(-27)
058626,000258: 
058627,000259: 27,3026           41345        TFFRP/RA           DLOAD    DMP                                   
058628,000260: 27,3027           00033                                    TFFALFA                               #  ALFA  1/M  E:(26-NR) M:(24-NR)
058629,000261: 27,3030           00035                                    TFFNP                                 #  LC P  M E:(-38+2NR) M:(-36+2NR)
058630,000262: 27,3031           57457                           SR*      DCOMP                                 #  ALFA P (-12+NR)
058631,000263: 27,3032           20571                                    0          -8D,1                      #  ALFA P (-4)
058632,000264: 27,3033           51415                           DAD      ABS                                   #  (DCOMP GIVES VALID TP RESULT FOR SQRT)
058633,000265:                                                                                                  #  (ABS PROTECTS SQRT IF E IS VERY NEAR 0)
058634,000266: 27,3034           17366                                    DP2(-4)                               
058635,000267: 27,3035           43366                           SQRT     DAD                                   #  E SQ = (1- P ALFA) (-4)
058636,000268: 27,3036           15325                                    TFF1/4                                
058637,000269: 27,3037           55206                           PUSH     BDDV                                  #  (1+E)  (-2)  TO PDL+0
058638,000270: 27,3040           00035                                    TFFNP                                 #  LCP  M  E:(-38+2NR) M:(-36+2NR)
058639,000271: 27,3041           53657                           SR*      SR*                                   #  (DOES SR THEN SL TO AVOID OVFL)
058640,000272: 27,3042           20601                                    0,1                                   #  X1=-NR
058641,000273: 27,3043           20572                                    0          -7,1                       #  (EFFECTIVE SL)
058642,000274: 27,3044           14017                           STODL    RPER                                  #  PERIGEE RADIUS  M  E:(-29) M:(-27)
058643,000275:                                                                                                  #  (1+E)  (-2)  FROM PDL+0
058644,000276: 27,3045           41005                           DMP      BOVB                                  
058645,000277: 27,3046           00027                                    TFF1/ALF                              #  E:(-22-2NA) M:(-20-2NA)
058646,000278: 27,3047           57352                                    TCDANZIG                              #  CLEAR OVFIND, IF ON.
058647,000279: 27,3050           53654                           BZE      SL*                                   
058648,000280: 27,3051           57060                                    MAXRA                                 #  SET POSMAX, IF ALFA=0
058649,000281: 27,3052           57603                                    0          -5,2                       #  -5+NA
058650,000282: 27,3053           40057                           SL*      BOV                                   
058651,000283: 27,3054           57576                                    0,2                                   
058652,000284: 27,3055           57060                                    MAXRA                                 #  SET POSMAX IF OVFL.
058653,000285: 27,3056           77644                           BPL                                            #  CONTINUE WITH VALID RAPO.
058654,000286: 27,3057           57062                                    +3                                    
058655,000287: 27,3060           77745        MAXRA              DLOAD                                          #  RAPO CALC IS NOT VALID.  SET RAPO =
058656,000288: 27,3061           17372                                    NEARONE                               #  POSMAX AS A TAG.
058657,000289: 27,3062           00021                 +3        STORE    RAPO                                  #  APOGEE RADIUS  M  E:(-29) M:(-27)
058658,000290: 27,3063           77616        DUMPRPRA           RVQ                                            
058659,000291:                                                                                                  #                        30 W

Page 1380

058661,000293:                                                                                                  #  SUBROUTINE NAME:  CALCTPER / CALCTFF          DATE:  01.29.67
058662,000294:                                                                                                  #  MOD NO:  0                                    LOG SECTION:  TIME OF FREE FALL
058663,000295:                                                                                                  #  MOD BY:  RR BAIRNSFATHER
058664,000296:                                                                                                  #  MOD NO:  1    MOD BY:  RR BAIRNSFATHER        DATE: 21 MAR 67
058665,000297:                                                                                                  #  MOD NO:  2    MOD BY:  RR BAIRNSFATHER        DATE: 14 APR 67
058666,000298:                                                                                                  #  MOD NO:  3    MOD BY:  RR BAIRNSFATHER        DATE: 8 JUL 67          NEAR EARTH MUE AND NEG TFF (GONEPAST)
058667,000299:                                                                                                  #  MOD NO:  4    MOD BY:  RR BAIRNSFATHER        DATE: 21 NOV 67         ADD VARIABLE MU.
058668,000300:                                                                                                  #  MOD NO:  5    MOD BY:  RR BAIRNSFATHER        DATE: 21 MAR 68         ACCEPT DIFFERENT EARTH/MOON SCALES
058669,000301: 
058670,000302:                                                                                                  #  FUNCTIONAL DESCRIPTION:  PROGRAM CALCULATES THE FREE-FALL TIME OF FLIGHT FROM PRESENT POSITION RN AND
058671,000303:                                                                                                  #        VELOCITY VN TO A RADIUS LENGTH SPECIFIED BY RTERM, SUPPLIED BY THE USER.  THE POSITION VECTOR
058672,000304:                                                                                                  #        RN MAY BE ON EITHER SIDE OF THE CONIC, BUT RTERM IS CONSIDERED ON THE INBOUND SIDE.
058673,000305:                                                                                                  #        THE EQUATIONS ARE
058674,000306: 
058675,000307:                                                                                                  #                Q2 = -SQRT(RTERM (2-RTERM ALFA) - LCP)  (INBOUND SIDE)) LEQ +- LCE/SQRT(ALFA)
058676,000308:                                                                                                  #                     -  -
058677,000309:                                                                                                  #                Q1 = RN.VN / SQRT(MU)                                   LEQ +- LCE/SQRT(ALFA)
058678,000310: 
058679,000311:                                                                                                  #                Z = NUM / DEN                                           LEQ +- 1/SQRT(ALFA)
058680,000312: 
058681,000313:                                                                                                  #        WHERE, IF INBOUND
058682,000314:                                                                                                  #                NUM = RTERM -RN                                         LEQ +- 2 LCE/ALFA
058683,000315:                                                                                                  #                DEN = Q2+Q1                                             LEQ +- 2 LCE/SQRT(ALFA)
058684,000316: 
058685,000317:                                                                                                  #        AND, IF OUTBOUND
058686,000318:                                                                                                  #                NUM = Q2-Q1                                             LEQ +- 2 LCE/SQRT(ALFA)
058687,000319:                                                                                                  #                DEN = 2 - ALFA (RTERM + RN).                            LEQ +- 2 LCE
058688,000320: 
058689,000321:                                                                                                  #        IF      ALFA ZZ < 1.0           (FOR ALL CONICS EXCEPT ELLIPSES HAVING ABS(DEL ECC ANOM) G 90 DEG)
058690,000322:                                                                                                  #        THEN    X = ALFA Z Z
058691,000323:                                                                                                  #        AND     TFF = (RTERM +RN -2 ZZ T(X) ) Z/SQRT(MU)
058692,000324:                                                                                                  #                EXCEPT  IF ALFA PNZ, AND IF TFF NEG,
058693,000325:                                                                                                  #                THEN    TFF = 2 PI /(ALFA SQRT(ALFA)) + TFF
058694,000326:                                                                                                  #        OR      IF ALFA ZZ GEQ 1.0      (FOR ELLIPSES HAVING ABS(DEL ECC ANOM) GEQ 90 DEG)
058695,000327:                                                                                                  #        THEN    X = 1/ALFA Z Z
058696,000328:                                                                                                  #        AND     TFF = (PI/SQRT(ALFA) -Q2 +Q1 +2(X T(X) -1) /ALFA Z) /ALFA SQRT(MU)
058697,000329:                                                                                                  #        WHERE   T(X) IS A POLYNOMIAL APPROXIMATION TO THE SERIES
058698,000330:                                                                                                  #                             2      3             2
058699,000331:                                                                                                  #                1/3 - X/5 + X /7 - X /9 ...     (X  < 1.0)
058700,000332: 
058701,000333:                                                                                                  #  CALLING SEQUENCE:     TIME TO RTERM                   TIME TO PERIGEE
058702,000334:                                                                                                  #                        CALL                            CALL
058703,000335:                                                                                                  #                                CALCTFF                         CALCTPER
058704,000336:                                                                                                  #                        C(MPAC) = TERMNL RAD M          C(MPAC) = PERIGEE RAD M
058705,000337:                                                                                                  #        FOR EITHER, E:(-29) M:(-27)
058706,000338:                                                                                                  #        FOR EITHER, PUSHLOC = PDL+0, ARBITRARY IF LEQ 8D.

Page 1381

058708,000340: 
058709,000341:                                                                                                  #  SUBROUTINES CALLED:   T(X), VIA RTB
058710,000342: 
058711,000343:                                                                                                  #  NORMAL EXIT MODE:     RVQ
058712,000344:                                                                                                  #        HOWEVER, PROGRAM EXITS WITH ONE OF THE FOLLOWING VALUES FOR TFF (-28) CS IN MPAC.  USER MUST STORE.
058713,000345:                                                                                                  #                A. TFF = FLIGHT TIME.  NORMAL CASE FOR POSITIVE FLIGHT TIME LESS THAN ONE ORBITAL PERIOD.
058714,000346:                                                                                                  #                B. (THIS OPTION IS NO LONGER USED.)
058715,000347:                                                                                                  #                C. TFF = POSMAX.  THIS INDICATES THAT THE CONIC FROM THE PRESENT POSITION WILL NOT RETURN TO
058716,000348:                                                                                                  #                   THE SPECIFIED ALTITUDE.  ALSO INDICATES OUTBOUND PARABOLA OR HYPERBOLA.
058717,000349: 
058718,000350:                                                                                                  #  OUTPUT:       C(MPAC)         (-28) CS        TIME OF FLIGHT, OR TIME TO PERIGEE
058719,000351:                                                                                                  #                TFFX            (0)             X,                                      LEFT FOR ENTRY DISPLAY TFF ROUTINES
058720,000352:                                                                                                  #                NRTERM          E:(-29+NR) M    RTERM, WEIGHTED BY NR                   LEFT FOR ENTRY DISPLAY TFF ROUTINES
058721,000353:                                                                                                  #                                M:(-27+NR)
058722,000354:                                                                                                  #                TFFTEM          E:(-59+2NR)     LCP Z Z SGN(SDELF)                      LEFT FOR ENTRY DISPLAY TFF ROUTINES
058723,000355:                                                                                                  #                                M:(-55+2NR)     LCP /ALFA SGN(SDELF)                    LEFT FOR ENTRY DISPLAY TFF ROUTINES
058724,000356:                                                                                                  #                NOTE:   TFFTEM = PDL 36D AND WILL BE DESTROYED BY .:UNIT:.
058725,000357:                                                                                                  #                RMAG1           E:(-29) M:(-27) PDL 12 NOT TOUCHED.
058726,000358:                                                                                                  #                TFFQ1           E:(-16) M:(-15) PDL 14D
058727,000359:                                                                                                  #                TFFDELQ         E:(-16) M:(-15) PDL 10D
058728,000360:                                                                                                  #                PUSHLOC AT PDL+0
058729,000361: 
058730,000362:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED:
058731,000363:                                                                                                  #                RONE            E:(-29) M:(-27) M  STATE VECTOR                         LEFT BY USER
058732,000364:                                                                                                  #                VONE'           E:(+10) M:(+9)  VN/SQRT(MU)                             LEFT BY TFF/CONIC
058733,000365:                                                                                                  #                RMAG1           E:(-29) M:(-27) PRESENT RADIUS, M                       LEFT BY TFFCONIC
058734,000366:                                                                                                  #                C(MPAC)         E:(-29) M:(-27) RTERM, TERMINAL RADIUS LENGTH, M        LEFT BY USER
058735,000367: 
058736,000368:                                                                                                  #                THE FOLLOWING ARE STORED IN THE PUSH LIST AREA.
058737,000369:                                                                                                  #                TFF/RTMU        E:(17) M:(14)   1/SQRT(MU)                              LEFT BY TFFCONIC.
058738,000370:                                                                                                  #                NRMAG           E:(-29+NR)      M  RMAG, NORMALIZED                     LEFT BY TFFCONIC
058739,000371:                                                                                                  #                                M:(-27+NR)
058740,000372:                                                                                                  #                X1                              -NR, NORM COUNT                         LEFT BY TFFCONIC
058741,000373:                                                                                                  #                TFFNP           E:(-38+2NR)     M  LCP, SEMI LATUS RECTUM, WEIGHT NR    LEFT BY TFFCONIC
058742,000374:                                                                                                  #                                M:(-36+2NR)
058743,000375:                                                                                                  #                TFFALFA         E:(26-NR)       1/M  ALFA, WEIGHT NR                    LEFT BY TFFCONIC
058744,000376:                                                                                                  #                                M:(24-NR)
058745,000377:                                                                                                  #                TFFRTALF        E:(10+NA)       SQRT(ALFA), NORMALIZED                  LEFT BY TFFCONIC
058746,000378:                                                                                                  #                                M:(9+NA)
058747,000379:                                                                                                  #                X2                              -NA, NORM COUNT                         LEFT BY TFFCONIC
058748,000380:                                                                                                  #                TFF1/ALF        E:(-22-2NA)     SIGNED SEMIMAJ AXIS, WEIGHTED BY NA     LEFT BY TFFCONIC
058749,000381:                                                                                                  #                                M:(-20-2NA)
058750,000382: 
058751,000383:                                                                                                  #  DEBRIS:       QPRET, PDL+0 ... PDL+3
058752,000384:                                                                                                  #                RTERM           E:(-29) M:(-27) RTERM, TERMINAL RADIUS LENGTH
058753,000385:                                                                                                  #                RAPO            E:(-29) M:(-27) PDL 16D (=NRTERM)
058754,000386:                                                                                                  #                RPER            E:(-29) M:(-27) PDL 14D (=TFFQ1)
058755,000387: 

Page 1382

058757,000389: 27,3064           77614        CALCTPER           SETGO                                          #  ENTER WITH RPER IN MPAC
058758,000390: 27,3065           03436                                    TFFSW                                 
058759,000391: 27,3066           57071                                    +3                                    
058760,000392: 27,3067           77614        CALCTFF            CLEAR                                          #  ENTER WITH RTERM IN MPAC
058761,000393: 27,3070           03676                                    TFFSW                                 
058762,000394: 27,3071           00023                 +3        STORE    RTERM                                 #  E:(-29) M:(-27)
058763,000395: 27,3072           77657                           SL*                                            
058764,000396: 27,3073           20201                                    0,1                                   #  X1=-NR
058765,000397: 27,3074           00021                           STORE    NRTERM                                #  RTERM  E:(-29+NR) M:(-27+NR)
058766,000398: 27,3075           44205                           DMP      BDSU                                  
058767,000399: 27,3076           00033                                    TFFALFA                               #  ALFA  E:(26-NR) M:(24-NR)
058768,000400: 27,3077           15325                                    TFF1/4                                
058769,000401: 27,3100           41206                           PUSH     DMP                                   #  (2-ALFA RTERM)  (-3)  TO PDL+0
058770,000402: 27,3101           00021                                    NRTERM                                #  E:(-29+NR) M:(-27+NR)
058771,000403: 27,3102           53725                           PDDL     SR*                                   #  RTERM(2-ALFA RTERM) TO PDL+2
058772,000404:                                                                                                  #  E:(-32+NR) M:(-30+NR)
058773,000405: 27,3103           00035                                    TFFNP                                 #  LC P  E:(-38+2NR) M:(-36+2NR)
058774,000406: 27,3104           20573                                    0          -6,1                       #  X1 = -NR
058775,000407: 27,3105           43276                           DCOMP    DAD                                   #  DUE TO SHIFTS, KEEP PRECISION FOR SQRT
058776,000408:                                                                                                  #  RTERM(2-ALFA RTERM) FROM PDL +2
058777,000409:                                                                                                  #  E:(-32+NR) M:(-30+NR)
058778,000410: 27,3106           77657                           SR*                                            #  LEAVE  E:(-32) M:(-30)
058779,000411: 27,3107           20601                                    0,1                                   #  X1 = -NR
058780,000412: 27,3110           71214                           BOFF     DLOAD                                 #  CHECK TFF /TPER SWITCH
058781,000413: 27,3111           03756                                    TFFSW                                 
058782,000414: 27,3112           57114                                    +2                                    #  IF TFF, CONTINUE
058783,000415: 27,3113           15335                                    TFFZEROS                              #  IF TPER, SET Q2 = 0
058784,000416: 27,3114           75440                 +2        BMN      SQRT                                  #  E:(-16) M:(-15)
058785,000417: 27,3115           57247                                    MAXTFF1                               #  NO FREE FALL CONIC TO RTERM FROM HERE
058786,000418:                                                                                                  #  RESET PDL, SET TFF=POSMAX, AND EXIT.
058787,000419: 
058788,000420: 27,3116           41076                           DCOMP    BOVB                                  #  RT IS ON INBOUND SIDE.  ASSURE OVFIND=0
058789,000421: 27,3117           57352                                    TCDANZIG                              #  ANY PORT IN A STORM.
058790,000422: 27,3120           24045                           STOVL    TFFTEM                                #  Q2  E:(-16) M:(-15)
058791,000423: 27,3121           02372                                    VONE'                                 #  VN/SQRT(MU)  E:(10) M:(9)
058792,000424: 27,3122           52441                           DOT      SL3                                   
058793,000425: 27,3123           02327                                    RONE                                  #  SAVED RN.  E:(-29) M:(-27)
058794,000426: 27,3124           00017                           STORE    TFFQ1                                 #  Q1, SAVE FOR GONEPAST TEST.
058795,000427:                                                                                                  #  E:(-16) M:(-15)
058796,000428: 27,3125           44240                           BMN      BDSU                                  
058797,000429: 27,3126           57147                                    INBOUND                               #  USE ALTERNATE Z
058798,000430: 27,3127           00045                                    TFFTEM                                #  Q2  E:(-16) M:(-15)
058799,000431: 
058800,000432:                                                                                                  #  OUTBOUND Z CALC CONTINUES HERE
058801,000433: 
058802,000434: 27,3130           14043                           STODL    TFFX                                  #  NUM=Q2-Q1  E:(-16) M:(-15)
058803,000435: 27,3131           00033                                    TFFALFA                               #  ALFA  E:(26-NR) M:(24-NR)
058804,000436: 27,3132           44205                           DMP      BDSU                                  

Page 1383

058806,000438: 27,3133           00041                                    NRMAG                                 #  RMAG  E:(-29+NR) M:(-27+NR)
058807,000439:                                                                                                  #  (2-RTERM ALFA)  (-3) FROM PDL+0
058808,000440: 27,3134           51406        SAVEDEN            PUSH     ABS                                   #  DEN TO PDL+0  E:(-3) OR (-16)
058809,000441:                                                                                                  #                M:(-3) OR (-15)
058810,000442: 27,3135           40015                           DAD      BOV                                   #  INDETERMINANCY TEST
058811,000443: 27,3136           17360                                    LIM(-22)                              #  =1.0-B(-22)
058812,000444: 27,3137           57160                                    TFFXTEST                              #  GO IF DEN >/= B(-22)
058813,000445: 27,3140           65345                           DLOAD    PDDL                                  #  SET DEN=0 OTHERWISE
058814,000446: 27,3141           15335                                    TFFZEROS                              
058815,000447:                                                                                                  #  XCH ZERO WITH PDL+0
058816,000448: 27,3142           57545                           DLOAD    DCOMP                                 
058817,000449: 27,3143           00033                                    TFFALFA                               #  ALFA  E:(26-NR) M:(24-NR)
058818,000450: 27,3144           71240                           BMN      DLOAD                                 #  FOR TPER:  Z INDET AT DELE/2=0 AND 90.
058819,000451: 27,3145           57254                                    TFFEL1                                #  ASSUME 90, AND LEAVE 0 IN PDL: 1/Z=D/N
058820,000452: 
058821,000453:                                                                                                  #  Z INDET. AT PERIGEE FOR PARAB OR HYPERB.
058822,000454: 27,3146           77616        DUMPTFF1           RVQ                                            #  RETURN TFF =0
058823,000455: 
058824,000456:                                                                                                  #  INBOUND Z CALC CONTINUES HERE
058825,000457: 
058826,000458: 27,3147           77745        INBOUND            DLOAD                                          #  RESET PDL+0
058827,000459: 27,3150           45345                           DLOAD    DSU                                   #  ALTERNATE Z CALC
058828,000460: 27,3151           00023                                    RTERM                                 #  E:(-29) M:(-27)
058829,000461: 27,3152           00015                                    RMAG1                                 #  E:(-29) M:(-27)
058830,000462: 27,3153           14043                           STODL    TFFX                                  #  NUM=RTERM-RN  E:(-29) M:(-27)
058831,000463: 27,3154           00045                                    TFFTEM                                #  Q2  E:(-16) M:(-15)
058832,000464: 27,3155           52015                           DAD      GOTO                                  
058833,000465: 27,3156           00017                                    TFFQ1                                 #  Q1  E:(-16) M:(-15)
058834,000466: 27,3157           57134                                    SAVEDEN                               #  DEN = Q2+Q1  E:(-16) M:(-15)
058835,000467: 
058836,000468: 27,3160           65215        TFFXTEST           DAD      PDDL                                  #  (ABS(DEN) TO PDL+2))  E:(-3) OR (-16)
058837,000469:                                                                                                  #                        M:(-3) OR (-15)
058838,000470: 27,3161           17362                                    DP(-22)                               #  RESTORE ABS(DEN) TO MPAC
058839,000471: 27,3162           00043                                    TFFX                                  #  NUM  E:(-16) OR (-29)  M:(-15) OR (-27)
058840,000472: 27,3163           53605                           DMP      SR*                                   
058841,000473: 27,3164           00031                                    TFFRTALF                              #  SQRT(ALFA)  E:(10+NA) M:(9+NA)
058842,000474: 27,3165           57201                                    0          -3,2                       #  X2=-NA
058843,000475: 27,3166           77671                           DDV                                            #  C(MPAC) =NUM SQRT(ALFA)       E:(-3) OR (-16)
058844,000476:                                                                                                  #                                M:(-3) OR (-15)
058845,000477:                                                                                                  #  ABS(DEN) FROM PDL+2   E:(-3) OR (-16)
058846,000478:                                                                                                  #                        M:(-3) OR (-15)
058847,000479: 27,3167           40145                           DLOAD    BOV                                   #  (THE DLOAD IS SHARED WITH TFFELL)
058848,000480: 27,3170           00043                                    TFFX                                  #  NUM  E:(-16) OR (-29)  M:(-15) OR (-27)
058849,000481: 27,3171           57252                                    TFFELL                                #  USE EQN FOR DELE GEQ 90, LEQ -90
058850,000482: 
058851,000483:                                                                                                  #  OTHERWISE, CONTINUE FOR GENERAL CONIC FOR TFF EQN
058852,000484: 
058853,000485: 27,3172           45471                           DDV      STADR                                 
058854,000486:                                                                                                  #  DEN FROM PDL+0        E:(-3) OR (-16)
058855,000487:                                                                                                  #                        M:(-3) OR (-15)
058856,000488: 27,3173           77732                           STORE    TFFTEM                                #  Z SAVE FOR SIGN OF SDELF.

Page 1384

058858,000490:                                                                                                  #  E:(-13) M:(-12)
058859,000491: 27,3174           63406                           PUSH     DSQ                                   #  Z TO PDL+0
058860,000492: 27,3175           41206                           PUSH     DMP                                   #  Z SQ TO PDL+2  E:(-26) M:(-24)
058861,000493: 27,3176           00035                                    TFFNP                                 #  LC P  E:(-38+2NR) M:(-36+2NR)
058862,000494: 27,3177           75261                           SL       SIGN                                  
058863,000495: 27,3200           20206                                    5                                     
058864,000496: 27,3201           00045                                    TFFTEM                                #  AFFIX SIGN FOR SDELF (ENTRY DISPLAY)
058865,000497: 27,3202           14045                           STODL    TFFTEM                                #  P ZSQ  E:(-59+2NR) M:(-55+2NR)
058866,000498:                                                                                                  #  (ARG IS USED IN TFF/TRIG)
058867,000499:                                                                                                  #  ZSQ FROM PDL+2  E:(-26) M:(-24)
058868,000500: 27,3203           41206                           PUSH     DMP                                   #  RESTORE PUSH LOC
058869,000501: 27,3204           00033                                    TFFALFA                               #  ALFA  E:(26-NR) M:(24-NR)
058870,000502: 27,3205           77657                           SL*                                            
058871,000503: 27,3206           20201                                    0,1                                   #  X1=-NR
058872,000504: 27,3207           00043                           STORE    TFFX                                  #  X
058873,000505: 27,3210           41234                           RTB      DMP                                   
058874,000506: 27,3211           57334                                    T(X)                                  #  POLY
058875,000507:                                                                                                  #  ZSQ FROM PDL+2  E:(-26) M:(-24)
058876,000508: 27,3212           44302                           SR2      BDSU                                  #  2 ZSQ T(X)  E:(-29) M:(-27)
058877,000509: 27,3213           00023                                    RTERM                                 #  RTERM  E:(-29) M:(-27)
058878,000510: 27,3214           41215                           DAD      DMP                                   
058879,000511: 27,3215           00015                                    RMAG1                                 #  E:(-29) M:(-27)
058880,000512:                                                                                                  #  Z FROM PDL+0  E:(-13) M:(-12)
058881,000513: 27,3216           51042                           SR3      BPL                                   #  TFF SQRT(MU)  E:(-45) M:(-42)
058882,000514: 27,3217           57240                                    ENDTFF                                #  (NO PUSH UP)
058883,000515: 27,3220           75206                           PUSH     SIGN                                  #  TFF SQRT(MU) TO PDL+0
058884,000516: 27,3221           00017                                    TFFQ1                                 #  Q1 FOR GONEPAST TEST
058885,000517: 27,3222           71244                           BPL      DLOAD                                 #  GONE PAST ?
058886,000518: 27,3223           57244                                    NEGTFF                                #  YES. TFF < 0.
058887,000519: 27,3224           00027                                    TFF1/ALF                              #  1/ALFA  E:(-22-2NA) M:(-20-2NA)
058888,000520: 27,3225           51076                           DCOMP    BPL                                   #  ALFA > 0 ?
058889,000521: 27,3226           57244                                    NEGTFF                                #  NO. TFF IS NEGATIVE.
058890,000522: 
058891,000523:                                                                                                  #  CORRECT FOR ORBITAL PERIOD.
058892,000524: 
058893,000525: 27,3227           77676                           DCOMP                                          #  YES.  CORRECT FOR ORB PERIOD.
058894,000526: 27,3230           56205                           DMP      DDV                                   
058895,000527: 27,3231           17356                                    PI/16                                 #  2 PI (-5)
058896,000528: 27,3232           00031                                    TFFRTALF                              #  SQRT(ALFA)  E:(10+NA) M:(9+NA)
058897,000529: 27,3233           53657                           SL*      SL*                                   
058898,000530: 27,3234           57602                                    0          -4,2                       #  X2=-NA
058899,000531: 27,3235           57602                                    0          -4,2                       
058900,000532: 27,3236           43257                           SL*      DAD                                   
058901,000533: 27,3237           57576                                    0,2                                   
058902,000534:                                                                                                  #  TFF SQRT(MU) FROM PDL+0       E:(-45) M:(-42)
058903,000535: 27,3240           40005        ENDTFF             DMP      BOV                                   #  TFF SQRT(MU) IN MPAC          E:(-45) M:(-42)
058904,000536: 27,3241           00037                                    TFF/RTMU                              #  E:(17) M:(14)
058905,000537: 27,3242           57250                                    MAXTFF                                #  SET POSMAX IF OVFL.
058906,000538: 
058907,000539: 27,3243           77616        DUMPTFF2           RVQ                                            #  RETURN TFF (-28) CS IN MPAC.
058908,000540: 

Page 1385

058910,000542: 27,3244           77745        NEGTFF             DLOAD                                          
058911,000543:                                                                                                  #  TFF SQRT(MU) FROM PDL+0, NEGATIVE.
058912,000544: 27,3245           77650                           GOTO                                           
058913,000545: 27,3246           57240                                    ENDTFF                                
058914,000546: 
058915,000547: 27,3247           77745        MAXTFF1            DLOAD                                          #  RESET PDL
058916,000548: 27,3250           43545        MAXTFF             DLOAD    RVQ                                   
058917,000549: 27,3251           17372                                    NEARONE                               
058918,000550: 
058919,000551:                                                                                                  #  TIME OF FLIGHT ELLIPSE WHEN DEL (ECCENTRIC ANOM) GEQ 90 AND LEQ -90.
058920,000552: 
058921,000553:                                                                                                  #  NUM FROM TFFX.        E:(-16) OR (-29)
058922,000554:                                                                                                  #                        M:(-15) OR (-27)
058923,000555: 27,3252           77712        TFFELL             SL2                                            #  NUM  E:(-14) OR (-27)  M:(-13) OR (-25)
058924,000556: 27,3253           41465                           BDDV     PUSH                                  #  TEMP SAVE D/N IN PDL+0
058925,000557:                                                                                                  #  DEN FROM PDL+0  E:(-3)/( 16)  M:(-3)/(-15)
058926,000558:                                                                                                  #  N/D TO PDL+0  E:(11) M:(10)
058927,000559: 27,3254           45345        TFFEL1             DLOAD    DSU                                   #  (ENTER WITH D/N=0 IN PDL+0)
058928,000560: 27,3255           00045                                    TFFTEM                                #  Q2  E:(-16) M:(-15)
058929,000561: 27,3256           00017                                    TFFQ1                                 #  Q1  E:(-16) M:(-15)
058930,000562: 27,3257           14013                           STODL    TFFDELQ                               #  Q2-Q1  E:(-16) M:(-15)
058931,000563:                                                                                                  #  D/N FROM PDL+0
058932,000564: 27,3260           77626                           STADR                                          
058933,000565: 27,3261           77732                           STORE    TFFTEM                                #  D/N  E:(11) M:(10)
058934,000566: 27,3262           53605                           DMP      SL*                                   
058935,000567: 27,3263           00027                                    TFF1/ALF                              #  1/ALFA  E:(-22-2NA) M:(-20-2NA)
058936,000568: 27,3264           57576                                    0,2                                   #  1/ALFA Z  E:(-11-NA) M:(-10-NA)
058937,000569: 27,3265           41206                           PUSH     DMP                                   #  TO PDL+0
058938,000570: 27,3266           00045                                    TFFTEM                                #  1/Z  E:(11) M:(10)
058939,000571: 27,3267           41057                           SL*      BOVB                                  
058940,000572: 27,3270           57576                                    0,2                                   #  X2= -NA
058941,000573: 27,3271           45712                                    SIGNMPAC                              #  IN CASE X= 1.0, CONTINUE
058942,000574: 27,3272           00043                           STORE    TFFX                                  #  X=1/ALFA ZSQ
058943,000575: 27,3273           41234                           RTB      DMP                                   
058944,000576: 27,3274           57334                                    T(X)                                  #  POLY
058945,000577: 27,3275           00043                                    TFFX                                  
058946,000578: 27,3276           45242                           SR3      DSU                                   
058947,000579: 27,3277           17364                                    DP2(-3)                               
058948,000580: 27,3300           41405                           DMP      PUSH                                  #  2(X T(X)-1) /Z ALFA   E:(-15-NA)
058949,000581:                                                                                                  #                        M:(-14-NA)
058950,000582:                                                                                                  #  1/ALFA Z FROM PDL+0   E:(-11-NA)
058951,000583:                                                                                                  #                        M:(-10-NA)
058952,000584: 27,3301           41345                           DLOAD    DMP                                   #  GET SIGN FOR SDELF
058953,000585: 27,3302           00045                                    TFFTEM                                #  1/Z  E:(11) M:(10)
058954,000586: 27,3303           00015                                    RMAG1                                 #  E:(-29) M:(-27)
058955,000587: 27,3304           43312                           SL2      DAD                                   
058956,000588: 27,3305           00017                                    TFFQ1                                 #  Q1  E:(-16) M:(-15)
058957,000589: 27,3306           14045                           STODL    TFFTEM                                #  (Q1+R 1/Z) =SGN OF SDELF  E:(-16) M:(-15
058958,000590: 27,3307           00035                                    TFFNP                                 #  LC P  E:(-38+2NR) M:(-36+2NR)
058959,000591: 27,3310           53605                           DMP      SL*                                   #  CALC FOR ARG FOR TFF/TRIG.

Page 1386

058961,000593: 27,3311           00027                                    TFF1/ALF                              #  1/ALFA  E:(-22-2NA) M:(-20-2NA)
058962,000594: 27,3312           57575                                    1,2                                   #  X2=-NA
058963,000595: 27,3313           53765                           SIGN     SL*                                   
058964,000596: 27,3314           00045                                    TFFTEM                                #  AFFIX SIGN FOR SDELF
058965,000597: 27,3315           57576                                    0,2                                   
058966,000598: 27,3316           14045                           STODL    TFFTEM                                #  P/ALFA  E:(-59+2NR) M:(-55+2NR)
058967,000599:                                                                                                  #  (ARG FOR USE IN TFF/TRIG)
058968,000600: 27,3317           00027                                    TFF1/ALF                              #  1/ALFA  E:(-22-2NA) M:(-20-2NA)
058969,000601: 27,3320           41366                           SQRT     DMP                                   
058970,000602: 27,3321           17356                                    PI/16                                 #  PI (-4)
058971,000603: 27,3322           77615                           DAD                                            
058972,000604:                                                                                                  #  2(XT(X)-1)/Z ALFA FROM PDL    E:(-15-NA)
058973,000605:                                                                                                  #                                M:(-14-NA)
058974,000606: 27,3323           45257                           SL*      DSU                                   
058975,000607: 27,3324           57577                                    0          -1,2                       
058976,000608: 27,3325           00013                                    TFFDELQ                               #  Q2-Q1  E:(-16) M:(-15)
058977,000609: 27,3326           53605                           DMP      SL*                                   
058978,000610: 27,3327           00027                                    TFF1/ALF                              #  1/ALFA  E:(-22-2NA) M:(-20-2NA)
058979,000611: 27,3330           57601                                    0          -3,2                       
058980,000612: 27,3331           52057                           SL*      GOTO                                  
058981,000613: 27,3332           57602                                    0          -4,2                       
058982,000614: 27,3333           57240                                    ENDTFF                                #  TFF SQRT(MU) IN MPAC E:(-45) M:(-42)
058983,000615: 

Page 1387

058985,000617:                                                                                                  #  PROGRAM NAME:  T(X)                           DATE:  01.17.67
058986,000618:                                                                                                  #  MOD NO:  0                                    LOG SECTION:  TIME OF FREE FALL
058987,000619:                                                                                                  #  MOD BY:  RR BAIRNSFATHER
058988,000620: 
058989,000621:                                                                                                  #  FUNCTIONAL DESCRIPTION:  THE POLYNOMIAL T(X) IS USED BY TIME OF FLIGHT SUBROUTINES CALCTFF AND
058990,000622:                                                                                                  #        CALCTPER TO APPROXIMATE THE SERIES
058991,000623:                                                                                                  #                           2     3
058992,000624:                                                                                                  #                1/3 -X/5 +X /7 -X /9 ...
058993,000625: 
058994,000626:                                                                                                  #        WHERE   X = ALFA Z Z            IF ALFA Z Z LEQ 1
058995,000627:                                                                                                  #                X = 1/(ALFA Z Z)        IF ALFA Z Z G 1
058996,000628: 
058997,000629:                                                                                                  #        ALSO    X IS NEG FOR HYPERBOLIC ORBITS
058998,000630:                                                                                                  #                X = 0 FOR PARABOLIC ORBITS
058999,000631:                                                                                                  #                X IS POSITIVE FOR ELLIPTIC ORBITS
059000,000632: 
059001,000633:                                                                                                  #        FOR FLIGHT 278, THE POLYNOMIAL T(X) IS FITTED OVER THE RANGE (0,+1) AND HAS A MAXIMUM
059002,000634:                                                                                                  #        DEVIATION FROM THE SERIES OF 2 E-5       (T(X) IS A CHEBYCHEV TYPE FIT AND WAS OBTAINED USING
059003,000635:                                                                                                  #        MAC PROGRAM AUTCURFIT294RRB AND IS VALID TO THE SAME TOLERANCE OVER THE RANGE (-.08,+1).)
059004,000636: 
059005,000637:                                                                                                  #  CALLING SEQUENCE:     RTB
059006,000638:                                                                                                  #                                T(X)
059007,000639:                                                                                                  #        C(MPAC) = X
059008,000640: 
059009,000641:                                                                                                  #  SUBROUTINES CALLED:  NONE
059010,000642: 
059011,000643:                                                                                                  #  NORMAL EXIT MODE:  TC DANZIG
059012,000644: 
059013,000645:                                                                                                  #  ALARMS:  NONE
059014,000646: 
059015,000647:                                                                                                  #  OUTPUT:  C(MPAC) = T(X)
059016,000648: 
059017,000649:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED:
059018,000650:                                                                                                  #        C(MPAC) = X
059019,000651: 
059020,000652:                                                                                                  #  DEBRIS:  NONE
059021,000653: 
059022,000654: 27,3334           07171        T(X)               TC       POLY                                  
059023,000655: 27,3335           00004                           DEC      4          B-14                       #  N-1
059024,000656: 27,3336           12525 12525                     2DEC     3.333333333 E-1                        
059025,000657: 27,3340           71463 57703                     2DEC*    -1.999819135 E-1*                       
059026,000658: 27,3342           04423 17645                     2DEC*    1.418148467 E-1*                       
059027,000659: 27,3344           74604 43667                     2DEC*    -1.01310997 E-1*                       
059028,000660: 27,3346           01626 37256                     2DEC*    5.609004986 E-2*                       
059029,000661: 27,3350           77404 52071                     2DEC*    -1.536156925 E-2*                       
059030,000662: 
059031,000663: 27,3352           06030        ENDT(X)            TC       DANZIG                                
059032,000664: 
059033,000665: 27,3353  27,3352               TCDANZIG           =        ENDT(X)                               
059034,000666: 

Page 1388

059036,000668:                                                                                                  #  TFF CONSTANTS
059037,000669: 
059038,000670: 32,3770                                           BANK     32                                    
059039,000671: 
059040,000672: 27,2000                                           SETLOC   TOF-FF1                               
059041,000673: 27,2000                                           BANK                                           
059042,000674: 
059043,000675:                                                                                                  #                                                NOTE _  NOTE _ ADJUSTED MUE FOR NEAR EARTH TRAJ.
059044,000676:                                                                                                  # MUE            =       3.990815471 E10         M CUBE/CS SQ
059045,000677:                                                                                                  # RTMUE          =       1.997702549 E5 B-18*    MODIFIED EARTH MU
059046,000678: 
059047,000679: 27,3353           24775 30424  1/RTMU             2DEC*    .5005750271 E-5        B17*            #  MODIFIED EARTH MU
059048,000680: 
059049,000681:                                                                                                  #                                                NOTE _  NOTE _ ADJUSTED MUE FOR NEAR EARTH TRAJ.
059050,000682:                                                                                                  # MUM            =       4.902778 E8             M CUBE/CS SQ
059051,000683:                                                                                                  # RTMUM          2DEC*   2.21422176 E4 B-18*
059052,000684: 27,3355           06220 37553  PI/16              2DEC     3.141592653 B-4                        
059053,000685: 27,3357           37777 37700  LIM(-22)           2OCT     3777737700                            #  1.0 -B(-22)
059054,000686: 27,3361           00000 00100  DP(-22)            2OCT     0000000100                            #  B(-22)
059055,000687: 27,3363           04000 00000  DP2(-3)            2DEC     1          B-3                        
059056,000688: 27,3365           02000 00000  DP2(-4)            2DEC     1          B-4                        #  1/16
059057,000689: 
059058,000690:                                                                                                  #  RPAD1         2DEC    6373338 B-29            M (-29) = 20909901.57 FT
059059,000691: 27,3367  22,3151               RPAD1              =        RPAD                                  
059060,000692: 
059061,000693: 27,3367           00305 11205  R300K              2DEC     6464778    B-29                       #  (-29) M
059062,000694: 27,3371           37777 37777  NEARONE            2DEC     .999999999                            
059063,000695: 27,3373  26,3334               TFFZEROS           EQUALS   HI6ZEROS                              
059064,000696: 27,3373  26,3324               TFF1/4             EQUALS   HIDP1/4                               

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