Source Code

These source-code files are part of a reconstructed copy of Comanche 67, the Apollo Guidance Computer (AGC) Command Module (CM) software for Apollo 12.

They have been adapted from sources files for Comanche 55, and updated via disassembly of binary dumps of original core rope memory modules, part numbers 2003972-1081, 2003972-1091, 2003972-1111, 2003972-1121, 2003972-1131, and 2003972-1141.

Since only binary dumps (rather than listings) of Comanche 67 are available as source material, all comments and labels are approximate. They have been taken from other AGC programs where possible, or, in some places, written from scratch to match what we believe would have been in the original listing.

056878,000002:                                                                                                  ## Copyright:   Public domain.
056879,000003:                                                                                                  ## Filename:    TIME_OF_FREE_FALL.agc
056880,000004:                                                                                                  ## Purpose:     A section of Comanche revision 067.
056881,000005:                                                                                                  ##              It is part of the reconstructed source code for the flight
056882,000006:                                                                                                  ##              software for the Command Module's (CM) Apollo Guidance Computer
056883,000007:                                                                                                  ##              (AGC) for Apollo 12. No original listings of this program are
056884,000008:                                                                                                  ##              available; instead, this file was created via dissassembly of
056885,000009:                                                                                                  ##              dumps of Comanche 067 core rope modules and comparison with
056886,000010:                                                                                                  ##              other AGC programs.
056887,000011:                                                                                                  ## Assembler:   yaYUL
056888,000012:                                                                                                  ## Contact:     Ron Burkey <info@sandroid.org>.
056889,000013:                                                                                                  ## Website:     www.ibiblio.org/apollo/index.html
056890,000014:                                                                                                  ## Mod history: 2023-08-16 MAS  Created from Comanche 055.
056891,000015: 
056892,000016:                                                                                                  #  THE TFF SUBROUTINES MAY BE USED IN EITHER EARTH OR MOON CENTERED COORDINATES.  THE TFF ROUTINES NEVER
056893,000017:                                                                                                  #  KNOW WHICH ORIGIN APPLIES.  IT IS THE USER WHO KNOWS, AND WHO SUPPLIES RONE, VONE AND 1/SQRT(MU) AT THE
056894,000018:                                                                                                  #  APPROPRIATE SCALE LEVEL FOR THE PROPER PRIMARY BODY.
056895,000019: 
056896,000020:                                                                                                  #        EARTH ORIGIN    POSITION        -29     METERS
056897,000021:                                                                                                  #                        VELOCITY        -7      METERS/CENTISECOND
056898,000022:                                                                                                  #                        1/SQRT(MU)      +17     SQRT(CS SQ/METERS CUBED)
056899,000023: 
056900,000024:                                                                                                  #        MOON ORIGIN     POSITION        -27     METERS
056901,000025:                                                                                                  #                        VELOCITY        -5      METERS/CENTISECONDS
056902,000026:                                                                                                  #                        1/SQRT(MU)      +14     SQRT(CS SQ/METERS CUBED)
056903,000027: 
056904,000028:                                                                                                  #  ALL DATA PROVIDED TO AND RECEIVED FROM ANY TFF SUBROUTINE WILL BE AT ONE OF THE LEVELS ABOVE.  IN ALL CASES,
056905,000029:                                                                                                  #  THE FREE FALL TIME IS RETURNED IN CENTISECONDS AT (-28).  PROGRAM TFF/CONIC WILL GENERATE VONE/RTMU AND
056906,000030:                                                                                                  #  LEAVE IT IN VONE' AT (+10) IF EARTH ORIGIN AND (+9) IF MOON ORIGIN.
056907,000031: 
056908,000032:                                                                                                  #  THE USER MUST STORE THE STATE VECTOR IN RONE, VONE  AND MU IN THE FORM 1/SQRT(MU) IN TFF/RTMU
056909,000033:                                                                                                  #  AT THE PROPER SCALE BEFORE CALLING TFF/CONIC.  SINCE RONE, VONE ARE IN THE EXTENDED VERB STORAGE AREA,
056910,000034:                                                                                                  #  THE USER MUST ALSO LOCK OUT THE EXTENDED VERBS, AND RELEASE THEM WHEN FINISHED.
056911,000035: 
056912,000036:                                                                                                  #  PROGRAMS CALC/TFF AND CALC/TPER ASSUME THAT THE TERMINAL RADIUS IS LESS THAN THE PRESENT
056913,000037:                                                                                                  #  RADIUS.  THIS RESTRICTION CAN BE REMOVED BY A 15 W CODING CHANGE, BUT AT PRESENT IT IS NOT DEEMED NECESSARY.
056914,000038: 
056915,000039:                                                                                                  #  THE FOLLOWING ERASABLE QUANTITIES ARE USED BY THE TFF ROUTINES, AND ARE LOCATED IN THE PUSH LIST.
056916,000040: 
056917,000041:                                                                                                  #                                        BELOW   E:  IS USED FOR EARTH ORIGIN SCALE
056918,000042:                                                                                                  #                                                M:  IS USED FOR MOON  ORIGIN SCALE
056919,000043: 
056920,000044:                                                                                                  # TFFSW          =       119D            BIT1    0 = CALCTFF             1 = CALCTPER
056921,000045: 23,3774                        TFFDELQ            =        10D                                   #        Q2-Q1                   E: (-16)  M: (-15)
056922,000046: 23,3774                        RMAG1              =        12D                                   #        ABVAL(RN)  M            E: (-29)  M: (-27)
056923,000047:                                                                                                  # RPER           =       14D             PERIGEE RADIUS  M       E: (-29)  M: (-27)
056924,000048: 23,3774                        TFFQ1              =        14D                                   #        R.V / SQRT(MUE)         E: (-16)  M: (-15)
056925,000049:                                                                                                  # SDELF/2                                SIN(THETA) /2
056926,000050: 23,3774                        CDELF/2            =        14D                                   #        COS(THETA) /2
056927,000051:                                                                                                  # RAPO           =       16D             APOGEE RADIUS  M        E: (-29)  M: (-27)
056928,000052: 23,3774                        NRTERM             =        16D                                   #        TERMINAL RADIUS  M      E: (-29+NR)
056929,000053:                                                                                                  #                                          M: (-27+NR)
056930,000054: 23,3774                        RTERM              =        18D                                   #        TERMINAL RADIUS  M      E: (-29)  M: (-27)
056931,000055: 23,3774                        TFFVSQ             =        20D                                   #        -(V SQUARED/MU)  1/M    E: (20)   M: (18)
056932,000056: 23,3774                        TFF1/ALF           =        22D                                   #        SEMI MAJ AXIS  M        E: (-22-2 NA)
056933,000057:                                                                                                  #                                          M: (-20-2 NA)
056934,000058: 23,3774                        TFFRTALF           =        24D                                   #        SQRT(ALFA)              E:(10+NA) M: (9+NA)
056935,000059: 23,3774                        TFFALFA            =        26D                                   #        ALFA  1/M               E:(26-NR) M: (24-NR)
056936,000060: 23,3774                        TFFNP              =        28D                                   #        SEMI LATUS RECTUM  M    E: (-38+2 NR)
056937,000061:                                                                                                  #                                          M: (-36+2 NR)
056938,000062: 23,3774                        TFF/RTMU           =        30D                                   #        1/SQRT(MU)              E: (17)   M: (14)
056939,000063: 23,3774                        NRMAG              =        32D                                   #        PRESENT RADIUS  M       E: (-29+NR)
056940,000064:                                                                                                  #                                          M: (-27+NR)
056941,000065: 23,3774                        TFFX               =        34D                                   
056942,000066: 23,3774                        TFFTEM             =        36D                                   #        TEMPORARY
056943,000067:                                                                                                  #                REGISTERS S1, S2 ARE UNTOUCHED BY ANY TFF SUBROUTINE
056944,000068:                                                                                                  #                INDEX REGISTERS X1, X2 ARE USED BY ALL TFF SUBROUTINES.  THEY ARE ESTAB-
056945,000069:                                                                                                  #                LISHED IN TFF/CONIC AND MUST BE PRESERVED BETWEEN CALLS TO SUBSEQUENT
056946,000070:                                                                                                  #                SUBROUTINES.
056947,000071:                                                                                                  #                -NR                             C(X1) = NORM COUNT OF RMAG
056948,000072:                                                                                                  #                -NA                             C(X2) = NORM COUNT OF SQRT(ABS(ALFA))
056949,000073: 
056950,000074:                                                                                                  #  SUBROUTINE NAME:  TFFCONIC                    DATE:  01.29.67
056951,000075:                                                                                                  #  MOD NO:  0                                    LOG SECTION:  TIME OF FREE FALL
056952,000076:                                                                                                  #  MOD BY:  RR BAIRNSFATHER
056953,000077:                                                                                                  #  MOD NO:  1    MOD BY:  RR BAIRNSFATHER        DATE: 11 APR 67
056954,000078:                                                                                                  #  MOD NO:  2    MOD BY:  RR BAIRNSFATHER        DATE: 21 NOV 67         ADD MOON MU.
056955,000079:                                                                                                  #  MOD NO:  3    MOD BY:  RR BAIRNSFATHER        DATE: 21 MAR 68         ACCEPT DIFFERENT EARTH/MOON SCALES
056956,000080: 
056957,000081:                                                                                                  #  FUNCTIONAL DESCRIPTION:  THIS SUBROUTINE IS CALLED TO COMPUTE THOSE CONIC PARAMETERS REQUIRED BY THE TFF
056958,000082:                                                                                                  #        SUBROUTINES AND TO ESTABLISH THEM IN THE PUSH LIST AREA.  THE PARAMETERS ARE LISTED UNDER OUTPUT.
056959,000083:                                                                                                  #        THE EQUATIONS ARE
056960,000084:                                                                                                  #                -   -  -
056961,000085:                                                                                                  #                H = RN*VN                       ANGULAR MOMENTUM
056962,000086:                                                                                                  #                      - -
056963,000087:                                                                                                  #                LCP = H.H / MU                  SEMI LATUS RECTUM
056964,000088:                                                                                                  #                              -  -
056965,000089:                                                                                                  #                ALFA = 2/RN - VN.VN / MU        RECIPROCAL SEMI MAJ AXIS, SIGNED
056966,000090: 
056967,000091:                                                                                                  #        AND ALFA IS POS FOR ELLIPTIC ORBITS
056968,000092:                                                                                                  #                      0 FOR PARABOLIC ORBITS
056969,000093:                                                                                                  #                    NEG FOR HYPERBOLIC ORBITS.
056970,000094:                                                                                                  #        SUBROUTINE ALSO COMPUTES AND SAVES RMAG.
056971,000095: 
056972,000096:                                                                                                  #  CALLING SEQUENCE:
056973,000097:                                                                                                  #        TFFCONIC EXPECTS CALLER TO ENTER WITH CORRECT GRAVITATIONAL CONSTANT IN MPAC, IN THE FORM
056974,000098:                                                                                                  #        1/SQRT(MU).  PROGRAM WILL SAVE IN TFF/RTMU.  THE SCALE IS DETERMINED BY WHETHER EARTH OR MOON
056975,000099:                                                                                                  #        ORIGIN IS USED.  THE CALLER MUST LOCK OUT THE EXTENDED VERBS BEFORE PROVIDING STATE VECTOR IN RONE,
056976,000100:                                                                                                  #        VONE AT PROPER SCALE.  THE EXTENDED VERBS MUST BE RESTORED WHEN THE CALLER IS FINISHED USING THE
056977,000101:                                                                                                  #        TFF ROUTINES.
056978,000102: 
056979,000103:                                                                                                  #        ENTRY POINT TFFCONMU EXPECTS THAT TFF/RTMU IS ALREADY LOADED.
056980,000104: 
056981,000105:                                                                                                  #        TO SPECIFY MU:  DLOAD   CALL            IF MU ALREADY STORED:           CALL
056982,000106:                                                                                                  #                                YOURMU          1/RTMU E:(17) M:(14)                    TFFCONMU
056983,000107:                                                                                                  #                                TFFCONIC
056984,000108:                                                                                                  #        PUSHLOC = PDL+0, ARBITRARY IF LEQ 18D
056985,000109: 
056986,000110:                                                                                                  #  SUBROUTINES CALLED:  NONE
056987,000111: 
056988,000112:                                                                                                  #  NORMAL EXIT MODES:  RVQ
056989,000113: 
056990,000114:                                                                                                  #  ALARMS:  NONE
056991,000115: 
056992,000116:                                                                                                  #  OUTPUT:       THE FOLLOWING ARE STORED IN THE PUSH LIST AREA.
056993,000117:                                                                                                  #                RMAG1           E:(-29) M:(-27)         M  RN, PRESENT RADIUS LENGTH.
056994,000118:                                                                                                  #                NRMAG           E:(-29+NR)              M  RMAG, NORMALIZED
056995,000119:                                                                                                  #                                M:(-27+NR)
056996,000120:                                                                                                  #                X1                                      -NR, NORM COUNT
056997,000121:                                                                                                  #                TFFNP           E:(-38+2NR)             M  LCP, SEMI LATUS RECTUM, WEIGHTED BY NR.  FOR VGAMCALC
056998,000122:                                                                                                  #                                M:(-36+2NR)
056999,000123:                                                                                                  #                TFF/RTMU        E:(17) M:(14)           1/SQRT(MU)
057000,000124:                                                                                                  #                TFFVSQ          E:(20) M:(18)           1/M  -(V SQ/MU):  PRESENT VELOCITY, NORMLIZED.  FOR VGAMCALC
057001,000125:                                                                                                  #                TFFALFA         E:(26-NR)               1/M  ALFA, WEIGHTED BY NR
057002,000126:                                                                                                  #                                M:(24-NR)
057003,000127:                                                                                                  #                TFFRTALF        E:(10+NA)               SQRT(ALFA), NORMALIZED
057004,000128:                                                                                                  #                                M:(9+NA)
057005,000129:                                                                                                  #                X2                                      -NA, NORM COUNT
057006,000130:                                                                                                  #                TFF1/ALF        E:(-22-2NA)             SIGNED SEMI MAJ AXIS, WEIGHTED BY NA
057007,000131:                                                                                                  #                                M:(-20-2NA)
057008,000132:                                                                                                  #                PUSHLOC AT PDL+0
057009,000133: 
057010,000134:                                                                                                  #        THE FOLLOWING IS STORED IN GENERAL ERASABLE
057011,000135:                                                                                                  #                VONE'           E:(10) M:(9)            V/RT(MU), NORMALIZED VELOCITY
057012,000136: 
057013,000137:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED:
057014,000138:                                                                                                  #                RONE            E:(-29) M:(-27)         M  STATE VECTOR         LEFT BY CALLER
057015,000139:                                                                                                  #                VONE            E:(-7) M:(-5)           M/CS  STATE VECTOR      LEFT BY CALLER
057016,000140:                                                                                                  #                TFF/RTMU        E:(17) M:(14)           1/RT(CS SQ/M CUBE)      IF ENTER VIA TFFCONMU.
057017,000141: 
057018,000142:                                                                                                  #  DEBRIS:       QPRET,  PDL+0 ... PDL+3
057019,000143: 
057020,000144: 33,3776                                           BANK     33                                    
057021,000145: 27,2000                                           SETLOC   TOF-FF                                
057022,000146: 27,2000                                           BANK                                           
057023,000147: 
057024,000148: 27,2760                                           COUNT*   $$/TFF                                
057025,000149: 
057026,000150: 27,2760           00037        TFFCONIC           STORE    TFF/RTMU                              #  1/SQRT(MU)    E:(17) M:(14)
057027,000151: 
057028,000152: 27,2761           53575        TFFCONMU           VLOAD    UNIT                                  #  COME HERE WITH TFFRTMU LOADED.
057029,000153: 27,2762           02327                                    RONE                                  #  SAVED RN.  M  E:(-29) M:(-27)
057030,000154: 27,2763           77725                           PDDL                                           #  UR/2 TO PDL+0, +5
057031,000155: 27,2764           00045                                    36D                                   #  MAGNITUDE
057032,000156: 27,2765           00015                           STORE    RMAG1                                 #  M  E:(-29) M:(-27)
057033,000157: 
057034,000158: 27,2766           77701                           NORM                                           
057035,000159: 27,2767           00047                                    X1                                    #  -NR
057036,000160: 27,2770           24041                           STOVL    NRMAG                                 #  RMAG  M  E:(-29+NR) M:(-27+NR)
057037,000161: 27,2771           02335                                    VONE                                  #  SAVED VN.  M/CS  E:(-7) M:(-5)
057038,000162: 27,2772           77761                           VXSC                                           
057039,000163: 27,2773           00037                                    TFF/RTMU                              #  E:(17) M:(14)
057040,000164: 27,2774           02372                           STORE    VONE'                                 #  VN/SQRT(MU)  E:(10) M:(9)
057041,000165: 
057042,000166: 27,2775           47361                           VXSC     VXV                                   
057043,000167: 27,2776           00041                                    NRMAG                                 #  E:(-29+NR) M:(-27+NR)
057044,000168:                                                                                                  #  UR/2 FROM PDL
057045,000169: 27,2777           47572                           VSL1     VSQ                                   #  BEFORE:  E:(-19+NR) M:(-18+NR)
057046,000170: 27,3000           14035                           STODL    TFFNP                                 #  LC P  M  E:(-38+2NR) M:(-36+2NR)
057047,000171:                                                                                                  #  SAVE ALSO FOR VGAMCALC
057048,000172: 27,3001           15324                                    TFF1/4                                
057049,000173: 27,3002           63271                           DDV      PDVL                                  #  (2/RMAG)  1/M  E:(26-NR) M:(24-NR)
057050,000174: 27,3003           00041                                    NRMAG                                 #  RMAG  M  E:(-29+NR) M:(-27+NR)
057051,000175: 27,3004           02372                                    VONE'                                 #  SAVED VN.  E:(10) M:(9)
057052,000176: 27,3005           57436                           VSQ      DCOMP                                 #  KEEP MPAC+2 HONEST FOR SQRT.
057053,000177: 27,3006           00025                           STORE    TFFVSQ                                #  -(V SQ/MU)  E:(20) M:(18)
057054,000178:                                                                                                  #  SAVE FOR VGAMCALC
057055,000179: 27,3007           43257                           SR*      DAD                                   
057056,000180: 27,3010           20573                                    0          -6,1                       #  GET -VSQ/MU  E:(26-NR) M:(24-NR)
057057,000181: 27,3011           77626                           STADR                                          
057058,000182:                                                                                                  #  2/RMAG  FROM PDL+2
057059,000183: 27,3012           77744                           STORE    TFFALFA                               #  ALFA  1/M  E:(26-NR) M:(24-NR)
057060,000184: 27,3013           41457                           SL*      PUSH                                  #  TEMP SAVE ALFA  E:(20) M:(18)
057061,000185: 27,3014           20173                                    0          -6,1                       
057062,000186: 27,3015           75446                           ABS      SQRT                                  #  E:(10) M:(9)
057063,000187: 27,3016           77701                           NORM                                           
057064,000188: 27,3017           00050                                    X2                                    #  X2 = -NA
057065,000189: 27,3020           00031                           STORE    TFFRTALF                              #  SQRT( ABS(ALFA) )  E:(10+NA) M:(9+NA)
057066,000190: 27,3021           75316                           DSQ      SIGN                                  #  NOT SO ACCURATE, BUT OK
057067,000191:                                                                                                  #  ALFA FROM PDL+2  E:(20) M:(18)
057068,000192: 27,3022           55254                           BZE      BDDV                                  #  SET 1/ALFA =0, TO SHOW SMALL ALFA
057069,000193: 27,3023           57025                                    +2                                    
057070,000194: 27,3024           15324                                    TFF1/4                                
057071,000195: 27,3025           00027                 +2        STORE    TFF1/ALF                              #  1/ALFA  E:(-22-2NA) M:(-20-2NA)
057072,000196: 27,3026           77616        DUMPCNIC           RVQ                                            
057073,000197:                                                                                                  #                        39 W
057074,000198:                                                                                                  #  SUBROUTINE NAME:  TFFRP/RA                    DATE: 01.17.67
057075,000199:                                                                                                  #  MOD NO:  0                                    LOG SECTION:  TIME OF FREE FALL
057076,000200:                                                                                                  #  MOD BY:  RR BAIRNSFATHER
057077,000201:                                                                                                  #  MOD NO:  1    MOD BY:  RR BAIRNSFATHER        DATE: 11 APR 67
057078,000202:                                                                                                  #  MOD NO:  2    MOD BY:  RR BAIRNSFATHER        DATE: 21 MAR 68         ACCEPT DIFFERENT EARTH/MOON SCALES
057079,000203:                                                                                                  #                                                                        ALSO IMPROVE ACCURACY OF RAPO.
057080,000204: 
057081,000205:                                                                                                  #  FUNCTIONAL DESCRIPTION:  USED BY CALCTPER AND TFF DISPLAYS TO CALCULATE PERIGEE RADIUS AND ALSO
057082,000206:                                                                                                  #        APOGEE RADIUS FOR A GENERAL CONIC.
057083,000207:                                                                                                  #        PROGRAM GIVES PERIGEE RADIUS AS         APOGEE RADIUS IS GIVEN BY
057084,000208:                                                                                                  #                RP = P/(1+E)                            RA = (1+E) / ALFA
057085,000209:                                                                                                  #        WHERE    2
057086,000210:                                                                                                  #                E  = 1 - P ALFA
057087,000211:                                                                                                  #        IF RA IS NEGATIVE OR SHOWS DIVIDE OVERFLOW, THEN RA = POSMAX BECAUSE
057088,000212:                                                                                                  #                1. APOGEE RADIUS IS NOT MEANINGFUL FOR HYPERBOLA
057089,000213:                                                                                                  #                2. APOGEE RADIUS IS NOT DEFINED FOR PARABOLA
057090,000214:                                                                                                  #                3. APOGEE RADIUS EXCEEDS THE SCALING FOR ELLIPSE.
057091,000215: 
057092,000216:                                                                                                  #        THIS SUBROUTINE REQUIRES THE SIGNED RECIPROCAL SEMI MAJ AXIS, ALFA, AND SEMI LATUS RECTUM AS DATA.
057093,000217: 
057094,000218:                                                                                                  #  CALLING SEQUENCE:     CALL
057095,000219:                                                                                                  #                                TFFRP/RA
057096,000220:                                                                                                  #        PUSHLOC = PDL+0, ARBITRARY IF LEQ 10D
057097,000221:                                                                                                  #        C(MPAC) UNSPECIFIED
057098,000222: 
057099,000223:                                                                                                  #  SUBROUTINES CALLED:   NONE
057100,000224: 
057101,000225:                                                                                                  #  NORMAL EXIT MODE:     RVQ
057102,000226:                                                                                                  #        IF ELLIPSE, WITHIN NORMAL SCALING, RAPO IS CORRECT.
057103,000227:                                                                                                  #        OTHERWISE, RAPO = POSMAX.
057104,000228: 
057105,000229:                                                                                                  #  ALARMS:       NONE
057106,000230: 
057107,000231:                                                                                                  #  OUTPUT:       STORED IN PUSH LIST AREA.  SCALE OF OUTPUT AGREES WITH DATA SUPPLIED TO TFF/CONIC.
057108,000232:                                                                                                  #        RPER    E:(-29) M:(-27)         M       PERIGEE RADIUS          DESTROYED BY CALCTFF/CALCTPER, TFFTRIG.
057109,000233:                                                                                                  #        RAPO    E:(-29) M:(-27)         M       APOGEE RADIUS           WILL BE DESTROYED BY CALCTFF/CALCTPER
057110,000234:                                                                                                  #        PUSHLOC AT PDL+0
057111,000235: 
057112,000236:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED:
057113,000237:                                                                                                  #        TFFALFA E:(26-NR)               M       1/SEMI MAJ AXIS LEFT BY TFFCONIC
057114,000238:                                                                                                  #                M:(24-NR)
057115,000239:                                                                                                  #        TFFNP   E:(-38+2NR)             M       LC P, SEMI LATUS RECTUM LEFT BY TFFCONIC
057116,000240:                                                                                                  #                M:(-36+2NR)
057117,000241:                                                                                                  #        X1                              -NR, NORM COUNT OF RMAG         LEFT BY TFFCONIC
057118,000242:                                                                                                  #        X2                              -NA, NORM COUNT OF ALFA         LEFT BY TFFCONIC
057119,000243: 
057120,000244:                                                                                                  #  DEBRIS:       QPRET, PDL+0 ... PDL+1
057121,000245: 
057122,000246: 27,3027                        RAPO               =        16D                                   #  APOGEE RADIUS  M  E:(-29) M:(-27)
057123,000247: 27,3027                        RPER               =        14D                                   #  PERIGEE RADIUS  M  E:(-29) M:(-27)
057124,000248: 
057125,000249: 27,3027           41345        TFFRP/RA           DLOAD    DMP                                   
057126,000250: 27,3030           00033                                    TFFALFA                               #  ALFA  1/M  E:(26-NR) M:(24-NR)
057127,000251: 27,3031           00035                                    TFFNP                                 #  LC P  M E:(-38+2NR) M:(-36+2NR)
057128,000252: 27,3032           57457                           SR*      DCOMP                                 #  ALFA P (-12+NR)
057129,000253: 27,3033           20571                                    0          -8D,1                      #  ALFA P (-4)
057130,000254: 27,3034           51415                           DAD      ABS                                   #  (DCOMP GIVES VALID TP RESULT FOR SQRT)
057131,000255:                                                                                                  #  (ABS PROTECTS SQRT IF E IS VERY NEAR 0)
057132,000256: 27,3035           17367                                    DP2(-4)                               
057133,000257: 27,3036           43366                           SQRT     DAD                                   #  E SQ = (1- P ALFA) (-4)
057134,000258: 27,3037           15324                                    TFF1/4                                
057135,000259: 27,3040           55206                           PUSH     BDDV                                  #  (1+E)  (-2)  TO PDL+0
057136,000260: 27,3041           00035                                    TFFNP                                 #  LCP  M  E:(-38+2NR) M:(-36+2NR)
057137,000261: 27,3042           53657                           SR*      SR*                                   #  (DOES SR THEN SL TO AVOID OVFL)
057138,000262: 27,3043           20601                                    0,1                                   #  X1=-NR
057139,000263: 27,3044           20572                                    0          -7,1                       #  (EFFECTIVE SL)
057140,000264: 27,3045           14017                           STODL    RPER                                  #  PERIGEE RADIUS  M  E:(-29) M:(-27)
057141,000265:                                                                                                  #  (1+E)  (-2)  FROM PDL+0
057142,000266: 27,3046           41005                           DMP      BOVB                                  
057143,000267: 27,3047           00027                                    TFF1/ALF                              #  E:(-22-2NA) M:(-20-2NA)
057144,000268: 27,3050           57353                                    TCDANZIG                              #  CLEAR OVFIND, IF ON.
057145,000269: 27,3051           53654                           BZE      SL*                                   
057146,000270: 27,3052           57061                                    MAXRA                                 #  SET POSMAX, IF ALFA=0
057147,000271: 27,3053           57603                                    0          -5,2                       #  -5+NA
057148,000272: 27,3054           40057                           SL*      BOV                                   
057149,000273: 27,3055           57576                                    0,2                                   
057150,000274: 27,3056           57061                                    MAXRA                                 #  SET POSMAX IF OVFL.
057151,000275: 27,3057           77644                           BPL                                            #  CONTINUE WITH VALID RAPO.
057152,000276: 27,3060           57063                                    +3                                    
057153,000277: 27,3061           77745        MAXRA              DLOAD                                          #  RAPO CALC IS NOT VALID.  SET RAPO =
057154,000278: 27,3062           17373                                    NEARONE                               #  POSMAX AS A TAG.
057155,000279: 27,3063           00021                 +3        STORE    RAPO                                  #  APOGEE RADIUS  M  E:(-29) M:(-27)
057156,000280: 27,3064           77616        DUMPRPRA           RVQ                                            
057157,000281:                                                                                                  #                        30 W
057158,000282:                                                                                                  #  SUBROUTINE NAME:  CALCTPER / CALCTFF          DATE:  01.29.67
057159,000283:                                                                                                  #  MOD NO:  0                                    LOG SECTION:  TIME OF FREE FALL
057160,000284:                                                                                                  #  MOD BY:  RR BAIRNSFATHER
057161,000285:                                                                                                  #  MOD NO:  1    MOD BY:  RR BAIRNSFATHER        DATE: 21 MAR 67
057162,000286:                                                                                                  #  MOD NO:  2    MOD BY:  RR BAIRNSFATHER        DATE: 14 APR 67
057163,000287:                                                                                                  #  MOD NO:  3    MOD BY:  RR BAIRNSFATHER        DATE: 8 JUL 67          NEAR EARTH MUE AND NEG TFF (GONEPAST)
057164,000288:                                                                                                  #  MOD NO:  4    MOD BY:  RR BAIRNSFATHER        DATE: 21 NOV 67         ADD VARIABLE MU.
057165,000289:                                                                                                  #  MOD NO:  5    MOD BY:  RR BAIRNSFATHER        DATE: 21 MAR 68         ACCEPT DIFFERENT EARTH/MOON SCALES
057166,000290: 
057167,000291:                                                                                                  #  FUNCTIONAL DESCRIPTION:  PROGRAM CALCULATES THE FREE-FALL TIME OF FLIGHT FROM PRESENT POSITION RN AND
057168,000292:                                                                                                  #        VELOCITY VN TO A RADIUS LENGTH SPECIFIED BY RTERM, SUPPLIED BY THE USER.  THE POSITION VECTOR
057169,000293:                                                                                                  #        RN MAY BE ON EITHER SIDE OF THE CONIC, BUT RTERM IS CONSIDERED ON THE INBOUND SIDE.
057170,000294:                                                                                                  #        THE EQUATIONS ARE
057171,000295: 
057172,000296:                                                                                                  #                Q2 = -SQRT(RTERM (2-RTERM ALFA) - LCP)  (INBOUND SIDE)) LEQ +- LCE/SQRT(ALFA)
057173,000297:                                                                                                  #                     -  -
057174,000298:                                                                                                  #                Q1 = RN.VN / SQRT(MU)                                   LEQ +- LCE/SQRT(ALFA)
057175,000299: 
057176,000300:                                                                                                  #                Z = NUM / DEN                                           LEQ +- 1/SQRT(ALFA)
057177,000301: 
057178,000302:                                                                                                  #        WHERE, IF INBOUND
057179,000303:                                                                                                  #                NUM = RTERM -RN                                         LEQ +- 2 LCE/ALFA
057180,000304:                                                                                                  #                DEN = Q2+Q1                                             LEQ +- 2 LCE/SQRT(ALFA)
057181,000305: 
057182,000306:                                                                                                  #        AND, IF OUTBOUND
057183,000307:                                                                                                  #                NUM = Q2-Q1                                             LEQ +- 2 LCE/SQRT(ALFA)
057184,000308:                                                                                                  #                DEN = 2 - ALFA (RTERM + RN).                            LEQ +- 2 LCE
057185,000309: 
057186,000310:                                                                                                  #        IF      ALFA ZZ < 1.0           (FOR ALL CONICS EXCEPT ELLIPSES HAVING ABS(DEL ECC ANOM) G 90 DEG)
057187,000311:                                                                                                  #        THEN    X = ALFA Z Z
057188,000312:                                                                                                  #        AND     TFF = (RTERM +RN -2 ZZ T(X) ) Z/SQRT(MU)
057189,000313:                                                                                                  #                EXCEPT  IF ALFA PNZ, AND IF TFF NEG,
057190,000314:                                                                                                  #                THEN    TFF = 2 PI /(ALFA SQRT(ALFA)) + TFF
057191,000315:                                                                                                  #        OR      IF ALFA ZZ GEQ 1.0      (FOR ELLIPSES HAVING ABS(DEL ECC ANOM) GEQ 90 DEG)
057192,000316:                                                                                                  #        THEN    X = 1/ALFA Z Z
057193,000317:                                                                                                  #        AND     TFF = (PI/SQRT(ALFA) -Q2 +Q1 +2(X T(X) -1) /ALFA Z) /ALFA SQRT(MU)
057194,000318:                                                                                                  #        WHERE   T(X) IS A POLYNOMIAL APPROXIMATION TO THE SERIES
057195,000319:                                                                                                  #                             2      3             2
057196,000320:                                                                                                  #                1/3 - X/5 + X /7 - X /9 ...     (X  < 1.0)
057197,000321: 
057198,000322:                                                                                                  #  CALLING SEQUENCE:     TIME TO RTERM                   TIME TO PERIGEE
057199,000323:                                                                                                  #                        CALL                            CALL
057200,000324:                                                                                                  #                                CALCTFF                         CALCTPER
057201,000325:                                                                                                  #                        C(MPAC) = TERMNL RAD M          C(MPAC) = PERIGEE RAD M
057202,000326:                                                                                                  #        FOR EITHER, E:(-29) M:(-27)
057203,000327:                                                                                                  #        FOR EITHER, PUSHLOC = PDL+0, ARBITRARY IF LEQ 8D.
057204,000328: 
057205,000329:                                                                                                  #  SUBROUTINES CALLED:   T(X), VIA RTB
057206,000330: 
057207,000331:                                                                                                  #  NORMAL EXIT MODE:     RVQ
057208,000332:                                                                                                  #        HOWEVER, PROGRAM EXITS WITH ONE OF THE FOLLOWING VALUES FOR TFF (-28) CS IN MPAC.  USER MUST STORE.
057209,000333:                                                                                                  #                A. TFF = FLIGHT TIME.  NORMAL CASE FOR POSITIVE FLIGHT TIME LESS THAN ONE ORBITAL PERIOD.
057210,000334:                                                                                                  #                B. (THIS OPTION IS NO LONGER USED.)
057211,000335:                                                                                                  #                C. TFF = POSMAX.  THIS INDICATES THAT THE CONIC FROM THE PRESENT POSITION WILL NOT RETURN TO
057212,000336:                                                                                                  #                   THE SPECIFIED ALTITUDE.  ALSO INDICATES OUTBOUND PARABOLA OR HYPERBOLA.
057213,000337: 
057214,000338:                                                                                                  #  OUTPUT:       C(MPAC)         (-28) CS        TIME OF FLIGHT, OR TIME TO PERIGEE
057215,000339:                                                                                                  #                TFFX            (0)             X,                                      LEFT FOR ENTRY DISPLAY TFF ROUTINES
057216,000340:                                                                                                  #                NRTERM          E:(-29+NR) M    RTERM, WEIGHTED BY NR                   LEFT FOR ENTRY DISPLAY TFF ROUTINES
057217,000341:                                                                                                  #                                M:(-27+NR)
057218,000342:                                                                                                  #                TFFTEM          E:(-59+2NR)     LCP Z Z SGN(SDELF)                      LEFT FOR ENTRY DISPLAY TFF ROUTINES
057219,000343:                                                                                                  #                                M:(-55+2NR)     LCP /ALFA SGN(SDELF)                    LEFT FOR ENTRY DISPLAY TFF ROUTINES
057220,000344:                                                                                                  #                NOTE:   TFFTEM = PDL 36D AND WILL BE DESTROYED BY .:UNIT:.
057221,000345:                                                                                                  #                RMAG1           E:(-29) M:(-27) PDL 12 NOT TOUCHED.
057222,000346:                                                                                                  #                TFFQ1           E:(-16) M:(-15) PDL 14D
057223,000347:                                                                                                  #                TFFDELQ         E:(-16) M:(-15) PDL 10D
057224,000348:                                                                                                  #                PUSHLOC AT PDL+0
057225,000349: 
057226,000350:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED:
057227,000351:                                                                                                  #                RONE            E:(-29) M:(-27) M  STATE VECTOR                         LEFT BY USER
057228,000352:                                                                                                  #                VONE'           E:(+10) M:(+9)  VN/SQRT(MU)                             LEFT BY TFF/CONIC
057229,000353:                                                                                                  #                RMAG1           E:(-29) M:(-27) PRESENT RADIUS, M                       LEFT BY TFFCONIC
057230,000354:                                                                                                  #                C(MPAC)         E:(-29) M:(-27) RTERM, TERMINAL RADIUS LENGTH, M        LEFT BY USER
057231,000355: 
057232,000356:                                                                                                  #                THE FOLLOWING ARE STORED IN THE PUSH LIST AREA.
057233,000357:                                                                                                  #                TFF/RTMU        E:(17) M:(14)   1/SQRT(MU)                              LEFT BY TFFCONIC.
057234,000358:                                                                                                  #                NRMAG           E:(-29+NR)      M  RMAG, NORMALIZED                     LEFT BY TFFCONIC
057235,000359:                                                                                                  #                                M:(-27+NR)
057236,000360:                                                                                                  #                X1                              -NR, NORM COUNT                         LEFT BY TFFCONIC
057237,000361:                                                                                                  #                TFFNP           E:(-38+2NR)     M  LCP, SEMI LATUS RECTUM, WEIGHT NR    LEFT BY TFFCONIC
057238,000362:                                                                                                  #                                M:(-36+2NR)
057239,000363:                                                                                                  #                TFFALFA         E:(26-NR)       1/M  ALFA, WEIGHT NR                    LEFT BY TFFCONIC
057240,000364:                                                                                                  #                                M:(24-NR)
057241,000365:                                                                                                  #                TFFRTALF        E:(10+NA)       SQRT(ALFA), NORMALIZED                  LEFT BY TFFCONIC
057242,000366:                                                                                                  #                                M:(9+NA)
057243,000367:                                                                                                  #                X2                              -NA, NORM COUNT                         LEFT BY TFFCONIC
057244,000368:                                                                                                  #                TFF1/ALF        E:(-22-2NA)     SIGNED SEMIMAJ AXIS, WEIGHTED BY NA     LEFT BY TFFCONIC
057245,000369:                                                                                                  #                                M:(-20-2NA)
057246,000370: 
057247,000371:                                                                                                  #  DEBRIS:       QPRET, PDL+0 ... PDL+3
057248,000372:                                                                                                  #                RTERM           E:(-29) M:(-27) RTERM, TERMINAL RADIUS LENGTH
057249,000373:                                                                                                  #                RAPO            E:(-29) M:(-27) PDL 16D (=NRTERM)
057250,000374:                                                                                                  #                RPER            E:(-29) M:(-27) PDL 14D (=TFFQ1)
057251,000375: 
057252,000376: 27,3065           77614        CALCTPER           SETGO                                          #  ENTER WITH RPER IN MPAC
057253,000377: 27,3066           03436                                    TFFSW                                 
057254,000378: 27,3067           57072                                    +3                                    
057255,000379: 27,3070           77614        CALCTFF            CLEAR                                          #  ENTER WITH RTERM IN MPAC
057256,000380: 27,3071           03676                                    TFFSW                                 
057257,000381: 27,3072           00023                 +3        STORE    RTERM                                 #  E:(-29) M:(-27)
057258,000382: 27,3073           77657                           SL*                                            
057259,000383: 27,3074           20201                                    0,1                                   #  X1=-NR
057260,000384: 27,3075           00021                           STORE    NRTERM                                #  RTERM  E:(-29+NR) M:(-27+NR)
057261,000385: 27,3076           44205                           DMP      BDSU                                  
057262,000386: 27,3077           00033                                    TFFALFA                               #  ALFA  E:(26-NR) M:(24-NR)
057263,000387: 27,3100           15324                                    TFF1/4                                
057264,000388: 27,3101           41206                           PUSH     DMP                                   #  (2-ALFA RTERM)  (-3)  TO PDL+0
057265,000389: 27,3102           00021                                    NRTERM                                #  E:(-29+NR) M:(-27+NR)
057266,000390: 27,3103           53725                           PDDL     SR*                                   #  RTERM(2-ALFA RTERM) TO PDL+2
057267,000391:                                                                                                  #  E:(-32+NR) M:(-30+NR)
057268,000392: 27,3104           00035                                    TFFNP                                 #  LC P  E:(-38+2NR) M:(-36+2NR)
057269,000393: 27,3105           20573                                    0          -6,1                       #  X1 = -NR
057270,000394: 27,3106           43276                           DCOMP    DAD                                   #  DUE TO SHIFTS, KEEP PRECISION FOR SQRT
057271,000395:                                                                                                  #  RTERM(2-ALFA RTERM) FROM PDL +2
057272,000396:                                                                                                  #  E:(-32+NR) M:(-30+NR)
057273,000397: 27,3107           77657                           SR*                                            #  LEAVE  E:(-32) M:(-30)
057274,000398: 27,3110           20601                                    0,1                                   #  X1 = -NR
057275,000399: 27,3111           71214                           BOFF     DLOAD                                 #  CHECK TFF /TPER SWITCH
057276,000400: 27,3112           03756                                    TFFSW                                 
057277,000401: 27,3113           57115                                    +2                                    #  IF TFF, CONTINUE
057278,000402: 27,3114           15334                                    TFFZEROS                              #  IF TPER, SET Q2 = 0
057279,000403: 27,3115           75440                 +2        BMN      SQRT                                  #  E:(-16) M:(-15)
057280,000404: 27,3116           57250                                    MAXTFF1                               #  NO FREE FALL CONIC TO RTERM FROM HERE
057281,000405:                                                                                                  #  RESET PDL, SET TFF=POSMAX, AND EXIT.
057282,000406: 
057283,000407: 27,3117           41076                           DCOMP    BOVB                                  #  RT IS ON INBOUND SIDE.  ASSURE OVFIND=0
057284,000408: 27,3120           57353                                    TCDANZIG                              #  ANY PORT IN A STORM.
057285,000409: 27,3121           24045                           STOVL    TFFTEM                                #  Q2  E:(-16) M:(-15)
057286,000410: 27,3122           02372                                    VONE'                                 #  VN/SQRT(MU)  E:(10) M:(9)
057287,000411: 27,3123           52441                           DOT      SL3                                   
057288,000412: 27,3124           02327                                    RONE                                  #  SAVED RN.  E:(-29) M:(-27)
057289,000413: 27,3125           00017                           STORE    TFFQ1                                 #  Q1, SAVE FOR GONEPAST TEST.
057290,000414:                                                                                                  #  E:(-16) M:(-15)
057291,000415: 27,3126           44240                           BMN      BDSU                                  
057292,000416: 27,3127           57150                                    INBOUND                               #  USE ALTERNATE Z
057293,000417: 27,3130           00045                                    TFFTEM                                #  Q2  E:(-16) M:(-15)
057294,000418: 
057295,000419:                                                                                                  #  OUTBOUND Z CALC CONTINUES HERE
057296,000420: 
057297,000421: 27,3131           14043                           STODL    TFFX                                  #  NUM=Q2-Q1  E:(-16) M:(-15)
057298,000422: 27,3132           00033                                    TFFALFA                               #  ALFA  E:(26-NR) M:(24-NR)
057299,000423: 27,3133           44205                           DMP      BDSU                                  
057300,000424: 27,3134           00041                                    NRMAG                                 #  RMAG  E:(-29+NR) M:(-27+NR)
057301,000425:                                                                                                  #  (2-RTERM ALFA)  (-3) FROM PDL+0
057302,000426: 27,3135           51406        SAVEDEN            PUSH     ABS                                   #  DEN TO PDL+0  E:(-3) OR (-16)
057303,000427:                                                                                                  #                M:(-3) OR (-15)
057304,000428: 27,3136           40015                           DAD      BOV                                   #  INDETERMINANCY TEST
057305,000429: 27,3137           17361                                    LIM(-22)                              #  =1.0-B(-22)
057306,000430: 27,3140           57161                                    TFFXTEST                              #  GO IF DEN >/= B(-22)
057307,000431: 27,3141           65345                           DLOAD    PDDL                                  #  SET DEN=0 OTHERWISE
057308,000432: 27,3142           15334                                    TFFZEROS                              
057309,000433:                                                                                                  #  XCH ZERO WITH PDL+0
057310,000434: 27,3143           57545                           DLOAD    DCOMP                                 
057311,000435: 27,3144           00033                                    TFFALFA                               #  ALFA  E:(26-NR) M:(24-NR)
057312,000436: 27,3145           71240                           BMN      DLOAD                                 #  FOR TPER:  Z INDET AT DELE/2=0 AND 90.
057313,000437: 27,3146           57255                                    TFFEL1                                #  ASSUME 90, AND LEAVE 0 IN PDL: 1/Z=D/N
057314,000438: 
057315,000439:                                                                                                  #  Z INDET. AT PERIGEE FOR PARAB OR HYPERB.
057316,000440: 27,3147           77616        DUMPTFF1           RVQ                                            #  RETURN TFF =0
057317,000441: 
057318,000442:                                                                                                  #  INBOUND Z CALC CONTINUES HERE
057319,000443: 
057320,000444: 27,3150           77745        INBOUND            DLOAD                                          #  RESET PDL+0
057321,000445: 27,3151           45345                           DLOAD    DSU                                   #  ALTERNATE Z CALC
057322,000446: 27,3152           00023                                    RTERM                                 #  E:(-29) M:(-27)
057323,000447: 27,3153           00015                                    RMAG1                                 #  E:(-29) M:(-27)
057324,000448: 27,3154           14043                           STODL    TFFX                                  #  NUM=RTERM-RN  E:(-29) M:(-27)
057325,000449: 27,3155           00045                                    TFFTEM                                #  Q2  E:(-16) M:(-15)
057326,000450: 27,3156           52015                           DAD      GOTO                                  
057327,000451: 27,3157           00017                                    TFFQ1                                 #  Q1  E:(-16) M:(-15)
057328,000452: 27,3160           57135                                    SAVEDEN                               #  DEN = Q2+Q1  E:(-16) M:(-15)
057329,000453: 
057330,000454: 27,3161           65215        TFFXTEST           DAD      PDDL                                  #  (ABS(DEN) TO PDL+2))  E:(-3) OR (-16)
057331,000455:                                                                                                  #                        M:(-3) OR (-15)
057332,000456: 27,3162           17363                                    DP(-22)                               #  RESTORE ABS(DEN) TO MPAC
057333,000457: 27,3163           00043                                    TFFX                                  #  NUM  E:(-16) OR (-29)  M:(-15) OR (-27)
057334,000458: 27,3164           53605                           DMP      SR*                                   
057335,000459: 27,3165           00031                                    TFFRTALF                              #  SQRT(ALFA)  E:(10+NA) M:(9+NA)
057336,000460: 27,3166           57201                                    0          -3,2                       #  X2=-NA
057337,000461: 27,3167           77671                           DDV                                            #  C(MPAC) =NUM SQRT(ALFA)       E:(-3) OR (-16)
057338,000462:                                                                                                  #                                M:(-3) OR (-15)
057339,000463:                                                                                                  #  ABS(DEN) FROM PDL+2   E:(-3) OR (-16)
057340,000464:                                                                                                  #                        M:(-3) OR (-15)
057341,000465: 27,3170           40145                           DLOAD    BOV                                   #  (THE DLOAD IS SHARED WITH TFFELL)
057342,000466: 27,3171           00043                                    TFFX                                  #  NUM  E:(-16) OR (-29)  M:(-15) OR (-27)
057343,000467: 27,3172           57253                                    TFFELL                                #  USE EQN FOR DELE GEQ 90, LEQ -90
057344,000468: 
057345,000469:                                                                                                  #  OTHERWISE, CONTINUE FOR GENERAL CONIC FOR TFF EQN
057346,000470: 
057347,000471: 27,3173           45471                           DDV      STADR                                 
057348,000472:                                                                                                  #  DEN FROM PDL+0        E:(-3) OR (-16)
057349,000473:                                                                                                  #                        M:(-3) OR (-15)
057350,000474: 27,3174           77732                           STORE    TFFTEM                                #  Z SAVE FOR SIGN OF SDELF.
057351,000475:                                                                                                  #  E:(-13) M:(-12)
057352,000476: 27,3175           63406                           PUSH     DSQ                                   #  Z TO PDL+0
057353,000477: 27,3176           41206                           PUSH     DMP                                   #  Z SQ TO PDL+2  E:(-26) M:(-24)
057354,000478: 27,3177           00035                                    TFFNP                                 #  LC P  E:(-38+2NR) M:(-36+2NR)
057355,000479: 27,3200           75261                           SL       SIGN                                  
057356,000480: 27,3201           20206                                    5                                     
057357,000481: 27,3202           00045                                    TFFTEM                                #  AFFIX SIGN FOR SDELF (ENTRY DISPLAY)
057358,000482: 27,3203           14045                           STODL    TFFTEM                                #  P ZSQ  E:(-59+2NR) M:(-55+2NR)
057359,000483:                                                                                                  #  (ARG IS USED IN TFF/TRIG)
057360,000484:                                                                                                  #  ZSQ FROM PDL+2  E:(-26) M:(-24)
057361,000485: 27,3204           41206                           PUSH     DMP                                   #  RESTORE PUSH LOC
057362,000486: 27,3205           00033                                    TFFALFA                               #  ALFA  E:(26-NR) M:(24-NR)
057363,000487: 27,3206           77657                           SL*                                            
057364,000488: 27,3207           20201                                    0,1                                   #  X1=-NR
057365,000489: 27,3210           00043                           STORE    TFFX                                  #  X
057366,000490: 27,3211           41234                           RTB      DMP                                   
057367,000491: 27,3212           57335                                    T(X)                                  #  POLY
057368,000492:                                                                                                  #  ZSQ FROM PDL+2  E:(-26) M:(-24)
057369,000493: 27,3213           44302                           SR2      BDSU                                  #  2 ZSQ T(X)  E:(-29) M:(-27)
057370,000494: 27,3214           00023                                    RTERM                                 #  RTERM  E:(-29) M:(-27)
057371,000495: 27,3215           41215                           DAD      DMP                                   
057372,000496: 27,3216           00015                                    RMAG1                                 #  E:(-29) M:(-27)
057373,000497:                                                                                                  #  Z FROM PDL+0  E:(-13) M:(-12)
057374,000498: 27,3217           51042                           SR3      BPL                                   #  TFF SQRT(MU)  E:(-45) M:(-42)
057375,000499: 27,3220           57241                                    ENDTFF                                #  (NO PUSH UP)
057376,000500: 27,3221           75206                           PUSH     SIGN                                  #  TFF SQRT(MU) TO PDL+0
057377,000501: 27,3222           00017                                    TFFQ1                                 #  Q1 FOR GONEPAST TEST
057378,000502: 27,3223           71244                           BPL      DLOAD                                 #  GONE PAST ?
057379,000503: 27,3224           57245                                    NEGTFF                                #  YES. TFF < 0.
057380,000504: 27,3225           00027                                    TFF1/ALF                              #  1/ALFA  E:(-22-2NA) M:(-20-2NA)
057381,000505: 27,3226           51076                           DCOMP    BPL                                   #  ALFA > 0 ?
057382,000506: 27,3227           57245                                    NEGTFF                                #  NO. TFF IS NEGATIVE.
057383,000507: 
057384,000508:                                                                                                  #  CORRECT FOR ORBITAL PERIOD.
057385,000509: 
057386,000510: 27,3230           77676                           DCOMP                                          #  YES.  CORRECT FOR ORB PERIOD.
057387,000511: 27,3231           56205                           DMP      DDV                                   
057388,000512: 27,3232           17357                                    PI/16                                 #  2 PI (-5)
057389,000513: 27,3233           00031                                    TFFRTALF                              #  SQRT(ALFA)  E:(10+NA) M:(9+NA)
057390,000514: 27,3234           53657                           SL*      SL*                                   
057391,000515: 27,3235           57602                                    0          -4,2                       #  X2=-NA
057392,000516: 27,3236           57602                                    0          -4,2                       
057393,000517: 27,3237           43257                           SL*      DAD                                   
057394,000518: 27,3240           57576                                    0,2                                   
057395,000519:                                                                                                  #  TFF SQRT(MU) FROM PDL+0       E:(-45) M:(-42)
057396,000520: 27,3241           40005        ENDTFF             DMP      BOV                                   #  TFF SQRT(MU) IN MPAC          E:(-45) M:(-42)
057397,000521: 27,3242           00037                                    TFF/RTMU                              #  E:(17) M:(14)
057398,000522: 27,3243           57251                                    MAXTFF                                #  SET POSMAX IF OVFL.
057399,000523: 
057400,000524: 27,3244           77616        DUMPTFF2           RVQ                                            #  RETURN TFF (-28) CS IN MPAC.
057401,000525: 
057402,000526: 27,3245           77745        NEGTFF             DLOAD                                          
057403,000527:                                                                                                  #  TFF SQRT(MU) FROM PDL+0, NEGATIVE.
057404,000528: 27,3246           77650                           GOTO                                           
057405,000529: 27,3247           57241                                    ENDTFF                                
057406,000530: 
057407,000531: 27,3250           77745        MAXTFF1            DLOAD                                          #  RESET PDL
057408,000532: 27,3251           43545        MAXTFF             DLOAD    RVQ                                   
057409,000533: 27,3252           17373                                    NEARONE                               
057410,000534: 
057411,000535:                                                                                                  #  TIME OF FLIGHT ELLIPSE WHEN DEL (ECCENTRIC ANOM) GEQ 90 AND LEQ -90.
057412,000536: 
057413,000537:                                                                                                  #  NUM FROM TFFX.        E:(-16) OR (-29)
057414,000538:                                                                                                  #                        M:(-15) OR (-27)
057415,000539: 27,3253           77712        TFFELL             SL2                                            #  NUM  E:(-14) OR (-27)  M:(-13) OR (-25)
057416,000540: 27,3254           41465                           BDDV     PUSH                                  #  TEMP SAVE D/N IN PDL+0
057417,000541:                                                                                                  #  DEN FROM PDL+0  E:(-3)/( 16)  M:(-3)/(-15)
057418,000542:                                                                                                  #  N/D TO PDL+0  E:(11) M:(10)
057419,000543: 27,3255           45345        TFFEL1             DLOAD    DSU                                   #  (ENTER WITH D/N=0 IN PDL+0)
057420,000544: 27,3256           00045                                    TFFTEM                                #  Q2  E:(-16) M:(-15)
057421,000545: 27,3257           00017                                    TFFQ1                                 #  Q1  E:(-16) M:(-15)
057422,000546: 27,3260           14013                           STODL    TFFDELQ                               #  Q2-Q1  E:(-16) M:(-15)
057423,000547:                                                                                                  #  D/N FROM PDL+0
057424,000548: 27,3261           77626                           STADR                                          
057425,000549: 27,3262           77732                           STORE    TFFTEM                                #  D/N  E:(11) M:(10)
057426,000550: 27,3263           53605                           DMP      SL*                                   
057427,000551: 27,3264           00027                                    TFF1/ALF                              #  1/ALFA  E:(-22-2NA) M:(-20-2NA)
057428,000552: 27,3265           57576                                    0,2                                   #  1/ALFA Z  E:(-11-NA) M:(-10-NA)
057429,000553: 27,3266           41206                           PUSH     DMP                                   #  TO PDL+0
057430,000554: 27,3267           00045                                    TFFTEM                                #  1/Z  E:(11) M:(10)
057431,000555: 27,3270           41057                           SL*      BOVB                                  
057432,000556: 27,3271           57576                                    0,2                                   #  X2= -NA
057433,000557: 27,3272           45712                                    SIGNMPAC                              #  IN CASE X= 1.0, CONTINUE
057434,000558: 27,3273           00043                           STORE    TFFX                                  #  X=1/ALFA ZSQ
057435,000559: 27,3274           41234                           RTB      DMP                                   
057436,000560: 27,3275           57335                                    T(X)                                  #  POLY
057437,000561: 27,3276           00043                                    TFFX                                  
057438,000562: 27,3277           45242                           SR3      DSU                                   
057439,000563: 27,3300           17365                                    DP2(-3)                               
057440,000564: 27,3301           41405                           DMP      PUSH                                  #  2(X T(X)-1) /Z ALFA   E:(-15-NA)
057441,000565:                                                                                                  #                        M:(-14-NA)
057442,000566:                                                                                                  #  1/ALFA Z FROM PDL+0   E:(-11-NA)
057443,000567:                                                                                                  #                        M:(-10-NA)
057444,000568: 27,3302           41345                           DLOAD    DMP                                   #  GET SIGN FOR SDELF
057445,000569: 27,3303           00045                                    TFFTEM                                #  1/Z  E:(11) M:(10)
057446,000570: 27,3304           00015                                    RMAG1                                 #  E:(-29) M:(-27)
057447,000571: 27,3305           43312                           SL2      DAD                                   
057448,000572: 27,3306           00017                                    TFFQ1                                 #  Q1  E:(-16) M:(-15)
057449,000573: 27,3307           14045                           STODL    TFFTEM                                #  (Q1+R 1/Z) =SGN OF SDELF  E:(-16) M:(-15
057450,000574: 27,3310           00035                                    TFFNP                                 #  LC P  E:(-38+2NR) M:(-36+2NR)
057451,000575: 27,3311           53605                           DMP      SL*                                   #  CALC FOR ARG FOR TFF/TRIG.
057452,000576: 27,3312           00027                                    TFF1/ALF                              #  1/ALFA  E:(-22-2NA) M:(-20-2NA)
057453,000577: 27,3313           57575                                    1,2                                   #  X2=-NA
057454,000578: 27,3314           53765                           SIGN     SL*                                   
057455,000579: 27,3315           00045                                    TFFTEM                                #  AFFIX SIGN FOR SDELF
057456,000580: 27,3316           57576                                    0,2                                   
057457,000581: 27,3317           14045                           STODL    TFFTEM                                #  P/ALFA  E:(-59+2NR) M:(-55+2NR)
057458,000582:                                                                                                  #  (ARG FOR USE IN TFF/TRIG)
057459,000583: 27,3320           00027                                    TFF1/ALF                              #  1/ALFA  E:(-22-2NA) M:(-20-2NA)
057460,000584: 27,3321           41366                           SQRT     DMP                                   
057461,000585: 27,3322           17357                                    PI/16                                 #  PI (-4)
057462,000586: 27,3323           77615                           DAD                                            
057463,000587:                                                                                                  #  2(XT(X)-1)/Z ALFA FROM PDL    E:(-15-NA)
057464,000588:                                                                                                  #                                M:(-14-NA)
057465,000589: 27,3324           45257                           SL*      DSU                                   
057466,000590: 27,3325           57577                                    0          -1,2                       
057467,000591: 27,3326           00013                                    TFFDELQ                               #  Q2-Q1  E:(-16) M:(-15)
057468,000592: 27,3327           53605                           DMP      SL*                                   
057469,000593: 27,3330           00027                                    TFF1/ALF                              #  1/ALFA  E:(-22-2NA) M:(-20-2NA)
057470,000594: 27,3331           57601                                    0          -3,2                       
057471,000595: 27,3332           52057                           SL*      GOTO                                  
057472,000596: 27,3333           57602                                    0          -4,2                       
057473,000597: 27,3334           57241                                    ENDTFF                                #  TFF SQRT(MU) IN MPAC E:(-45) M:(-42)
057474,000598: 
057475,000599:                                                                                                  #  PROGRAM NAME:  T(X)                           DATE:  01.17.67
057476,000600:                                                                                                  #  MOD NO:  0                                    LOG SECTION:  TIME OF FREE FALL
057477,000601:                                                                                                  #  MOD BY:  RR BAIRNSFATHER
057478,000602: 
057479,000603:                                                                                                  #  FUNCTIONAL DESCRIPTION:  THE POLYNOMIAL T(X) IS USED BY TIME OF FLIGHT SUBROUTINES CALCTFF AND
057480,000604:                                                                                                  #        CALCTPER TO APPROXIMATE THE SERIES
057481,000605:                                                                                                  #                           2     3
057482,000606:                                                                                                  #                1/3 -X/5 +X /7 -X /9 ...
057483,000607: 
057484,000608:                                                                                                  #        WHERE   X = ALFA Z Z            IF ALFA Z Z LEQ 1
057485,000609:                                                                                                  #                X = 1/(ALFA Z Z)        IF ALFA Z Z G 1
057486,000610: 
057487,000611:                                                                                                  #        ALSO    X IS NEG FOR HYPERBOLIC ORBITS
057488,000612:                                                                                                  #                X = 0 FOR PARABOLIC ORBITS
057489,000613:                                                                                                  #                X IS POSITIVE FOR ELLIPTIC ORBITS
057490,000614: 
057491,000615:                                                                                                  #        FOR FLIGHT 278, THE POLYNOMIAL T(X) IS FITTED OVER THE RANGE (0,+1) AND HAS A MAXIMUM
057492,000616:                                                                                                  #        DEVIATION FROM THE SERIES OF 2 E-5       (T(X) IS A CHEBYCHEV TYPE FIT AND WAS OBTAINED USING
057493,000617:                                                                                                  #        MAC PROGRAM AUTCURFIT294RRB AND IS VALID TO THE SAME TOLERANCE OVER THE RANGE (-.08,+1).)
057494,000618: 
057495,000619:                                                                                                  #  CALLING SEQUENCE:     RTB
057496,000620:                                                                                                  #                                T(X)
057497,000621:                                                                                                  #        C(MPAC) = X
057498,000622: 
057499,000623:                                                                                                  #  SUBROUTINES CALLED:  NONE
057500,000624: 
057501,000625:                                                                                                  #  NORMAL EXIT MODE:  TC DANZIG
057502,000626: 
057503,000627:                                                                                                  #  ALARMS:  NONE
057504,000628: 
057505,000629:                                                                                                  #  OUTPUT:  C(MPAC) = T(X)
057506,000630: 
057507,000631:                                                                                                  #  ERASABLE INITIALIZATION REQUIRED:
057508,000632:                                                                                                  #        C(MPAC) = X
057509,000633: 
057510,000634:                                                                                                  #  DEBRIS:  NONE
057511,000635: 
057512,000636: 27,3335           07171        T(X)               TC       POLY                                  
057513,000637: 27,3336           00004                           DEC      4          B-14                       #  N-1
057514,000638: 27,3337           12525 12525                     2DEC     3.333333333 E-1                        
057515,000639: 27,3341           71463 57703                     2DEC*    -1.999819135 E-1*                       
057516,000640: 27,3343           04423 17645                     2DEC*    1.418148467 E-1*                       
057517,000641: 27,3345           74604 43667                     2DEC*    -1.01310997 E-1*                       
057518,000642: 27,3347           01626 37256                     2DEC*    5.609004986 E-2*                       
057519,000643: 27,3351           77404 52071                     2DEC*    -1.536156925 E-2*                       
057520,000644: 
057521,000645: 27,3353           06030        ENDT(X)            TC       DANZIG                                
057522,000646: 
057523,000647: 27,3354  27,3353               TCDANZIG           =        ENDT(X)                               
057524,000648: 
057525,000649:                                                                                                  #  TFF CONSTANTS
057526,000650: 
057527,000651: 32,3770                                           BANK     32                                    
057528,000652: 
057529,000653: 27,2000                                           SETLOC   TOF-FF1                               
057530,000654: 27,2000                                           BANK                                           
057531,000655: 
057532,000656:                                                                                                  #                                                NOTE _  NOTE _ ADJUSTED MUE FOR NEAR EARTH TRAJ.
057533,000657:                                                                                                  # MUE            =       3.990815471 E10         M CUBE/CS SQ
057534,000658:                                                                                                  # RTMUE          =       1.997702549 E5 B-18*    MODIFIED EARTH MU
057535,000659: 
057536,000660: 27,3354           24775 30424  1/RTMU             2DEC*    .5005750271 E-5        B17*            #  MODIFIED EARTH MU
057537,000661: 
057538,000662:                                                                                                  #                                                NOTE _  NOTE _ ADJUSTED MUE FOR NEAR EARTH TRAJ.
057539,000663:                                                                                                  # MUM            =       4.902778 E8             M CUBE/CS SQ
057540,000664:                                                                                                  # RTMUM          2DEC*   2.21422176 E4 B-18*
057541,000665: 27,3356           06220 37553  PI/16              2DEC     3.141592653 B-4                        
057542,000666: 27,3360           37777 37700  LIM(-22)           2OCT     3777737700                            #  1.0 -B(-22)
057543,000667: 27,3362           00000 00100  DP(-22)            2OCT     0000000100                            #  B(-22)
057544,000668: 27,3364           04000 00000  DP2(-3)            2DEC     1          B-3                        
057545,000669: 27,3366           02000 00000  DP2(-4)            2DEC     1          B-4                        #  1/16
057546,000670: 
057547,000671:                                                                                                  #  RPAD1         2DEC    6373338 B-29            M (-29) = 20909901.57 FT
057548,000672: 27,3370  22,3151               RPAD1              =        RPAD                                  
057549,000673: 
057550,000674: 27,3370           00305 11205  R300K              2DEC     6464778    B-29                       #  (-29) M
057551,000675: 27,3372           37777 37777  NEARONE            2DEC     .999999999                            
057552,000676: 27,3374  26,3333               TFFZEROS           EQUALS   HI6ZEROS                              
057553,000677: 27,3374  26,3323               TFF1/4             EQUALS   HIDP1/4                               

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