Source Code

These source-code files derive from a printout of Luminary 210 (Apollo 15-17 Lunar Module guidance computer program), from the personal library of original AGC developer Don Eyles, digitally photographed at archive.org, financially sponsored by Jim Lawton, and transcribed to source code by a team of volunteers. This colorized, syntax-highlighted form was created by assembling that transcribed source code. Note that the full page images are available on the Virtual AGC project page at archive.org, while reduced-size images are presented at the VirtualAGC project website. Report or fix any transcription errors at the Virtual AGC project code repository.

Notations on the program listing read, in part:

	GAP: ASSEMBLE REVISION 210 OF AGC PROGRAM LUMINARY 
	BY NASA 2021112-161 17:11 MAR. 19,1971
Note that the date is the date of the printout, not the date of the program revision.

054593,000002:                                                                                                  ## Copyright:   Public domain.
054594,000003:                                                                                                  ## Filename:    TIME_OF_FREE_FALL.agc
054595,000004:                                                                                                  ## Purpose:     A section of Luminary revision 210.
054596,000005:                                                                                                  ##              It is part of the source code for the Lunar Module's (LM)
054597,000006:                                                                                                  ##              Apollo Guidance Computer (AGC) for Apollo 15-17.
054598,000007:                                                                                                  ##              This file is intended to be a faithful transcription, except
054599,000008:                                                                                                  ##              that the code format has been changed to conform to the
054600,000009:                                                                                                  ##              requirements of the yaYUL assembler rather than the
054601,000010:                                                                                                  ##              original YUL assembler.
054602,000011:                                                                                                  ## Reference:   pp. 1265-1280
054603,000012:                                                                                                  ## Assembler:   yaYUL
054604,000013:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
054605,000014:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
054606,000015:                                                                                                  ## Mod history: 2016-11-17 JL   Created from Luminary131 version.
054607,000016:                                                                                                  ##              2016-12-10 MAS  Began transcription.
054608,000017:                                                                                                  ##              2016-12-10 MAS  Completed transcription.
054609,000018:                                                                                                  ##              2016-12-26 RSB  Comment-text proofed using ProoferComments
054610,000019:                                                                                                  ##                              and corrected errors found.
054611,000020: 

Page 1265

054613,000022:                                                                                                  #           THE TFF SUBROUTINES MAY BE USED IN EITHER EARTH OR MOON CENTERED COORDINATES. THE TFF ROUTINES NEVER
054614,000023:                                                                                                  #  KNOW WHICH ORIGIN APPLIES. IT IS THE USER WHO KNOWS, AND WHO SUPPLIES  RONE, VONE AND 1/SQRT(MU)  AT THE
054615,000024:                                                                                                  #  APPROPRIATE SCALE LEVEL FOR THE PROPER PRIMARY BODY.
054616,000025: 
054617,000026:                                                                                                  #           EARTH ORIGIN           POSITION      -29       METERS
054618,000027:                                                                                                  #                                  VELOCITY      -7        METERS/CENTISECOND
054619,000028:                                                                                                  #                                  1/SQRT(MU)    +17       SQRT(CS SQ/METERS CUBED)
054620,000029: 
054621,000030:                                                                                                  #           MOON ORIGIN            POSITION      -27       METERS
054622,000031:                                                                                                  #                                  VELOCITY      -5        METERS/CENTISECONDS
054623,000032:                                                                                                  #                                  1/SQRT(MU)    +14       SQRT(CS SQ/METERS CUBED)
054624,000033: 
054625,000034:                                                                                                  #  ALL DATA PROVIDED TO AND RECEIVED FROM ANY TFF SUBROUTINE WILL BE AT ONE OF THE LEVELS ABOVE. IN ALL CASES,
054626,000035:                                                                                                  #  THE FREE FALL TIME IS RETURNED IN CENTISECONDS AT (-28). PROGRAM  TFF/CONIC  WILL GENERATE VONE/RTMU  AND
054627,000036:                                                                                                  #  LEAVE IT IN  VONE' AT (+10) IF EARTH ORIGIN AND (+9) IF MOON ORIGIN.
054628,000037:                                                                                                  #           THE USER MUST STORE THE STATE VECTOR IN  RONE, VONE  AND MU IN  THE FORM 1/SQRT(MU) IN  TFF/RTMU
054629,000038:                                                                                                  #  AT THE PROPER SCALE BEFORE CALLING  TFF/CONIC. SINCE  RONE, VONE  ARE IN THE EXTENDED VERB STORAGE AREA,
054630,000039:                                                                                                  #  THE USER MUST ALSO LOCK OUT THE EXTENDED VERBS, AND RELEASE THEM WHEN FINISHED.
054631,000040:                                                                                                  #           PROGRAMS     CALC/TFF  AND  CALC/TPER  ASSUME THAT THE TERMINAL RADIUS IS LESS THAN THE PRESENT
054632,000041:                                                                                                  #  RADIUS. THIS RESTRICTION CAN BE REMOVED BY A  15 W CODING CHANGE, BUT AT PRESENT IT IS NOT DEEMED NECESSARY.
054633,000042: 
054634,000043:                                                                                                  #           THE FOLLOWING ERASABLE QUANTITIES ARE USED BY THE TFF ROUTINES, AND ARE LOCATED IN THE PUSH LIST.
054635,000044: 
054636,000045:                                                                                                  #  BELOW      E:   IS USED FOR EARTH ORIGIN SCALE
054637,000046:                                                                                                  #             M:   IS USED FOR MOON  ORIGIN SCALE
054638,000047: 
054639,000048:                                                                                                  # TFFSW          =       119D       BIT1      0 = CALCTFF        1 = CALCTPER
054640,000049: 10,2213                        TFFDELQ            =        10D                                   #             Q2-Q1              E: (-16)  M: (-15)
054641,000050: 10,2213                        RMAG1              =        12D                                   #             ABVAL(RN)  M       E: (-29)  M: (-27)
054642,000051:                                                                                                  # RPER           =       14D                  PERIGEE RADIUS M   E: (-29)  M: (-27)
054643,000052: 10,2213                        TFFQ1              =        14D                                   #             R.V / SQRT(MUE)    E: (-16)  M: (-15)
054644,000053:                                                                                                  # SDELF/2                                     SIN(THETA) /2
054645,000054: 10,2213                        CDELF/2            =        14D                                   #             COS(THETA) /2
054646,000055:                                                                                                  # RAPO           =       16D                  APOGEE RADIUS  M   E: (-29)  M: (-27)
054647,000056: 10,2213                        NRTERM             =        16D                                   #             TERMINAL RADIUS M  E: (-29+NR)
054648,000057:                                                                                                  #                                M: (-27+NR)
054649,000058: 10,2213                        RTERM              =        18D                                   #             TERMINAL RADIUS M  E: (-29)  M: (-27)
054650,000059: 10,2213                        TFFVSQ             =        20D                                   #             -(V SQUARED/MU)  1/M  E: (20)  M: (18)
054651,000060: 10,2213                        TFF1/ALF           =        22D                                   #             SEMI MAJ AXIS  M  E: (-22-2 NA)
054652,000061:                                                                                                  #                               M: (-20-2 NA)
054653,000062: 10,2213                        TFFRTALF           =        24D                                   #             SQRT(ALFA)  E: (10+NA)  M: (9+NA)
054654,000063: 10,2213                        TFFALFA            =        26D                                   #             ALFA  1/M   E: (26-NR)  M: (24-NR)
054655,000064: 10,2213                        TFFNP              =        28D                                   #             SEMI LATUS RECTUM  M  E: (-38+2 NR)
054656,000065:                                                                                                  #                                   M: (-36+2 NR)
054657,000066: 10,2213                        TFF/RTMU           =        30D                                   #             1/SQRT(MU)         E: (17)   M: (14)
054658,000067: 10,2213                        NRMAG              =        32D                                   #             PRESENT RADIUS  M  E: (-29+NR)
054659,000068:                                                                                                  #                                M: (-27+NR)
054660,000069: 10,2213                        TFFX               =        34D                                   
054661,000070: 10,2213                        TFFTEM             =        36D                                   #             TEMPORARY
054662,000071: 

Page 1266

054664,000073:                                                                                                  #                                           REGISTERS S1, S2 ARE UNTOUCHED BY ANY TFF SUBROUTINE
054665,000074:                                                                                                  #                                           INDEX REGISTERS X1, X2 ARE USED BY ALL TFF SUBROUTINES. THEY ARE ESTAB-
054666,000075:                                                                                                  #                                           LISHED IN TFF/CONIC AND MUST BE PRESERVED BETWEEN CALLS TO SUBSEQUENT
054667,000076:                                                                                                  #                                           SUBROUTINES.
054668,000077:                                                                                                  #                                           -NR                             C(X1) = NORM COUNT OF RMAG
054669,000078:                                                                                                  #                                           -NA                             C(X2)= NORM COUNT OF SQRT(ABS(ALFA))
054670,000079: 

Page 1267

054672,000081: 
054673,000082: 
054674,000083:                                                                                                  #  SUBROUTINE NAME:     TFFCONIC                                           DATE:    01.29.67
054675,000084:                                                                                                  #  MOD NO:  0                                                              LOG SECTION:    TIME OF FREE FALL
054676,000085:                                                                                                  #  MOD BY:  RR BAIRNSFATHER
054677,000086:                                                                                                  #  MOD NO:  1           MOD BY:  RR BAIRNSFATHER      DATE:  11 APR 67
054678,000087:                                                                                                  #  MOD NO:  2           MOD BY:  RR BAIRNSFATHER      DATE:  21 NOV 67     ADD MOON MU.
054679,000088:                                                                                                  #  MOD NO:  3           MOD BY:  RR BAIRNSFATHER      DATE:  21 MAR 68     ACCEPT DIFFERENT EARTH/MOON SCALES
054680,000089:                                                                                                  #  FUNCTIONAL DESCRIPTION:      THIS SUBROUTINE IS CALLED TO COMPUTE THOSE CONIC PARAMETERS REQUIRED BY THE TFF
054681,000090:                                                                                                  #           SUBROUTINES AND TO ESTABLISH THEM IN THE PUSH LIST AREA. THE PARAMETERS ARE LISTED UNDER OUTPUT.
054682,000091:                                                                                                  #           THE EQUATIONS ARE
054683,000092:                                                                                                  #                  -   -  -
054684,000093:                                                                                                  #                  H = RN*VN                                               ANGULAR MOMENTUM
054685,000094:                                                                                                  #                        - -
054686,000095:                                                                                                  #                  LCP = H.H / MU                                          SEMI LATUS RECTUM
054687,000096:                                                                                                  #                                -  -
054688,000097:                                                                                                  #                  ALFA = 2/RN - VN.VN / MU                                RECIPROCAL SEMI MAJ AXIS, SIGNED
054689,000098: 
054690,000099:                                                                                                  #           AND ALFA IS POS FOR ELLIPTIC  ORBITS
054691,000100:                                                                                                  #                        0  FOR PARABOLIC ORBITS
054692,000101:                                                                                                  #                       NEG FOR HYPERBOLIC ORBITS.
054693,000102:                                                                                                  #           SUBROUTINE ALSO COMPUTES AND SAVES  RMAG.
054694,000103:                                                                                                  #  CALLING SEQUENCE:
054695,000104:                                                                                                  #           TFFCONIC  EXPECTS CALLER TO ENTER WITH CORRECT GRAVITATIONAL CONSTANT IN MPAC, IN THE FORM
054696,000105:                                                                                                  #           1/SQRT(MU). PROGRAM WILL SAVE IN  TFF/RTMU  . THE SCALE IS DETERMINED BY WHETHER EARTH OR MOON
054697,000106:                                                                                                  #           ORIGIN IS USED.  THE CALLER MUST LOCK OUT THE EXTENDED VERBS BEFORE PROVIDING STATE VECTOR IN RONE,
054698,000107:                                                                                                  #           VONE  AT PROPER SCALE. THE EXTENDED VERBS MUST BE RESTORED WHEN THE CALLER IS FINISHED USING THE
054699,000108:                                                                                                  #           TFF ROUTINES.
054700,000109:                                                                                                  #           ENTRY POINT  TFFCONMU  EXPECTS THAT  TFF/RTMU  IS ALREADY LOADED.
054701,000110:                                                                                                  #           TO SPECIFY MU:      DLOAD  CALL                IF MU ALREADY STORED:    CALL
054702,000111:                                                                                                  #                                      YOURMU       1/RTMU   E: (17)  M: (14)              TFFCONMU
054703,000112:                                                                                                  #                                      TFFCONIC
054704,000113:                                                                                                  #           PUSHLOC = PDL+0, ARBITRARY IF LEQ 18D
054705,000114: 
054706,000115:                                                                                                  #  SUBROUTINES CALLED:  NONE
054707,000116:                                                                                                  #  NORMAL EXIT MODES:   RVQ
054708,000117:                                                                                                  #  ALARMS:  NONE
054709,000118:                                                                                                  #  OUTPUT:  THE FOLLOWING ARE STORED IN THE PUSH LIST AREA.
054710,000119:                                                                                                  #           RMAG1  E:(-29) M:(-27) M  RN, PRESENT RADIUS LENGTH.
054711,000120:                                                                                                  #           NRMAG  E: (-29+NR)     M  RMAG, NORMALIZED
054712,000121:                                                                                                  #                  M: (-27+NR)
054713,000122:                                                                                                  #           X1                     -NR, NORM COUNT
054714,000123:                                                                                                  #           TFFNP  E: (-38+2NR)    M  LCP, SEMI LATUS RECTUM, WEIGHTED BY NR.       FOR VGAMCALC
054715,000124:                                                                                                  #                  M: (-36+2NR)
054716,000125:                                                                                                  #           TFF/RTMU  E:(17)  M:(14)       1/SQRT(MU)
054717,000126:                                                                                                  #           TFFVSQ E:(20)  M:(18)  1/M   -(V SQ/MU): PRESENT VELOCITY,NORMLIZED.    FOR VGAMCALC
054718,000127:                                                                                                  #           TFFALFA  E: (26-NR)    1/M   ALFA, WEIGHTED BY NR
054719,000128:                                                                                                  #                    M: (24-NR)
054720,000129:                                                                                                  #           TFFRTALF  E: (10+NA)   SQRT(ALFA), NORMALIZED
054721,000130:                                                                                                  #                     M: (9+NA)

Page 1268

054723,000132:                                                                                                  #           X2                     -NA, NORM COUNT
054724,000133:                                                                                                  #           TFF1/ALF  E: (-22-2NA) SIGNED SEMI MAJ AXIS, WEIGHTED BY NA
054725,000134:                                                                                                  #                     M: (-20-2NA)
054726,000135:                                                                                                  #           PUSHLOC AT PDL+0
054727,000136:                                                                                                  #           THE FOLLOWING  IS STORED IN GENERAL ERASABLE
054728,000137:                                                                                                  #           VONE'  E:(10)  M:(9)   V/RT(MU), NORMALIZED VELOCITY
054729,000138:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED:
054730,000139:                                                                                                  #           RONE   E:(-29)  M:(-27)  M      STATE VECTOR                   LEFT BY CALLER
054731,000140:                                                                                                  #           VONE   E:(-7)   M:(-5)   M/CS   STATE VECTOR                   LEFT BY CALLER
054732,000141:                                                                                                  #           TFF/RTMU  E:(17)  M:(14)      1/RT(CS SQ/M CUBE)               IF ENTER VIA  TFFCONMU.
054733,000142:                                                                                                  #  DEBRIS:  QPRET,    PDL+0 ... PDL+3
054734,000143: 
054735,000144: 
054736,000145: 33,3575                                           BANK     33                                    
054737,000146: 27,2000                                           SETLOC   TOF-FF                                
054738,000147: 27,2000                                           BANK                                           
054739,000148: 
054740,000149: 27,3363                                           COUNT*   $$/TFF                                
054741,000150: 
054742,000151: 27,3363           00037        TFFCONIC           STORE    TFF/RTMU                              #  1/SQRT(MU)       E: (17)   M: (14)
054743,000152: 
054744,000153: 27,3364           53575        TFFCONMU           VLOAD    UNIT                                  #  COME HERE WITH TFFRTMU LOADED.
054745,000154: 27,3365           02200                                    RONE                                  #  SAVED RN.  M     E: (-29)  M: (-27)
054746,000155: 27,3366           77725                           PDDL                                           #  UR/2 TO PDL+0, +5
054747,000156: 27,3367           00045                                    36D                                   #  MAGNITUDE
054748,000157: 27,3370           00015                           STORE    RMAG1                                 #  M    E: (-29)   M: (-27)
054749,000158: 
054750,000159: 27,3371           77701                           NORM                                           
054751,000160: 27,3372           00047                                    X1                                    #  -NR
054752,000161: 27,3373           24041                           STOVL    NRMAG                                 #  RMAG  M   E: (-29+NR)  M: (-27+NR)
054753,000162: 27,3374           02206                                    VONE                                  #  SAVED VN.  M/CS   E: (-7)   M: (-5)
054754,000163: 27,3375           77761                           VXSC                                           
054755,000164: 27,3376           00037                                    TFF/RTMU                              #  E: (17)   M: (14)
054756,000165: 27,3377           02161                           STORE    VONE'                                 #  VN/SQRT(MU)   E: (10)   M: (9)
054757,000166: 
054758,000167: 27,3400           47361                           VXSC     VXV                                   
054759,000168: 27,3401           00041                                    NRMAG                                 #  E: (-29+NR)  M: (-27+NR)
054760,000169:                                                                                                  #  UR/2 FROM PDL
054761,000170: 27,3402           47572                           VSL1     VSQ                                   #  BEFORE:  E:(-19+NR)  M:(-18+NR)
054762,000171: 27,3403           14035                           STODL    TFFNP                                 #  LC P  M   E:(-38+2NR)  M:(-36+2NR)
054763,000172:                                                                                                  #  SAVE ALSO FOR VGAMCALC
054764,000173: 27,3404           06475                                    TFF1/4                                
054765,000174: 27,3405           63271                           DDV      PDVL                                  #  (2/RMAG)  1/M   E:(26-NR)   M:(24-NR)
054766,000175: 27,3406           00041                                    NRMAG                                 #  RMAG  M   E:(-29+NR)  M:(-27+NR)
054767,000176: 27,3407           02161                                    VONE'                                 #  SAVED VN.   E: (10)   M: (9)
054768,000177: 27,3410           57436                           VSQ      DCOMP                                 #  KEEP MPAC+2 HONEST FOR SQRT.
054769,000178: 27,3411           00025                           STORE    TFFVSQ                                #  -(V SQ/MU)   E:(20)   M:(18)
054770,000179:                                                                                                  #  SAVE FOR VGAMCALC
054771,000180: 27,3412           43257                           SR*      DAD                                   

Page 1269

054773,000182: 27,3413           20573                                    0          -6,1                       #  GET -VSQ/MU   E:(26-NR)   M:(24-NR)
054774,000183: 27,3414           77626                           STADR                                          
054775,000184:                                                                                                  #  2/RMAG   FROM PDL+2
054776,000185: 27,3415           77744                           STORE    TFFALFA                               #  ALFA  1/M   E:(26-NR)   M:(24-NR)
054777,000186: 27,3416           41457                           SL*      PUSH                                  #  TEMP SAVE ALFA    E:(20)   M:(18)
054778,000187: 27,3417           20173                                    0          -6,1                       
054779,000188: 27,3420           75446                           ABS      SQRT                                  #  E:(10)   M:(9)
054780,000189: 27,3421           77701                           NORM                                           
054781,000190: 27,3422           00050                                    X2                                    #  X2 = -NA
054782,000191: 27,3423           00031                           STORE    TFFRTALF                              #  SQRT( ABS(ALFA) )  E:(10+NA)   M:(9+NA)
054783,000192: 27,3424           75316                           DSQ      SIGN                                  #  NOT SO ACCURATE, BUT OK
054784,000193:                                                                                                  #  ALFA FROM PDL+2   E:(20)   M:(18)
054785,000194: 27,3425           55254                           BZE      BDDV                                  #  SET 1/ALFA =0, TO SHOW SMALL ALFA
054786,000195: 27,3426           57430                                    +2                                    
054787,000196: 27,3427           06475                                    TFF1/4                                
054788,000197: 27,3430           00027                 +2        STORE    TFF1/ALF                              #  1/ALFA   E:(-22-2 NA)   M:(-20-2 NA)
054789,000198: 27,3431           77616        DUMPCNIC           RVQ                                            
054790,000199: 
054791,000200:                                                                                                  #                          39 W
054792,000201: 

Page 1270

054794,000203:                                                                                                  #  SUBROUTINE NAME:     TFFRP/RA                                           DATE:  01.17.67
054795,000204:                                                                                                  #  MOD NO:  0                                                              LOG SECTION:    TIME OF FREE FALL
054796,000205:                                                                                                  #  MOD BY:  RR BAIRNSFATHER
054797,000206:                                                                                                  #  MOD NO:  1           MOD BY:  RR BAIRNSFATHER      DATE:  11 APR 67
054798,000207:                                                                                                  #  MOD NO:  2           MOD BY:  RR BAIRNSFATHER      DATE:  21 MAR 68     ACCEPT DIFFERENT EARTH/MOON SCALES
054799,000208:                                                                                                  #                                                                          ALSO IMPROVE ACCURACY OF RAPO.
054800,000209:                                                                                                  #  FUNCTIONAL DESCRIPTION:         USED BY CALCTPER AND TFF DISPLAYS TO CALCULATE PERIGEE RADIUS AND ALSO
054801,000210:                                                                                                  #           APOGEE RADIUS FOR A GENERAL CONIC.
054802,000211:                                                                                                  #           PROGRAM GIVES PERIGEE RADIUS AS               APOGEE RADIUS IS GIVEN BY
054803,000212:                                                                                                  #                  RP = P /(1+E)                                 RA = (1+E) / ALFA
054804,000213:                                                                                                  #           WHERE   2
054805,000214:                                                                                                  #                  E  = 1 - P ALFA
054806,000215:                                                                                                  #           IF RA IS NEGATIVE OR SHOWS DIVIDE OVERFLOW, THEN RA = POSMAX BECAUSE
054807,000216:                                                                                                  #                  1. APOGEE RADIUS IS NOT MEANINGFUL FOR HYPERBOLA
054808,000217:                                                                                                  #                  2. APOGEE RADIUS IS NOT DEFINED FOR PARABOLA
054809,000218:                                                                                                  #                  3. APOGEE RADIUS EXCEEDS THE SCALING FOR ELLIPSE.
054810,000219:                                                                                                  #           THIS SUBROUTINE REQUIRES THE SIGNED  RECIPROCAL SEMI MAJ AXIS,  ALFA,  AND SEMI LATUS RECTUM AS DATA.
054811,000220:                                                                                                  #  CALLING SEQUENCE:  CALL
054812,000221:                                                                                                  #                            TFFRP/RA
054813,000222:                                                                                                  #           PUSHLOC = PDL+0, ARBITRARY IF LEQ 10D
054814,000223:                                                                                                  #           C(MPAC) UNSPECIFIED
054815,000224: 
054816,000225:                                                                                                  #  SUBROUTINES CALLED:  NONE
054817,000226:                                                                                                  #  NORMAL EXIT MODE:    RVQ
054818,000227:                                                                                                  #           IF ELLIPSE, WITHIN NORMAL SCALING, RAPO IS CORRECT.
054819,000228:                                                                                                  #           OTHERWISE, RAPO = POSMAX.
054820,000229:                                                                                                  #  ALARMS:  NONE
054821,000230:                                                                                                  #  OUTPUT:  STORED IN PUSH LIST AREA. SCALE OF OUTPUT AGREES WITH DATA SUPPLIED TO  TFF/CONIC.
054822,000231:                                                                                                  #           RPER   E:(-29)  M:(-27)  M     PERIGEE RADIUS                  DESTROYED BY CALCTFF/CALCTPER, TFFTRIG.
054823,000232:                                                                                                  #           RAPO   E:(-29)  M:(-27)  M     APOGEE  RADIUS                  WILL BE DESTROYED BY CALCTFF/CALCTPER
054824,000233:                                                                                                  #           PUSHLOC AT PDL+0
054825,000234:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED:
054826,000235:                                                                                                  #           TFFALFA E:(26-NR)      M   1/SEMI MAJ AXIS                     LEFT BY TFFCONIC
054827,000236:                                                                                                  #                   M:(24-NR)
054828,000237:                                                                                                  #           TFFNP  E: (-38+2NR)    M  LC P, SEMI LATUS RECTUM              LEFT BY TFFCONIC
054829,000238:                                                                                                  #                  M: (-36+2NR)
054830,000239:                                                                                                  #           X1                     -NR, NORM COUNT OF RMAG                 LEFT BY TFFCONIC
054831,000240:                                                                                                  #           X2                     -NA, NORM COUNT OF ALFA                 LEFT BY TFFCONIC
054832,000241:                                                                                                  #  DEBRIS:  QPRET,    PDL+0 ... PDL+1
054833,000242: 

Page 1271

054835,000244: 27,3432                        RAPO               =        16D                                   #  APOGEE RADIUS  M  E:(-29)  M:(-27)
054836,000245: 27,3432                        RPER               =        14D                                   #  PERIGEE RADIUS  M  E:(-29)  M:(-27)
054837,000246: 
054838,000247: 27,3432           41345        TFFRP/RA           DLOAD    DMP                                   
054839,000248: 27,3433           00033                                    TFFALFA                               #  ALFA  1/M  E:(26-NR)   M:(24-NR)
054840,000249: 27,3434           00035                                    TFFNP                                 #  LC P  M   E:(-38+2NR)   M:(-36+2NR)
054841,000250: 27,3435           57457                           SR*      DCOMP                                 #  ALFA P (-12+NR)
054842,000251: 27,3436           20571                                    0          -8D,1                      #  ALFA P  (-4)
054843,000252: 27,3437           51415                           DAD      ABS                                   #  (DCOMP GIVES VALID TP RESULT FOR SQRT)
054844,000253:                                                                                                  #  (ABS PROTECTS SQRT IF E IS VERY NEAR 0)
054845,000254: 27,3440           17770                                    DP2(-4)                               
054846,000255: 27,3441           43366                           SQRT     DAD                                   #  E SQ = (1- P ALFA)   (-4)
054847,000256: 27,3442           06475                                    TFF1/4                                
054848,000257: 27,3443           55206                           PUSH     BDDV                                  #  (1+E)  (-2)  TO PDL+0
054849,000258: 27,3444           00035                                    TFFNP                                 #  LCP  M E:(-38+2NR)   M:(-36+2NR)
054850,000259: 27,3445           53657                           SR*      SR*                                   #  (DOES SR THEN SL TO AVOID OVFL)
054851,000260: 27,3446           20601                                    0,1                                   #  X1=-NR
054852,000261: 27,3447           20572                                    0          -7,1                       #  (EFFECTIVE SL)
054853,000262: 27,3450           14017                           STODL    RPER                                  #  PERIGEE RADIUS  M   E:(-29)   M:(-27)
054854,000263:                                                                                                  #  (1+E)  (-2)   FROM PDL+0
054855,000264: 27,3451           41005                           DMP      BOVB                                  
054856,000265: 27,3452           00027                                    TFF1/ALF                              #  E:(-22-2NA)  M:(-20-2NA)
054857,000266: 27,3453           57756                                    TCDANZIG                              #  CLEAR OVFIND, IF ON.
054858,000267: 27,3454           53654                           BZE      SL*                                   
054859,000268: 27,3455           57464                                    MAXRA                                 #  SET POSMAX, IF ALFA=0
054860,000269: 27,3456           57603                                    0          -5,2                       #  -5+NA
054861,000270: 27,3457           40057                           SL*      BOV                                   
054862,000271: 27,3460           57576                                    0,2                                   
054863,000272: 27,3461           57464                                    MAXRA                                 #  SET POSMAX IF OVFL.
054864,000273: 27,3462           77644                           BPL                                            #  CONTINUE WITH VALID RAPO.
054865,000274: 27,3463           57466                                    +3                                    
054866,000275: 27,3464           77745        MAXRA              DLOAD                                          #  RAPO CALC IS NOT VALID. SET RAPO =
054867,000276: 27,3465           17774                                    NEARONE                               #  POSMAX AS A TAG.
054868,000277: 27,3466           00021                 +3        STORE    RAPO                                  #  APOGEE RADIUS  M   E:(-29)   M:(-27)
054869,000278: 27,3467           77616        DUMPRPRA           RVQ                                            
054870,000279: 
054871,000280:                                                                                                  #                          30 W
054872,000281: 

Page 1272

054874,000283:                                                                                                  #  SUBROUTINE NAME:     CALCTPER  /  CALCTFF                               DATE:    01.29.67
054875,000284:                                                                                                  #  MOD NO:  0                                                              LOG SECTION:    TIME OF FREE FALL
054876,000285:                                                                                                  #  MOD BY:  RR BAIRNSFATHER
054877,000286:                                                                                                  #  MOD NO:  1           MOD BY:  RR BAIRNSFATHER      DATE:  21 MAR 67
054878,000287:                                                                                                  #  MOD NO:  2           MOD BY:  RR BAIRNSFATHER      DATE:  14 APR 67
054879,000288:                                                                                                  #  MOD NO:  3           MOD BY:  RR BAIRNSFATHER      DATE:  8JUL 67       NEAR EARTH MUE AND NEG TFF (GONEPAST)
054880,000289:                                                                                                  #  MOD NO:  4           MOD BY:  RR BAIRNSFATHER      DATE:  21 NOV 67     ADD VARIABLE MU.
054881,000290:                                                                                                  #  MOD NO:  5           MOD BY:  RR BAIRNSFATHER      DATE:  21 MAR 68     ACCEPT DIFFERENT EARTH/MOON SCALES
054882,000291:                                                                                                  #  FUNCTIONAL DESCRIPTION:      PROGRAM CALCULATES THE FREE-FALL TIME OF FLIGHT FROM PRESENT POSITION  RN  AND
054883,000292:                                                                                                  #           VELOCITY  VN  TO A RADIUS LENGTH SPECIFIED BY  RTERM  , SUPPLIED BY THE USER. THE POSITION VECTOR
054884,000293:                                                                                                  #           RN  MAY BE ON EITHER SIDE OF THE CONIC, BUT  RTERM  IS CONSIDERED ON THE INBOUND SIDE.
054885,000294:                                                                                                  #           THE EQUATIONS ARE
054886,000295: 
054887,000296:                                                                                                  #                  Q2 = -SQRT(RTERM (2-RTERM ALFA) - LCP)    (INBOUND SIDE))        LEQ +- LCE/SQRT(ALFA)
054888,000297:                                                                                                  #                       -  -
054889,000298:                                                                                                  #                  Q1 = RN.VN / SQRT(MU)                                            LEQ +- LCE/SQRT(ALFA)
054890,000299: 
054891,000300:                                                                                                  #                  Z = NUM / DEN                                                    LEQ +- 1/SQRT(ALFA)
054892,000301: 
054893,000302:                                                                                                  #           WHERE, IF INBOUND
054894,000303:                                                                                                  #                  NUM = RTERM - RN                                                 LEQ +- 2 LCE/ALFA
054895,000304:                                                                                                  #                  DEN = Q2+Q1                                                      LEQ +- 2 LCE/SQRT(ALFA)
054896,000305: 
054897,000306:                                                                                                  #           AND, IF OUTBOUND
054898,000307:                                                                                                  #                  NUM = Q2-Q1                                                      LEQ +- 2 LCE/SQRT(ALFA)
054899,000308:                                                                                                  #                  DEN = 2 - ALFA (RTERM + RN) .                                    LEQ +- 2 LCE
054900,000309: 
054901,000310:                                                                                                  #           IF     ALFA ZZ  <  1.0               (FOR ALL CONICS EXCEPT ELLIPSES HAVING ABS(DEL ECC ANOM) G 90 DEG)
054902,000311: 
054903,000312:                                                                                                  #           THEN   X = ALFA Z Z
054904,000313:                                                                                                  #           AND    TFF = (RTERM +RN -2 ZZ T(X) ) Z/SQRT(MU)
054905,000314: 
054906,000315:                                                                                                  #                  EXCEPT IF ALFA PNZ, AND IF TFF NEG,
054907,000316:                                                                                                  #                  THEN   TFF = 2 PI /(ALFA SQRT(ALFA)) + TFF
054908,000317: 
054909,000318:                                                                                                  #           OR IF  ALFA ZZ  GEQ  1.0             (FOR ELLIPSES HAVING ABS(DEL ECC ANOM) GEQ 90 DEG)
054910,000319: 
054911,000320:                                                                                                  #           THEN   X = 1/ALFA Z Z
054912,000321:                                                                                                  #           AND    TFF = (PI/SQRT(ALFA) -Q2 +Q1 +2(X T(X) -1) /ALFA Z) /ALFA SQRT(MU)
054913,000322: 
054914,000323:                                                                                                  #           WHERE  T(X) IS A POLYNOMIAL APPROXIMATION TO THE SERIES
054915,000324:                                                                                                  #                             2     3                        2
054916,000325:                                                                                                  #                  1/3 -X/5 +X /7 -X /9 ...                (X   <  1.0)
054917,000326: 
054918,000327:                                                                                                  #  CALLING SEQUENCE:  TIME TO RTERM                           TIME TO PERIGEE
054919,000328:                                                                                                  #                     CALL                                    CALL
054920,000329:                                                                                                  #                            CALCTFF                                 CALCTPER
054921,000330:                                                                                                  #                     C(MPAC) = TERMNL RAD  M                 C(MPAC) = PERIGEE RAD  M
054922,000331:                                                                                                  #           FOR EITHER,   E: (-29)    M: (-27)
054923,000332:                                                                                                  #           FOR EITHER, PUSHLOC = PDL+0, ARBITRARY IF LEQ 8D.
054924,000333: 

Page 1273

054926,000335:                                                                                                  #  SUBROUTINES CALLED:  T(X),  VIA RTB
054927,000336:                                                                                                  #  NORMAL EXIT MODE:  RVQ
054928,000337:                                                                                                  #           HOWEVER, PROGRAM EXITS WITH ONE OF THE FOLLOWING VALUES FOR TFF (-28) CS  IN MPAC. USER MUST STORE.
054929,000338:                                                                                                  #                  A.  TFF= FLIGHT TIME. NORMAL CASE FOR POSITIVE FLIGHT TIME LESS THAN ONE ORBITAL PERIOD.
054930,000339:                                                                                                  #                  B.  (THIS OPTION IS NO LONGER USED.)
054931,000340:                                                                                                  #                  C.  TFF = POSMAX.  THIS INDICATES THAT THE CONIC FROM THE PRESENT POSITION WILL NOT RETURN TO
054932,000341:                                                                                                  #                      THE SPECIFIED ALTITUDE.  ALSO INDICATES OUTBOUND PARABOLA OR HYPERBOLA.
054933,000342:                                                                                                  #  OUTPUT:  C(MPAC)  (-28)  CS     TIME OF FLIGHT, OR TIME TO PERIGEE
054934,000343:                                                                                                  #           TFFX    (0)            X,                                      LEFT FOR ENTRY DISPLAY TFF ROUTINES
054935,000344:                                                                                                  #           NRTERM  E: (-29+NR)    M  RTERM, WEIGHTED BY NR                LEFT FOR ENTRY DISPLAY TFF ROUTINES
054936,000345:                                                                                                  #                   M: (-27+NR)
054937,000346:                                                                                                  #           TFFTEM  E: (-59+2NR)   LCP Z Z SGN(SDELF)                      LEFT FOR ENTRY DISPLAY TFF ROUTINES
054938,000347:                                                                                                  #                   M: (-55+2NR)   LCP /ALFA SGN(SDELF)                    LEFT FOR ENTRY DISPLAY TFF ROUTINES
054939,000348:                                                                                                  #           NOTE:  TFFTEM = PDL 36D AND WILL BE DESTROYED BY .:UNIT:.
054940,000349:                                                                                                  #           RMAG1  E:(-29)  M:(-27)  PDL 12 NOT TOUCHED.
054941,000350:                                                                                                  #           TFFQ1  E:(-16)  M:(-15)  PDL 14D
054942,000351:                                                                                                  #           TFFDELQ E:(-16) M:(-15)  PDL 10D
054943,000352:                                                                                                  #           PUSHLOC AT PDL+0
054944,000353:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED:
054945,000354:                                                                                                  #           RONE   E:(-29)  M:(-27)  M   STATE VECTOR                      LEFT BY USER
054946,000355:                                                                                                  #           VONE'  E:(+10)  M:(+9)   VN/SQRT(MU)                           LEFT BY TFF/CONIC
054947,000356:                                                                                                  #           RMAG1  E:(-29)  M:(-27)  PRESENT RADIUS,  M                    LEFT BY TFFCONIC
054948,000357:                                                                                                  #           C(MPAC)E:(-29)  M:(-27)  RTERM, TERMINAL RADIUS LENGTH, M      LEFT BY USER
054949,000358: 
054950,000359:                                                                                                  #           THE FOLLOWING ARE STORED IN THE PUSH LIST AREA.
054951,000360:                                                                                                  #           TFF/RTMU  E:(17)  M:(14)  1/SQRT(MU)                           LEFT BY TFFCONIC.
054952,000361:                                                                                                  #           NRMAG  E: (-29+NR)  M  RMAG, NORMALIZED                        LEFT BY TFFCONIC
054953,000362:                                                                                                  #                  M: (-27+NR)
054954,000363:                                                                                                  #           X1                     -NR, NORM COUNT                         LEFT BY TFFCONIC
054955,000364:                                                                                                  #           TFFNP  E: (-38+2NR)  M   LCP, SEMI LATUS RECTUM, WEIGHT  NR    LEFT BY TFFCONIC
054956,000365:                                                                                                  #                  M: (-36+2NR)
054957,000366:                                                                                                  #           TFFALFA  E: (26-NR)    1/M  ALFA, WEIGHT  NR                   LEFT BY TFFCONIC
054958,000367:                                                                                                  #                    M: (24-NR)
054959,000368:                                                                                                  #           TFFRTALF  E:(10+NA)    SQRT(ALFA), NORMALIZED                  LEFT BY TFFCONIC
054960,000369:                                                                                                  #                     M:(9+NA)
054961,000370:                                                                                                  #           X2                     -NA, NORM COUNT                         LEFT BY TFFCONIC
054962,000371:                                                                                                  #           TFF1/ALF  E: (-22-2NA)  SIGNED SEMIMAJ AXIS, WEIGHTED BY NA    LEFT BY TFFCONIC
054963,000372:                                                                                                  #                     M: (-20-2NA)
054964,000373:                                                                                                  #  DEBRIS:  QPRET,   PDL+0 ... PDL+3
054965,000374:                                                                                                  #           RTERM  E:(-29)  M:(-27)   RTERM, TERMINAL RADIUS LENGTH
054966,000375:                                                                                                  #           RAPO   E:(-29)  M:(-27)   PDL 16D  (=NRTERM)
054967,000376:                                                                                                  #           RPER   E:(-29)  M:(-27)   PDL 14D   (=TFFQ1)
054968,000377: 

Page 1274

054970,000379: 27,3470           77614        CALCTPER           SETGO                                          #  ENTER WITH RPER  IN MPAC
054971,000380: 27,3471           03436                                    TFFSW                                 
054972,000381: 27,3472           57475                                    +3                                    
054973,000382: 27,3473           77614        CALCTFF            CLEAR                                          #  ENTER WITH RTERM IN MPAC
054974,000383: 27,3474           03676                                    TFFSW                                 
054975,000384: 27,3475           00023                 +3        STORE    RTERM                                 #  E: (-29)  M: (-27)
054976,000385: 27,3476           77657                           SL*                                            
054977,000386: 27,3477           20201                                    0,1                                   #  X1=-NR
054978,000387: 27,3500           00021                           STORE    NRTERM                                #  RTERM  E: (-29+NR)  M: (-27+NR)
054979,000388: 27,3501           44205                           DMP      BDSU                                  
054980,000389: 27,3502           00033                                    TFFALFA                               #  ALFA  E: (26-NR)  M: (24-NR)
054981,000390: 27,3503           06475                                    TFF1/4                                
054982,000391: 27,3504           41206                           PUSH     DMP                                   #  (2-ALFA RTERM)  (-3)  TO PDL+0
054983,000392: 27,3505           00021                                    NRTERM                                #  E: (-29+NR)  M: (-27+NR)
054984,000393: 27,3506           53725                           PDDL     SR*                                   #  RTERM(2-ALFA RTERM) TO PDL+2
054985,000394:                                                                                                  #  E: (-32+NR)   M: (-30+NR)
054986,000395: 27,3507           00035                                    TFFNP                                 #  LC P  E:(-38+2NR)  M:(-36+2NR)
054987,000396: 27,3510           20573                                    0          -6,1                       #  X1 = -NR
054988,000397: 27,3511           43276                           DCOMP    DAD                                   #  DUE TO SHIFTS, KEEP PRECISION FOR SQRT
054989,000398:                                                                                                  #  RTERM(2-ALFA RTERM) FROM PDL+2
054990,000399:                                                                                                  #  E: (-32+NR)  M: (-30+NR)
054991,000400: 27,3512           77657                           SR*                                            #  LEAVE  E: (-32)  M: (-30)
054992,000401: 27,3513           20601                                    0,1                                   #  X1 = -NR
054993,000402: 27,3514           71214                           BOFF     DLOAD                                 #  CHECK TFF / TPER SWITCH
054994,000403: 27,3515           03756                                    TFFSW                                 
054995,000404: 27,3516           57520                                    +2                                    #  IF TFF, CONTINUE
054996,000405: 27,3517           06505                                    TFFZEROS                              #  IF TPER, SET Q2 = 0
054997,000406: 27,3520           75440                 +2        BMN      SQRT                                  #  E: (-16)  M: (-15)
054998,000407: 
054999,000408: 27,3521           57653                                    MAXTFF1                               #  NO FREE FALL CONIC TO RTERM FROM HERE
055000,000409:                                                                                                  #  RESET PDL, SET TFF=POSMAX, AND EXIT.
055001,000410: 
055002,000411: 27,3522           41076                           DCOMP    BOVB                                  #  RT IS ON INBOUND SIDE.  ASSURE OVFIND=0
055003,000412: 27,3523           57756                                    TCDANZIG                              #  ANY PORT IN A STORM.
055004,000413: 27,3524           24045                           STOVL    TFFTEM                                #  Q2   E: (-16)  M: (-15)
055005,000414: 27,3525           02161                                    VONE'                                 #  VN/SQRT(MU) E: (10)  M: (9)
055006,000415: 27,3526           52441                           DOT      SL3                                   
055007,000416: 27,3527           02200                                    RONE                                  #  SAVED RN.  E: (-29)  M: (-27)
055008,000417: 27,3530           00017                           STORE    TFFQ1                                 #  Q1, SAVE FOR GONEPAST TEST.
055009,000418:                                                                                                  #  E: (-16)  M: (-15)
055010,000419: 27,3531           44240                           BMN      BDSU                                  
055011,000420: 27,3532           57553                                    INBOUND                               #  USE ALTERNATE Z
055012,000421: 27,3533           00045                                    TFFTEM                                #  Q2  E: (-16)  M: (-15)
055013,000422: 
055014,000423:                                                                                                  #                                          OUTBOUND Z CALC CONTINUES HERE
055015,000424: 
055016,000425: 27,3534           14043                           STODL    TFFX                                  #  NUM=Q2-Q1  E: (-16)  M: (-15)
055017,000426: 27,3535           00033                                    TFFALFA                               #  ALFA  E: (26-NR)  M: (24-NR)
055018,000427: 27,3536           44205                           DMP      BDSU                                  

Page 1275

055020,000429: 27,3537           00041                                    NRMAG                                 #  RMAG  E: (-29+NR)  M: (-27+NR)
055021,000430:                                                                                                  #  (2-RTERM ALFA)  (-3) FROM PDL+0
055022,000431: 27,3540           51406        SAVEDEN            PUSH     ABS                                   #  DEN TO PDL+0  E: (-3) OR (-16)
055023,000432:                                                                                                  #                M: (-3) OR (-15)
055024,000433: 27,3541           40015                           DAD      BOV                                   #  INDETERMINANCY TEST
055025,000434: 27,3542           17762                                    LIM(-22)                              #  =1.0-B(-22)
055026,000435: 27,3543           57564                                    TFFXTEST                              #  GO IF DEN >/= B(-22)
055027,000436: 27,3544           65345                           DLOAD    PDDL                                  #  SET DEN=0  OTHERWISE
055028,000437: 27,3545           06505                                    TFFZEROS                              
055029,000438:                                                                                                  #  XCH ZERO WITH PDL+0
055030,000439: 27,3546           57545                           DLOAD    DCOMP                                 
055031,000440: 27,3547           00033                                    TFFALFA                               #  ALFA  E: (26-NR)  M: (24-NR)
055032,000441: 27,3550           71240                           BMN      DLOAD                                 #  FOR TPER: Z INDET AT DELE/2=0 AND 90.
055033,000442: 27,3551           57660                                    TFFEL1                                #  ASSUME 90, AND LEAVE 0 IN PDL: 1/Z=D/N
055034,000443: 
055035,000444:                                                                                                  #  Z INDET. AT PERIGEE FOR PARAB OR HYPERB.
055036,000445: 27,3552           77616        DUMPTFF1           RVQ                                            #  RETURN  TFF =0
055037,000446: 
055038,000447:                                                                                                  #                                          INBOUND Z CALC CONTINUES HERE
055039,000448: 27,3553           77745        INBOUND            DLOAD                                          #  RESET PDL+0
055040,000449: 27,3554           45345                           DLOAD    DSU                                   #  ALTERNATE Z CALC
055041,000450: 27,3555           00023                                    RTERM                                 #  E: (-29)  M: (-27)
055042,000451: 27,3556           00015                                    RMAG1                                 #  E: (-29)  M: (-27)
055043,000452: 27,3557           14043                           STODL    TFFX                                  #  NUM=RTERM-RN  E: (-29)  M: (-27)
055044,000453: 27,3560           00045                                    TFFTEM                                #  Q2  E: (-16)  M: (-15)
055045,000454: 27,3561           52015                           DAD      GOTO                                  
055046,000455: 27,3562           00017                                    TFFQ1                                 #  Q1  E: (-16)  M: (-15)
055047,000456: 27,3563           57540                                    SAVEDEN                               #  DEN = Q2+Q1   E: (-16)  M: (-15)
055048,000457: 
055049,000458: 27,3564           65215        TFFXTEST           DAD      PDDL                                  #   (ABS(DEN) TO PDL+2))  E: (-3) OR (-16)
055050,000459:                                                                                                  #                         M: (-3) OR (-15)
055051,000460: 27,3565           17764                                    DP(-22)                               #  RESTORE ABS(DEN) TO MPAC
055052,000461: 27,3566           00043                                    TFFX                                  #  NUM E:(-16) OR (-29)  M:(-15) OR (-27)
055053,000462: 27,3567           53605                           DMP      SR*                                   
055054,000463: 27,3570           00031                                    TFFRTALF                              #  SQRT(ALFA)  E: (10+NA)  M: (9+NA)
055055,000464: 27,3571           57201                                    0          -3,2                       #  X2=-NA
055056,000465: 27,3572           77671                           DDV                                            #  C(MPAC) =NUM SQRT(ALFA)  E:(-3) OR (-16)
055057,000466:                                                                                                  #                           M:(-3) OR (-15)
055058,000467:                                                                                                  #  ABS(DEN) FROM PDL+2  E:(-3) OR (-16)
055059,000468:                                                                                                  #                       M:(-3) OR (-15)
055060,000469: 27,3573           40145                           DLOAD    BOV                                   #  (THE DLOAD IS SHARED WITH TFFELL)
055061,000470: 27,3574           00043                                    TFFX                                  #  NUM  E: (-16) OR (-29)  M:(-15) OR (-27)
055062,000471: 27,3575           57656                                    TFFELL                                #  USE EQN FOR DELE GEQ 90, LEQ -90
055063,000472: 
055064,000473:                                                                                                  #                                          OTHERWISE, CONTINUE FOR GENERAL CONIC FOR TFF EQN
055065,000474: 
055066,000475: 27,3576           45471                           DDV      STADR                                 
055067,000476:                                                                                                  #  DEN FROM PDL+0   E: (-3) OR (-16)
055068,000477:                                                                                                  #                   M: (-3) OR (-15)
055069,000478: 27,3577           77732                           STORE    TFFTEM                                #  Z  SAVE FOR SIGN OF SDELF.

Page 1276

055071,000480:                                                                                                  #  E: (-13)  M: (-12)
055072,000481: 27,3600           63406                           PUSH     DSQ                                   #  Z TO PDL+0
055073,000482: 27,3601           41206                           PUSH     DMP                                   #  Z SQ TO PDL+2  E: (-26)  M: (-24)
055074,000483: 27,3602           00035                                    TFFNP                                 #  LC P  E: (-38+2NR)  M: (-36+2NR)
055075,000484: 27,3603           75261                           SL       SIGN                                  
055076,000485: 27,3604           20206                                    5                                     
055077,000486: 27,3605           00045                                    TFFTEM                                #  AFFIX SIGN FOR SDELF (ENTRY DISPLAY)
055078,000487: 27,3606           14045                           STODL    TFFTEM                                #  P ZSQ  E: (-59+2NR)  M: (-55+2NR)
055079,000488:                                                                                                  #  (ARG IS USED IN TFF/TRIG)
055080,000489:                                                                                                  #  ZSQ FROM PDL+2   E: (-26)  M: (-24)
055081,000490: 27,3607           41206                           PUSH     DMP                                   #  RESTORE PUSH LOC
055082,000491: 27,3610           00033                                    TFFALFA                               #  ALFA  E: (26-NR)  M: (24-NR)
055083,000492: 27,3611           77657                           SL*                                            
055084,000493: 27,3612           20201                                    0,1                                   #  X1=-NR
055085,000494: 27,3613           00043                           STORE    TFFX                                  #  X
055086,000495: 27,3614           41234                           RTB      DMP                                   
055087,000496: 27,3615           57740                                    T(X)                                  #   POLY
055088,000497:                                                                                                  #  ZSQ FROM PDL+2  E: (-26)  M: (-24)
055089,000498: 27,3616           44302                           SR2      BDSU                                  #  2 ZSQ T(X)  E: (-29)  M: (-27)
055090,000499: 27,3617           00023                                    RTERM                                 #  RTERM  E: (-29)  M: (-27)
055091,000500: 27,3620           41215                           DAD      DMP                                   
055092,000501: 27,3621           00015                                    RMAG1                                 #  E: (-29)  M: (-27)
055093,000502:                                                                                                  #  Z FROM PDL+0  E: (-13)  M: (-12)
055094,000503: 27,3622           51042                           SR3      BPL                                   #  TFF SQRT(MU)   E: (-45)  M: (-42)
055095,000504: 27,3623           57644                                    ENDTFF                                #  (NO PUSH UP)
055096,000505: 27,3624           75206                           PUSH     SIGN                                  #  TFF SQRT(MU)  TO PDL+0
055097,000506: 27,3625           00017                                    TFFQ1                                 #  Q1 FOR GONEPAST TEST
055098,000507: 27,3626           71244                           BPL      DLOAD                                 #  GONE PAST ?
055099,000508: 27,3627           57650                                    NEGTFF                                #  YES. TFF < 0 .
055100,000509: 27,3630           00027                                    TFF1/ALF                              #  1/ALFA  E: (-22-2NA)  M: (-20-2NA)
055101,000510: 27,3631           51076                           DCOMP    BPL                                   #  ALFA > 0 ?
055102,000511: 27,3632           57650                                    NEGTFF                                #  NO. TFF IS NEGATIVE.
055103,000512: 
055104,000513:                                                                                                  #                                          CORRECT FOR ORBITAL PERIOD.
055105,000514: 
055106,000515: 27,3633           77676                           DCOMP                                          #  YES. CORRECT FOR ORB PERIOD.
055107,000516: 27,3634           56205                           DMP      DDV                                   
055108,000517: 27,3635           17760                                    PI/16                                 #  2 PI (-5)
055109,000518: 27,3636           00031                                    TFFRTALF                              #  SQRT(ALFA)  E: (10+NA)  M: (9+NA)
055110,000519: 27,3637           53657                           SL*      SL*                                   
055111,000520: 27,3640           57602                                    0          -4,2                       #  X2=-NA
055112,000521: 27,3641           57602                                    0          -4,2                       
055113,000522: 27,3642           43257                           SL*      DAD                                   
055114,000523: 27,3643           57576                                    0,2                                   
055115,000524:                                                                                                  #  TFF SQRT(MU) FROM PDL+0  E:(-45) M:(-42)
055116,000525: 27,3644           40005        ENDTFF             DMP      BOV                                   #  TFF SQRT(MU) IN MPAC     E:(-45) M:(-42)
055117,000526: 27,3645           00037                                    TFF/RTMU                              #  E: (17)  M: (14)
055118,000527: 27,3646           57654                                    MAXTFF                                #  SET POSMAX IF OVFL.
055119,000528: 
055120,000529: 27,3647           77616        DUMPTFF2           RVQ                                            #  RETURN  TFF   (-28) CS IN MPAC.
055121,000530: 

Page 1277

055123,000532: 27,3650           77745        NEGTFF             DLOAD                                          
055124,000533:                                                                                                  #  TFF SQRT(MU)  FROM PDL+0, NEGATIVE.
055125,000534: 27,3651           77650                           GOTO                                           
055126,000535: 27,3652           57644                                    ENDTFF                                
055127,000536: 
055128,000537: 27,3653           77745        MAXTFF1            DLOAD                                          #  RESET PDL
055129,000538: 27,3654           43545        MAXTFF             DLOAD    RVQ                                   
055130,000539: 27,3655           17774                                    NEARONE                               
055131,000540: 
055132,000541:                                                                                                  #  TIME OF FLIGHT ELLIPSE WHEN DEL (ECCENTRIC ANOM) GEQ 90 AND LEQ -90.
055133,000542: 
055134,000543:                                                                                                  #  NUM FROM TFFX.  E: (-16) OR (-29)
055135,000544:                                                                                                  #                  M: (-15) OR (-27)
055136,000545: 27,3656           77712        TFFELL             SL2                                            #  NUM  E:(-14) OR (-27)  M:(-13) OR (-25)
055137,000546: 27,3657           41465                           BDDV     PUSH                                  #  TEMP SAVE D/N IN PDL+0
055138,000547:                                                                                                  #  DEN FROM PDL+0 E:(-3)/( 16) M:(-3)/(-15)
055139,000548:                                                                                                  #  N/D TO PDL+0  E: (11)  M: (10)
055140,000549: 27,3660           45345        TFFEL1             DLOAD    DSU                                   #  (ENTER WITH D/N=0 IN PDL+0)
055141,000550: 27,3661           00045                                    TFFTEM                                #  Q2  E: (-16)  M: (-15)
055142,000551: 27,3662           00017                                    TFFQ1                                 #  Q1  E: (-16)  M: (-15)
055143,000552: 27,3663           14013                           STODL    TFFDELQ                               #  Q2-Q1  E: (-16)  M: (-15)
055144,000553:                                                                                                  #  D/N FROM PDL+0
055145,000554: 27,3664           77626                           STADR                                          
055146,000555: 27,3665           77732                           STORE    TFFTEM                                #  D/N  E: (11)  M: (10)
055147,000556: 27,3666           53605                           DMP      SL*                                   
055148,000557: 27,3667           00027                                    TFF1/ALF                              #  1/ALFA E: (-22-2NA)  M: (-20-2NA)
055149,000558: 27,3670           57576                                    0,2                                   #  1/ALFA Z  E: (-11-NA)  M: (-10-NA)
055150,000559: 27,3671           41206                           PUSH     DMP                                   #  TO PDL+0
055151,000560: 27,3672           00045                                    TFFTEM                                #  1/Z  E: (11)  M: (10)
055152,000561: 27,3673           41057                           SL*      BOVB                                  
055153,000562: 27,3674           57576                                    0,2                                   #  X2= -NA
055154,000563: 27,3675           31765                                    SIGNMPAC                              #  IN CASE X= 1.0, CONTINUE
055155,000564: 27,3676           00043                           STORE    TFFX                                  #  X=1/ALFA ZSQ
055156,000565: 27,3677           41234                           RTB      DMP                                   
055157,000566: 27,3700           57740                                    T(X)                                  #  POLY
055158,000567: 27,3701           00043                                    TFFX                                  
055159,000568: 27,3702           45242                           SR3      DSU                                   
055160,000569: 27,3703           17766                                    DP2(-3)                               
055161,000570: 27,3704           41405                           DMP      PUSH                                  #  2(X T(X)-1) /Z ALFA  E: (-15-NA)
055162,000571:                                                                                                  #                       M: (-14-NA)
055163,000572:                                                                                                  #  1/ALFA Z FROM PDL+0  E: (-11-NA)
055164,000573:                                                                                                  #                       M: (-10-NA)
055165,000574: 27,3705           41345                           DLOAD    DMP                                   #  GET SIGN FOR SDELF
055166,000575: 27,3706           00045                                    TFFTEM                                #  1/Z  E: (11)  M: (10)
055167,000576: 27,3707           00015                                    RMAG1                                 #  E: (-29)  M: (-27)
055168,000577: 27,3710           43312                           SL2      DAD                                   
055169,000578: 27,3711           00017                                    TFFQ1                                 #  Q1  E: (-16)  M: (-15)
055170,000579: 27,3712           14045                           STODL    TFFTEM                                #  (Q1+R 1/Z)  =SGN OF SDELF E:(-16) M:(-15
055171,000580: 27,3713           00035                                    TFFNP                                 #  LC P E: (-38+2NR) M: (-36+2NR)
055172,000581: 27,3714           53605                           DMP      SL*                                   #  CALC FOR ARG FOR TFF/TRIG.

Page 1278

055174,000583: 27,3715           00027                                    TFF1/ALF                              #  1/ALFA   E:(-22-2NA)  M:(-20-2NA)
055175,000584: 27,3716           57575                                    1,2                                   #  X2=-NA
055176,000585: 27,3717           53765                           SIGN     SL*                                   
055177,000586: 27,3720           00045                                    TFFTEM                                #  AFFIX SIGN FOR SDELF
055178,000587: 27,3721           57576                                    0,2                                   
055179,000588: 27,3722           14045                           STODL    TFFTEM                                #  P/ALFA  E:(-59+2NR)  M:(-55+2NR)
055180,000589:                                                                                                  #  (ARG FOR USE IN TFF/TRIG)
055181,000590: 27,3723           00027                                    TFF1/ALF                              #  1/ALFA E:(-22-2NA)  M:(-20-2NA)
055182,000591: 27,3724           41366                           SQRT     DMP                                   
055183,000592: 27,3725           17760                                    PI/16                                 #  PI (-4)
055184,000593: 27,3726           77615                           DAD                                            
055185,000594:                                                                                                  #  2(XT(X)-1)/Z ALFA FROM PDL E:(-15-NA)
055186,000595:                                                                                                  #                             M:(-14-NA)
055187,000596: 27,3727           45257                           SL*      DSU                                   
055188,000597: 27,3730           57577                                    0          -1,2                       
055189,000598: 27,3731           00013                                    TFFDELQ                               #  Q2-Q1  E: (-16)  M: (-15)
055190,000599: 27,3732           53605                           DMP      SL*                                   
055191,000600: 27,3733           00027                                    TFF1/ALF                              #  1/ALFA  E:(-22-2NA)  M:(-20-2NA)
055192,000601: 27,3734           57601                                    0          -3,2                       
055193,000602: 27,3735           52057                           SL*      GOTO                                  
055194,000603: 27,3736           57602                                    0          -4,2                       
055195,000604: 27,3737           57644                                    ENDTFF                                #  TFF SQRT(MU) IN MPAC E:(-45) M:(-42)
055196,000605: 

Page 1279

055198,000607:                                                                                                  #  PROGRAM NAME:      T(X)                                                 DATE:    01.17.67
055199,000608:                                                                                                  #  MOD NO:  0                                                              LOG SECTION:    TIME OF FREE FALL
055200,000609:                                                                                                  #  MOD BY:  RR BAIRNSFATHER
055201,000610:                                                                                                  #  FUNCTIONAL DESCRIPTION:      THE POLYNOMIAL T(X) IS USED BY TIME OF FLIGHT SUBROUTINES  CALCTFF AND
055202,000611:                                                                                                  #           CALCTPER TO APPROXIMATE THE SERIES
055203,000612:                                                                                                  #                             2     3
055204,000613:                                                                                                  #                  1/3 -X/5 +X /7 -X /9 ...
055205,000614: 
055206,000615:                                                                                                  #           WHERE  X = ALFA Z Z       IF ALFA Z Z  LEQ 1
055207,000616:                                                                                                  #                  X = 1/(ALFA Z Z)   IF ALFA Z Z   G  1
055208,000617: 
055209,000618:                                                                                                  #           ALSO   X IS NEG FOR HYPERBOLIC ORBITS
055210,000619:                                                                                                  #                  X = 0 FOR PARABOLIC ORBITS
055211,000620:                                                                                                  #                  X IS POSITIVE FOR ELLIPTIC ORBITS
055212,000621:                                                                                                  #           FOR FLIGHT 278, THE POLYNOMIAL  T(X) IS FITTED OVER THE RANGE  (0,+1)  AND HAS A MAXIMUM
055213,000622:                                                                                                  #           DEVIATION FROM THE SERIES OF  2 E-5       (T(X) IS A CHEBYCHEV  TYPE FIT AND WAS OBTAINED USING
055214,000623:                                                                                                  #           MAC PROGRAM AUTCURFIT294RRB  AND IS VALID TO THE SAME TOLERANCE OVER THE RANGE  (-.08,+1). )
055215,000624:                                                                                                  #  CALLING SEQUENCE:  RTB
055216,000625:                                                                                                  #                            T(X)
055217,000626:                                                                                                  #           C(MPAC) = X
055218,000627: 
055219,000628:                                                                                                  #  SUBROUTINES CALLED:  NONE
055220,000629:                                                                                                  #  NORMAL EXIT MODE:    TC   DANZIG
055221,000630:                                                                                                  #  ALARMS:  NONE
055222,000631:                                                                                                  #  OUTPUT:  C(MPAC) = T(X)
055223,000632:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED:
055224,000633:                                                                                                  #           C(MPAC)  =  X
055225,000634:                                                                                                  #  DEBRIS:  NONE
055226,000635: 
055227,000636: 27,3740           07243        T(X)               TC       POLY                                  
055228,000637: 27,3741           00004                           DEC      4          B-14                       #  N-1
055229,000638: 27,3742           12525 12525                     2DEC     3.333333333 E-1                        
055230,000639: 
055231,000640: 27,3744           71463 57703                     2DEC*    -1.999819135 E-1*                       
055232,000641: 
055233,000642: 27,3746           04423 17645                     2DEC*    1.418148467 E-1*                       
055234,000643: 
055235,000644: 27,3750           74604 43667                     2DEC*    -1.01310997 E-1*                       
055236,000645: 
055237,000646: 27,3752           01626 37256                     2DEC*    5.609004986 E-2*                       
055238,000647: 
055239,000648: 27,3754           77404 52071                     2DEC*    -1.536156925 E-2*                       
055240,000649: 
055241,000650: 27,3756           06102        ENDT(X)            TC       DANZIG                                
055242,000651: 
055243,000652: 27,3757  27,3756               TCDANZIG           =        ENDT(X)                               
055244,000653: 

Page 1280

055246,000655:                                                                                                  #  TFF CONSTANTS
055247,000656: 
055248,000657: 32,3716                                           BANK     32                                    
055249,000658: 
055250,000659: 27,2000                                           SETLOC   TOF-FF1                               
055251,000660: 27,2000                                           BANK                                           
055252,000661: 
055253,000662:                                                                                                  #                             NOTE _  NOTE _ ADJUSTED MUE FOR NEAR EARTH TRAJ.
055254,000663: 
055255,000664:                                                                                                  # MUE            =       3.990 815 471 E10  M CUBE/CS SQ
055256,000665:                                                                                                  # RTMUE          =       1.997702549 E5 B-18*     MODIFIED EARTH MU
055257,000666: 
055258,000667:                                                                                                  #                             NOTE _  NOTE _ ADJUSTED MUE FOR NEAR EARTH TRAJ.
055259,000668: 
055260,000669:                                                                                                  # MUM            =       4.902 778  E8     M CUBE /CS SQ
055261,000670: 
055262,000671:                                                                                                  # RTMUM          2DEC*   2.21422176 E4 B-18*
055263,000672: 27,3757           06220 37553  PI/16              2DEC     3.141592653 B-4                        
055264,000673: 
055265,000674: 27,3761           37777 37700  LIM(-22)           2OCT     3777737700                            #  1.0 -B(-22)
055266,000675: 
055267,000676: 27,3763           00000 00100  DP(-22)            2OCT     0000000100                            #  B(-22)
055268,000677: 
055269,000678: 27,3765           04000 00000  DP2(-3)            2DEC     1          B-3                        
055270,000679: 
055271,000680: 27,3767           02000 00000  DP2(-4)            2DEC     1          B-4                        #  1/16
055272,000681: 
055273,000682:                                                                                                  #  RPAD1      2DEC    6373338 B-29    M  (-29)   =20 909 901.57 FT
055274,000683: 
055275,000684: 27,3771  23,2335               RPAD1              =        RPAD                                  
055276,000685: 
055277,000686: 27,3771           00305 11205  R300K              2DEC     6464778    B-29                       #  (-29) M
055278,000687: 
055279,000688: 27,3773           37777 37777  NEARONE            2DEC     .999999999                            
055280,000689: 
055281,000690: 27,3775  23,2504               TFFZEROS           EQUALS   HI6ZEROS                              
055282,000691: 27,3775  23,2474               TFF1/4             EQUALS   HIDP1/4                               
055283,000692: 

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