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.

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

Page 1265

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

Page 1266

054651,000073:                                                                                                  #                                           REGISTERS S1, S2 ARE UNTOUCHED BY ANY TFF SUBROUTINE
054652,000074:                                                                                                  #                                           INDEX REGISTERS X1, X2 ARE USED BY ALL TFF SUBROUTINES. THEY ARE ESTAB-
054653,000075:                                                                                                  #                                           LISHED IN TFF/CONIC AND MUST BE PRESERVED BETWEEN CALLS TO SUBSEQUENT
054654,000076:                                                                                                  #                                           SUBROUTINES.
054655,000077:                                                                                                  #                                           -NR                             C(X1) = NORM COUNT OF RMAG
054656,000078:                                                                                                  #                                           -NA                             C(X2)= NORM COUNT OF SQRT(ABS(ALFA))
054657,000079: 

Page 1267

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

Page 1268

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

Page 1269

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

Page 1270

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

Page 1271

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

Page 1272

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

Page 1273

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

Page 1274

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

Page 1275

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

Page 1276

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

Page 1277

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

Page 1278

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

Page 1279

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

Page 1280

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

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