forked from chrislgarry/Apollo-11
-
Notifications
You must be signed in to change notification settings - Fork 0
/
CONIC_SUBROUTINES.s
1922 lines (1771 loc) · 46.2 KB
/
CONIC_SUBROUTINES.s
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
# Copyright: Public domain.
# Filename: CONIC_SUBROUTINES.agc
# Purpose: Part of the source code for Colossus 2A, AKA Comanche 055.
# It is part of the source code for the Command Module's (CM)
# Apollo Guidance Computer (AGC), for Apollo 11.
# Assembler: yaYUL
# Contact: Ron Burkey <info@sandroid.org>.
# Website: www.ibiblio.org/apollo.
# Pages: 1262-1308
# Mod history: 2009-05-08 RSB Adapted from the Colossus249/ file of the
# same name, using Comanche055 page images.
# 2009-05-20 RSB Corrected: Fixed four interpreter
# instructions.
#
# This source code has been transcribed or otherwise adapted from digitized
# images of a hardcopy from the MIT Museum. The digitization was performed
# by Paul Fjeld, and arranged for by Deborah Douglas of the Museum. Many
# thanks to both. The images (with suitable reduction in storage size and
# consequent reduction in image quality as well) are available online at
# www.ibiblio.org/apollo. If for some reason you find that the images are
# illegible, contact me at info@sandroid.org about getting access to the
# (much) higher-quality images which Paul actually created.
#
# Notations on the hardcopy document read, in part:
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. 10:28 APR. 1, 1969
#
# This AGC program shall also be referred to as
# Colossus 2A
# Page 1262
# PROGRAM DESCRIPTION -- ENTIRE CONIC SUBROUTINE LOG SECTION DATE -- 1 SEPTEMBER 1967
# MOD NO. -- 0 LOG SECTION -- CONIC SUBROUTINES
# MOD BY KRAUSE ASSEMBLY -- COLOSSUS REVISION 88
#
# FUNCTIONAL DESCRIPTION --
# THE FOLLOWING SET OF SUBROUTINES SOLVE VARIOUS PROBLEMS INVOLVING THE TRAJECTORY PRODUCED BY A CENTRAL
# INVERSE-SQUARE FORCE ACTING ON A POINT MASS, AS OUTLINED IN THE CMC AND LGC LUNAR LANDING MISSION GSOP, SECTION
# 5.5.1.2. A GENERAL USAGE POINT-OF-VIEW WAS TAKEN IN FORMULATING, MECHANIZING, AND SCALING THE SUBROUTINES,
# RATHER THAN OPTIMIZING EACH FOR A PARTICULAR USE. THEREFORE, MULTIPLE USAGE CAN BE MADE OF THE SUBROUTINES
# INVOLVING ANY REALISTIC SET OF CONSTRAINTS. IT SHOULD BE NOTED THAT ONLY ONE SET OF CODING IS USED, WHETHER THE
# EARTH, MOON, OR ANY OTHER CELESTIAL BODY IS SPECIFIED AS THE CENTRAL BODY OF THE PROBLEM, PROVIDED ONE OBSERVES
# THE INHERENT SCALE CHANGE REQUIRED IN POSITION, VELOCITY, MU, AND TIME, AS OUTLINES IN MISSION PROGRAMMING
# DEFINITION MEMO NO. 10. THIS CAN BE ACCOMPLISHED BY SIMPLY ADDING TO THE MUTABLE AND INITIALIZING THE SUBROUTINES
# APPROPRIATELY.
#
# DUE TO THE UNIFORMITY OF THE EQUATIONS INVOLVED, CODING WAS MINIMIZED BY TREATING INDIVIDUAL EQUATIONS AND
# BLOCKS OF EQUATIONS AS SUBROUTINES OF LOWER RANK WHENEVER POSSIBLE. AS A RESULT, THREE BY-PRODUCTS SUBROUTINES,
# DIRECTLY USABLE AS INDEPENDENT SUBROUTINES, WERE GENERATED.
#
# RESTRICTIONS --
# THE ONLY LIMITATION IN THE SCOPE OF THE PROBLEM WHICH CAN BE SOLVED BY A PARTICULAR SUBROUTINE IS THE SCALING
# LIMIT OF EACH PARAMETER AS SPECIFIED IN THE GSOP. THESE SCALING LIMITS WERE CHOSEN SO THAT ALL FEASIBLE TRAJECTORIES
# COULD BE HANDLED.
#
# SINCE THE SUBROUTINES (EXCEPT KEPLER) USE COMMON SUBROUTINES OF LOWER RANK WHICH USE ERASABLE OTHER THAN
# THE PUSHLIST (DUE TO ITS LIMITED SIZE) AND COMMON INTERPRETIVE SWITCHES, THE CONIC SUBROUTINES CANNOT BE ALLOWED
# TO INTERRUPT EACH OTHER. IT IS UP TO THE USER TO GUARANTEE THIS CONDITION.
# Page 1263
# PROGRAM DESCRIPTION -- KEPLER SUBROUTINE DATE -- 11 OCTOBER 1967
# MOD NO. -- 1 LOG SECTION -- CONIC SUBROUTINES
# MOD BY KRAUSE ASSEMBLY -- COLOSSUS 103 AND SUNDANCE 222
# MOD NO. -- 2 (AUGUST 1968) BY ROBERTSON: TO PERMIT BACKDATING BY MORE THAN ONE ORBITAL PERIOD.
# MOD NO. -- 3 (DEC 1968) BY ROBERTSON: SUPPRESSION OF X-MODULO-ING
# MOD NO. -- 4 (JAN 1969) BY ROBERTSON: CLEAR OVFIND AT KEPLER ENTRY
#
# FUNCTIONAL DESCRIPTION --
# THIS SUBROUTINE, GIVEN AN INITIAL STATE VECTOR AND THE DESIRED TRANSFER TIME THROUGH WHICH THE STATE IS TO
# BE UPDATED ALONG A CONIC TRAJECTORY, COMPUTES THE NEW, UPDATED STATE VECTOR. THE TRAJECTORY MAY BE ANY CONIC
# SECTION -- CIRCULAR, ELLIPTIC, PARABOLIC, HYPERPOLIC, OR RECTILINEAR WITH RESPECT TO THE EARTH OR THE MOON. THE
# USE OF THE SUBROUTINE CAN BE EXTENDED USING OTHER PRIMARY BODIES BY SIMPLE ADDITIONS TO THE MUTABLE WITHOUT
# INTRODUCING ANY CODING CHANGES, ACCEPTING THE INHERENT SCALE FACTOR CHANGES IN POSITION AND VELOCITY. AN ITERATION
# TECHNIQUE IS UTILIZED IN THE COMPUTATION.
#
# IF A NEGATIVE TIME-OF-FLIGHT IS INPUT, THE PROGRAM WILL SOLVE FOR THE STATE WHICH WOULD BE PRODUCED BY
# EXTRAPOLATING THE POSITION BACKWARD IN TIME.
#
# IF THE ABSOLUTE VALUE DESIRED TRANSFER TIME EXCEEDS THE ORBITAL PERIOD, THE SUBROUTINE, THROUGH A
# MODULAR TECHNIQUE, WILL COMPUTE THE STATE CORRESPONDING TO THE DESIRED TIME AS USUAL.
#
# THE RESTRICTIONS ARE --
# 1. (PREVIOUS RESTRICTION ON THE NEGATIVE DESIRED TRANSFER TIME IS NOW DELETED.)
# 2. THE PARAMETERS IN THE PROBLEM CANNOT EXCEED THEIR SCALING LIMITS AS SPECIFIED IN THE GSOP. IF
# ANY OF THESE LIMITS ARE EXCEEDED, THE RESULTING SOLUTION WILL BE MEANINGLESS.
#
# THE NUMBER OF ITERATIONS AND, THEREFORE, THE COMPUTATION SPEED IS DEPENDENT ON THE ACCURACY OF THE
# GUESS, XKFPNEW. THE AGC COMPUTATION TIME IS APPROXIMATELY .061 SECONDS FOR INITIALIZATION, .065 SECONDS FOR THE
# FINAL COMPUTATIONS, PLUS .083 SECONDS FOR EACH ITERATION.
#
# REFERENCES --
# R-479, MISSION PROGRAMMING DEFINITION MEMO NO. 10, LUNAR LANDING MISSION GSOP, SECTION 5.5, SGA
# MEMO 67-4.
#
# INPUT -- ERASABLE INITIALIZATION REQUIRED
# SCALE FACTOR
# VARIABLE IN POWERS OF 2 DESCRIPTION AND REMARKS
# -------- -------------- -----------------------
# RRECT +29 FOR EARTH DP INITIAL POSITION VECTOR IN METERS
# +27 FOR MOON
# Page 1264
# VRECT +7 FOR EARTH DP INITIAL VELOCITY VECTOR IN METERS/CENTISECOND
# +5 FOR MOON
# X1 (38D) NONE INDEX REGISTER SET TO -2D OR -10D ACCORDING TO WHETHER THE EARTH OR MOON,
# RESPECTIVELY, IS THE CENTRAL BODY
# TAU +28 DESIRED TRANSFER TIME IN CENTISECONDS (DP)
# MAY BE POS OR NEG AND ABSOLUTE VALUE MAY BE GREATER OR LESS THAN ONE ORBITAL PERIOD.
# XKEPNEW +17 FOR EARTH DP GUESS OF ROOT X OF KEPLERS EQN IN SQRT(METERS).SIGN SHOULD AGREE WTIH THAT OF TAU.
# +16 FOR MOON AND ABS VALUE SHOULD BE LESS THAN THAT CORRESPONDING TO A PERIOD, VIZ, 2PI SQRT(SEMI-
# MAJOR AXIS), FOR SPEED OF CONVERGENCE, BUT IF EITHER CONDITION FAILS, XKEPNEW IS RESET
# BY KEPLER TO A POOR BUT VALID GUESS.
# TC +28 DP PREV. VALUE OF TIME IN CENTISECS. MUST BE LESS THAN ONE ORBITAL PERIOD.
# XPREV +17 FOR EARTH PRVIOUS VALUE OF X IN SQRT(METERS). MUST BE LESS THAN AN X CORRESPONDING TO ONE
# +16 FOR MOON ORBITAL PERIOD, VIZ, 2PI SQRT(SEMI-MAJOR AXIS)
#
# SUBROUTINES CALLED --
# DELTIME
#
# CALLING SEQUENCE AND NORMAL EXIT MODES --
# KEPRTN-2 GOTO # MUST BE IN INTERPRETIVE MODE BUT OVFIND ARBITRARY.
# KEPRTN-1 KEPLER # RETURNS WITH XPREV IN MPAC. PL IS AT 0.
# KEPRTN ... # CONTINUE
#
# KEPLER MUST NOT BE CALLED DIRECTLY SINCE AN INTERRUPTION OF IT WOULD DESTROY THE ERASABLES IT NEEDS TO COMPLETE
# THE INTERRUPTED JOB. THEREFORE THE USER MUST CALL CSMCONIC OR LEMCONIC WHICH GUARANTEES NO INTERRUPTS AND WHICH
# ALSO CALLS KEPPREP TO COMPUTE A GUESS OF XKEPNEW.
#
# ABORT EXIT MODE --
# NONE
#
# OUTPUT --
# SCALE FACTOR
# VARIABLE IN POWERS OF 2 DESCRIPTION AND REMARKS
# -------- -------------- -----------------------
# RCV +29 FOR EARTH DP TERMINAL POSITION VECTOR IN METERS
# +27 FOR MOON
# VCV +7 FOR EARTH DP TERMINAL VELOCITY VECTOR IN METERS/CENTISEC
# +5 FOR MOON
# TC +28 DP TRANSFER TIME IN CENTISECS TO WHICH KEPLER CONVERGED. ALWAYS LESS THAN ONE PERIOD.
# XPREV +17 FOR EARTH DP VALUE OF X IN SQRT(METERS) TO WHICH KEPLER CONVERGED. ALWAYS LESS THAN THE X
# +16 FOR MOON CORRESPONDING TO ONE PERIOD.
# Page 1265
# FOR OTHER OUTPUT WHICH MAY BE OF USE, SEE DEBRIS.
#
# DEBRIS --
# PARAMETERS WHICH MAY BE OF USE --
# SCALE FACTOR
# VARIABLE IN POWERS OF 2 DESCRIPTION AND REMARKS
# -------- -------------- -----------------------
# URRECT +1 DP UNIT VECTOR OF INITIAL POSITION
# R1 +29 FOR EARTH DP MAGNITUDE OF INITIAL POSITION IN METERS
# +27 FOR MOON
# ALPHA -22 FOR EARTH DP INVERSE OF SEMI-MAJOR AXIS IN 1/METERS
# -20 FOR MOON
# TMODULO +28 DP INTEGRAL NUMBER OF PERIODS IN CENTISECS, WHICH WAS SUBTRACTED FROM TAU. TO PRODUCE A
# TAU. OF LESS THAN ONE PERIOD.
#
# PARAMETERS OF NO USE --
# DP PARAMETERS -- FPSILENT, DELX, DELT, RCNORM, XMODULO, PLUS PUSHLIST REGISTERS 0 THROUGH 39D.
# Page 1266
# PROGRAM DESCRIPTION -- LAMBERT SUBROUTINE DATE -- 1 SEPTEMBER 1967
# MOD NO. -- 0 LOG SECTION -- CONIC SUBROUTINES
# MOD BY KRAUSE ASSEMBLY -- COLOSSUS REVISION 88
#
# FUNCTIONAL DESCRIPTION --
# THIS SUBROUTINE CALCULATES THE INITIAL VELOCITY REQUIRED TO TRANSFER A POINT-MASS ALONG A CONIC TRAJECTORY
# FROM AN INITIAL POSITION TO A TERMINAL POSITION IN A PRESCRIBED TIME INTERVAL. THE RESULTING TRAJECTORY MAY BE
# A SECTION OF A CIRCLE, ELLIPSE, PARABOLA, OR HYPERBOLA WITH RESPECT TO THE EARTH OR THE MOON. THE USE OF THE
# SUBROUTINE CAN BE EXTENDED USING OTHER PRIMARY BODIES BY SIMPLE ADDITIONS TO THE MUTABLE WITHOUT INTRODUCING ANY
# CODING CHANGES, ACCEPTING THE INHERENT SCALE FACTOR CHANGES IN POSITION AND VELOCITY. AN ITERATION TECHNIQUE IS
# UTILIZED IN THE COMPUTATION.
#
# THE RESTRICTIONS ARE: --
# 1. RECTILINEAR TRAJECTORIES CANNOT BE COMPUTED.
# 2. AN ACCURACY DEGRADATION OCCURS AS THE COSINE OF THE TRUE ANOMALY DIFFERENCE APPROACHES +1.0.
# 3. THE ANGLE BETWEEN ANY POSITION VECTOR AND ITS VELOCITY VECTOR MUST BE GREATER THAN 1 DEGREE 47.5 MINUTES
# AND LESS THAN 178 DEGREES 12.5 MINUTES.
# 4. NEGATIVE TRANSFER TIME IS AMBIGUOUS AND WILL RESULT IN NO SOLUTION.
# 5. THE PARAMETERS IN THE PROBLEM MUST NOT EXCEED THEIR SCALING LIMITS SPECIFIED IN THE GSOP. IF THE
# LIMITS ARE EXCEEDED, THE RESULTING SOLUTION WILL BE MEANINGLESS.
#
# THE NUMBER OF ITERATIONS AND, THEREFORE, THE COMPUTATION'S SPEED IS DEPENDENT ON THE ACCURACY OF THE FIRST
# GUESS OF THE INDEPENDENT VARIABLE, COGA. THE AGC COMPUTATION TIME IS APPROXIMATELY
# .105 SECONDS FOR INITIALIZATION, .069 SECONDS FOR FINAL COMPUTATIONS, PLUS .205 SECONDS FOR EACH ITERATION.
#
# REFERENCES --
# R-479, MISSION PROGRAMMING DEFINITION MEMO NO. 10, LUNAR LANDING MISSION GSOP -- SECTION 5.5, SGA MEMO 67-8,
# SGA MEMO 67-4.
#
# INPUT -- ERASABLE INITIALIZATION REQUIRED
# SCALE FACTOR
# VARIABLE IN POWERS OF 2 DESCRIPTION AND REMARKS
# -------- -------------- -----------------------
# R1VEC +29 FOR EARTH DP INITIAL POSITION VECTOR IN METERS
# +27 FOR MOON
# R2VEC +29 FOR EARTH DP TARGET OR TERMINAL POSITION VECTOR IN METERS
# +27 FOR MOON
# TDESIRED +28 DP DESIRED TRANSFER TIME IN CENTISECONDS
# X1 (38D) NONE INDEX REGISTER SET TO -2D OR -10D ACCORDING TO WHETHER THE EARTH OR MOON,
# RESPECTIVELY, IS THE CENTRAL BODY
# GEOMSGN NONE SP +.5 IF DESIRED TRANSFER ANGLE IS LESS THAN 180 DEGREES, -.5 IF GREATER THAN 180 DEG.
# GUESSW NONE AN INTERPRETER SWITCH TO BE SET IF NO GUESS OF COGA IS AVAILABLE, CLEAR IF A GUESS OF
# Page 1267
# COGA IS TO BE USED BY LAMBERT
# COGA +5 DP GUESS OF COTANGENT OF FLIGHT PATH ANGLE (MEASURED FROM VERTICAL). THIS WILL BE
# IGNORED IF GUESSW IS SET.
# NORMSW NONE AN INTERPRETER SWITCH TO BE SET IF UN IS TO BE AN INPUT TO THE SUBROUTINE, CLEAR IF
# LAMBERT IS TO COMPUTE ITS OWN NORMAL (UN).
# UN +1 DP UNIT NORMAL TO THE DESIRED ORBIT PLANE IN THE DIRECTION OF THE RESULTING ANGULAR
# MOMENTUM VECTOR. THIS WILL BE IGNORED IF NORMSW IS CLEAR.
# VTARGTAG NONE A S.P. TAG TO BE SET TO ZERO IF LAMBERT IS TO COMUTE THE VELOCITY OF R2VEC AS WELL AS
# AT R1VEC.
#
# SUBROUTINES CALLED --
# GEOM, GETX, DELTIME, ITERATOR, LAMENTER (PART OF NEWSTATE)
#
# CALLING SEQUENCE AND NORMAL EXIT MODES --
# L CALL # MUST BE IN INTERPRETIVE MODE BUT OVFIND ARBITRARY.
# L+1 LAMBERT # RETURNS WITH PL AT 0 AND WITH VVEC IN MPAC IF VTARGTAG WAS WAS NON-ZERO OR VTARGET
# # IN MPAC IF VTARGTAG WAS ZERO
# L+2 BON # CONTINUE IF SOLNSW CLEAR SINCE SOLUTION IS ACCEPTABLE
# L+3 SOLNSW
# L+4 LAMABORT
#
# IF A LAMBER RESULT IS TO BE A FIRST GUESS FOR THE NEXT LAMBERT CALCULATION, COGA MUST BE PRESERVED AND
# GUESSW MUST BE CLEAR FOR EACH SUCCEEDING LAMBERT CALL.
#
# ABORT EXIT MODES --
# IF SOLNSW WAS SET UPON EXITING, EITHER LAMBERT WAS ASKED TO COMPUTE A TRANSFER TOO NEAR 0 OR 360 DEG, OR T
# WAS TOO SMALL TO PRODUCE A REALISTIC TRANSFER BETWEEN R1VEC AND R2FEC. IN EITHER CASE THE FIX MUST BE MADE
# ACCORDING TO THE NEEDS OF THE PARTICULAR USER. THE ABORT EXIT MODE MAY BE CODED AS ...
# LAMBERT DLOAD ABS # A MEASURE OF THE PROXIMITY TO 0 OR
# 1-CHTH # 360 DEGREES.
# DSU BWM
# ONEBIT
# CHANGER2 # CHANGE R2VEC DIRECTION SLIGHTLY.
# DLOAD DAD
# TDESIRED
# SOMETIME
# STCALL TDESIRED # INCRESE TDESIRED
# LAMBERT
#
# OUTPUT --
# SCALE FACTOR
# VARIABLE IN POWERS OF 2 DESCRIPTION AND REMARKS
# Page 1268
# -------- -------------- -----------------------
# VVEC +7 FOR EARTH DP INITIAL VELOCITY VECTOR IN METERS/CENTISECOND REQUIRED TO SATISFY THE BOUNDARY VALUE
# +5 FOR MOON PROBLEM.
# VTARGET +7 FOR EARTH DP RESULTANT VELOCITY VECTOR AT R2VEC IN METERS/CENTISECOND.
# +5 FOR MOON
# SOLNSW NONE INTERPRETER SWITCH WHICH IS SET IF THE SUBROUTINE CANNOT SOLVE THE PROBLEM, CLEAR IF THE
# SOLUTION EXISTS.
#
# FOR OTHER OUTPUT WHICH MAY BE OF USE, SEE DEBRIS.
#
# DEBRIS --
# PARAMETERS WHICH MAY BE OF USE --
# SCALE FACTOR
# VARIABLE IN POWERS OF 2 DESCRIPTION AND REMARKS
# -------- -------------- -----------------------
# SNTH +1 DP SIN OF ANGLE BETWEEN R1VEC AND R2VEC
# CSTH +1 DP COSINE OF ANGLE
# 1-CSTH +2 DP 1-CSTH
# COGA +5 DP COTAN OF INITIAL REQUIRED FLIGHT PATH ANGLE MEASURED FROM VERTICAL
# P +4 DP RATIO OF SEMILATUS RECTUM TO INITIAL RADIUS
# R1A +6 DP RATIO OF INITIAL RADIUS TO SEMI-MAJOR AXIS
# R1 (32D) +29 FOR EARTH DP INITIAL RADIUS IN METERS
# +27 FOR MOON
# UR1 +1 DP UNIT VECTOR OF R1VEC
# U2 +1 DP UNIT VECTOR OF R2VEC
#
# PARAMETERS OF NO USE --
# DP PARAMETERS -- EPSILONL, CSTH-RHO, TPREV, TERRLAMB, R2, RTNLAMB (SP), PLUS PUSHLIST REGISTER 0 THROUGH 41D
# ADDITIONAL INTERPRETIVE SWITCHES USED -- INFINFLG, 360SW, SLOPESW, ORDERSW
# Page 1269
# PROGRAM DESCRIPTION -- TIME-THETA SUBROUTINE DATE -- 1 SEPTEMBER 1967
# MOD NO. -- 0 LOG SECTION -- CONIC SUBROUTINES
# MOD BY KRAUSE ASSEMBLY -- COLOSSUS REVISION 88
#
# FUNCTIONAL DESCRIPTION --
# THIS SUBROUTINE, GIVEN AN INITIAL STATE VECTOR AND A DESIRED TRUE-ANOMALY-DIFFERENCE THROUGH WHICH THE
# STATE IS TO BE UPDATED ALONG A CONIC TRAJECTORY, CALCULATES THE CORRESPONDING TIME-OF-FLIGHT AND, IN ADDITION,
# PROVIDES THE OPTION OF COMUTING THE NEW UPDATED STATE VECTOR. THE RESULTING TRAJECTORY MAY BE A SECTION OF A
# CIRCLE, ELLIPSE, PARABOLA, OR HYPERBOLA WITH RESPECT TO THE EARTH OR THE MOON. THE USE OF THE SUBROUTINE CAN BE
# EXTENDED USING OTHER PRIMARY BODIES BY SIMPLE ADDITIONS TO THE MUTABLE WTIHOUT INTRODUCING ANY CODING CHANGES,
# ACCEPTING THE INHERENT SCALE FACTOR CHANGES IN POSITION AND VELOCITY.
#
# THE RESTRICTIONS ARE --
# 1. THE ANGLE BETWEEN ANY POSITION VECTOR AND ITS VELOCITY VECTOR MUST BE GREATER THAN 1 DEGREE 47.5 MINUTES
# AND LESS THAN 178 DEGREES 12.5 MINUTES.
# 2. THE PARAMETERS IN THE PROBLEM MUST NOT EXCEED THEIR SCALING LIMITS SPECIFIED IN THE GSCP. IF THE LIMITS
# ARE EXCEEDED, THE RESULTING SOLUTION WILL BE MEANINGLESS.
#
# THE AGC COMPUTATION TIME IS APPROXIMATELY .292 SECONDS.
#
# REFERENCES --
# R-479, MISSION PROGRAMMING DEFINITION MEMO NO. 10, LUNAR LANDING MISSION GSOP-SECTION 5.5, SGA MEMO 67-8.
#
# INPUT -- ERASABLE INITIALIZATION REQUIRED
# SCALE FACTOR
# VARIABLE IN POWERS OF 2 DESCRIPTION AND REMARKS
# -------- -------------- -----------------------
# RVEC +29 FOR EARTH DP INITIAL POSITION VECTOR IN METERS
# +27 FOR MOON
# VVEC +7 FOR EARTH DP INITIAL VELOCITY VECTOR IN METERS/CENTISECOND
# +5 FOR MOON
# SNTH +1 ` DP SINE OF THE TRUE-ANOMALY-DIFFERENCE THROUGH WHICH THE STATE IS TO BE UPDATED
# CSTH +1 DP COSINE OF THE ANGLE
# RVSW NONE AN INTERPRETIVE SWITCH TO BE SET IF ONLY TIME IS TO BE AN OUTPUT, CLEAR IF THE NEW STATE
# IS TO BE COMPUTED ALSO.
# X1 (38D) NONE INDEX REGISTER TO BE SET TO -2D OR -10D ACCORDING TO WHETHER THE EARTH OR MOON,
# RESPECTIVELY, IS THE CENTRAL BODY.
#
# SUBROUTINES CALLED --
# Page 1270
# PARAM, GEOM, GETX, DELTIME, NEWSTATE
#
# CALLING SEQUENCE AND NORMAL EXIT MODES --
# IF ONLY TIME IS DESIRED AS OUTPUT --
# L SET CALL # MUST BE IN INTERPRETIVE MODE BUT OVFIND ARBITRARY.
# L+1 RVSW
# L+2 TIMETHET # RETURN WITH PL AT 0 AND T IN MPAC
# L+3 ... # CONTINUE
#
# IF THE UPDATE STATE VECTOR IS DESIRED AS WELL --
# L CLEAR CALL # MUST BE IN INTERPRETIVE MODE BUT OVFIND ARBITRARY.
# L+1 RVSW
# L+2 TIMETHET # RETURNS WITH PL AT 6. THE INITIAL POSITION VECTOR IS IN 0D OF THE PUSHLIST AND
# # THE INITIAL VELOCITY VECTOR IN MPAC.
# L+3 STOVL NEWVVEC
# L+4 STADR
# L+5 STORE NEWRVEC # NEWVVEC AND NEWRVEC ARE SYMBOLIC REPRESENTATIONS OF THE USER'S LOCATIONS.
# L+6 ... # CONTINUE.
#
# ABORT EXIT MODES --
# IF COGAFLAG AND/OR INFINFLG IS SET AT THE EXIT TO TIME-THETA, TIME-THETA WILL TRANSFER TO P00DOO WITH
# AN ALARM CODE (ORIGINALLY 00607), AND NOT RETURN TO THE CALLING PROGRAM. (PCR 692 AND 721).
#
# OUTPUT --
# SCALE FACTOR
# VARIABLE IN POWERS OF 2 DESCRIPTION AND REMARKS
# -------- -------------- -----------------------
# T(30D) +28 DP TRANSFER TIME IN CENTISECONDS
# INFINFLG NONE AN INTERPRETIVE SWITCH WHICH IS SET IF THE TRANSFER ANGLE REQUIRES CLOSURE THROUGH
# INFINITY (NO SOLUTION), CLEAR IF A PHYSICAL SOLUTION IS POSSIBLE.
# COGAFLAG NONE AN INTERPRETIVE SWITCH WHICH IS SET IF RESTRICTION 1 HAS BEEN VIOLATED (NO SOLUTION),
# CLEAR IF NOT.
#
# IN ADDITION, IF RVSW IS CLEAR, THE FOLLOWING ARE OUTPUT --
# MPAC - +7 FOR EARTH DP TERMINAL VELOCITY VECTOR IN METERS/CENTISEC.
# MPAC+5 +5 FOR MOON
# 0D - 5D +29 FOR EARTH DP TERMINAL POSITION VECTOR IN METERS (PL AT 6D)
# +27 FOR MOON
#
# FOR OTHER OUTPUT WHICH MAY BE OF USE, SEE DEBRIS.
# Page 1271
#
# DEBRIS --
# PARAMETERS WHICH MAY BE OF USE --
# SCALE FACTOR
# VARIABLE IN POWERS OF 2 DESCRIPTION AND REMARKS
# -------- -------------- -----------------------
# R1 (32D) +29 FOR EARTH DP MAGNITUDE OF INITIAL POSITION VECTOR, RVEC, IN METERS
# +27 FOR MOON
# R1A +6 DP RATIO OF R1 TO SEMI-MAJOR AXIS (NEG. FOR HYPERBOLIC TRAJECTORIES)
# P +4 DP RATIO OF SEMILATUS RECTUM TO R1
# COGA +5 DP COTAN OF ANGLE BETWEEN RVEC AND VVEC
# UR1 +1 DP UNIT VECTOR OF RVEC
# U2 +1 DP UNIT VECTOR OF VVEC
# UN +1 DP UNIT VECTOR OF UR1*U2
#
# PARAMETERS OF NO USE --
# SP PARAMETERS -- RTNTT, GEOMSGN, RTNPRM, MAGVEC2=R2 (DP), PLUS PUSHLIST LOCATIONS 0-11D, 14D-21D, 24D-39D, 41D
# ADDITIONAL INTERPRETIVE SWITCHES USED -- NORMSW, 360SW
# Page 1272
# PROGRAM DESCRIPTION -- TIME-RADIUS SUBROUTINE DATE -- 11 OCTOBER 1967
# MOD NO. -1 LOG SECTION -- CONIC SUBROUTINES
# MOD BY KRAUSE ASSEMBLY -- COLOSSUS REVISION 88
#
# FUNCTIONAL DESCRIPTION --
# THIS SUBROUTINE, GIVEN AN INITIAL STATE VECTOR AND A DESIRED RADIUS TO WHICH THE
# STATE IS TO BE UPDATED ALONG A CONIC TRAJECTORY, CALCULATES THE CORRESPONDING TIME-OF-FLIGHT AND, IN ADDITION,
# PROVIDES THE OPTION OF COMPUTING THE NEW UPDATED STATE VECTOR. THE RESULTING TRAJECTORY MAY BE A SECTION OF A
# CIRCLE, ELLIPSE, PARABOLA, OR HYPERBOLA WITH RESPECT TO THE EARTH OR THE MOON. THE USE OF THE SUBROUTINE CAN BE
# EXTENDED USING OTHER PRIMARY BODIES BY SIMMPE ADDITIONS TO THE MUTABLE WITHOUT INTRODUCING ANY CODING CHANGES,
# ACCEPTING THE INHERENT SCALE FACTOR CHANGES IN POSITION AND VELOCITY.
#
# IF THE DESIRED RADIUS IS BEYOND THE RADIUS OF APOCENTER OF THE CONIC OR BELOW THE RADIUS OF PERICENTER,
# APSESW WILL BE SET AND THE SUBROUTINE WILL RETURN THE APOCENTER OR PERICENTER SOLUTION, RESPECTIVELY.
#
# THE RESTRICTIONS ARE --
# 1. THE ANGLE BETWEEN ANY POSITION VECTOR AND ITS VELOCITY VECTOR MUST BE GREATER THAN 1 DEGREE 47.5 MINUTES
# AND LESS THAN 178 DEGREES 12.5 MINUTES.
# 2. THE PARAMETERS IN THE PROBLEM MUST NOT EXCEED THEIR SCALING LIMITS SPECIFIED IN THE GSOP. IF THE LIMITS
# EXCEEDED, THE RESULTING SOLUTION WILL BE MEANINGLESS.
# 3. AN ACCURACY DEGRADATION OCCURS AS THE SENSITIVITIES OF TIME AND UPDATED STATE VECTOR TO CHANGES IN
# RDESIRED INCREASE. THIS WILL OCCUR NEAR EITHER APSIS OF THE CONIC AND WHEN THE CONIC IS NEARLY CIRCULAR. IN
# PARTICULAR, IF THE CONIC IS AN EXACT CIRCLE, THE PROBLEM IS UNDEFINED AND THE SUBROUTINE WILL ABORT.
#
# THE AGC COMPUTATION TIME IS APPROXIMATELY .363 SECONDS.
#
# REFERENCES --
# R-479, MISSION PROGRAMMING DEFINITION MEMO NO. 10, LUNAR LANDING MISSION GSOP-SECTION 5.5, SGA MEMO 67-8.
#
# INPUT -- ERASABLE INITIALIZATION REQUIRED.
# SCALE FACTOR
# VARIABLE IN POWERS OF 2 DESCRIPTION AND REMARKS
# -------- -------------- -----------------------
# RVEC +29 FOR EARTH DP INITIAL POSITION VECTOR IN METERS
# +27 FOR MOON
# VVEC +7 FOR EARTH DP INITIAL VELOCITY VECTOR IN METERS/CENTISECOND
# +5 FOR MOON
# RDESIRED +29 FOR EARTH DP TERMINAL RADIAL DISTANCE ON CONIC TRAJECTORY FOR WHICH TRANSFER TIME IS TO BE
# +27 FOR MOON COMPUTED
# SGNRDOT NONE SP TAG SET TO +.5 OR -.5 ACCORDING TO WHETHER THE RADIAL VELOCITY AT RDESIRED IS TO BE
# POSITIVE OR NEGATIVE, RESPECTIVELY. THIS TAG REDUCES THE DOUBLE-VALUED PROBLEM TO A
# Page 1273
# SINGLE-VALUED PROBLEM.
# X1 (38D) NONE INDEX REGISTER TO BE SET TO -2D OR -10D ACCORDING TO WHETHER THE EARTH OR MOON,
# RESPECTIVELY, IS THE CENTRAL BODY.
# RVSW NONE AN INTERPRETIVE SWITCH TO BE SET IF ONLY TIME IS TO BE AN OUTPUT, CLEAR IF THE NEW STATE
# IS TO BE COMPUTED ALSO.
#
# SUBROUTINES CALLED --
# PARAM, GEOM, GETX, DELTIME, NEWSTATE
#
# CALLING SEQUENCE AND NORMAL EXIT MODES --
# IF ONLY TIME IS DESIRED AS OUTPUT --
# L SET CALL # MUST BE IN INTERPRETIVE MODE BUT OVFIND ARBITRARY.
# L+1 RVSW
# L+2 TIMERAD # RETURN WITH PL AT 0 AND T IN MPAC
# L+3 ... # CONTINUE
#
# IF THE UPDATE STATE VECTOR IS DESIRED AS WELL --
# L CLEAR CALL # MUST BE IN INTERPRETIVE MODE BUT OVFIND ARBITRARY.
# L+1 RVSW
# L+2 TIMERAD # RETURNS WITH PL AT 6. THE INITIAL POSITION VECTOR IS IN 0D OF THE PUSHLIST AND
# # THE INITIAL VELOCITY VECTOR IN MPAC.
# L+3 STOVL NEWVVEC
# L+4 STADR
# L+5 STORE NEWRVEC # NEWVVEC AND NEWRVEC ARE SYMBOLIC REPRESENTATIONS OF THE USER'S LOCATIONS.
# L+6 ... # CONTINUE
#
# ABORT EXIT MODES --
# IF SOLNSW AND/OR COGAFLAG AND/OR INFINFLG IS SET AT THE EXIT TO TIME-RADIUS, TIME-RADIUS WILL TRANSFER
# TO P00DOO WITH AN ALARM CODE (ORIGINALLY 00607), AND NOT RETURN TO THE CALLING PROGRAM. (PCR 692 & 721).
#
# OUTPUT --
# SCALE FACTOR
# VARIABLE IN POWERS OF 2 DESCRIPTION AND REMARKS
# -------- -------------- -----------------------
# T (30D) +28 DP TRANSFER TIME IN CENTISECONDS.
# INFINFLG NONE AN INTERPRETIVE SWITCH WHICH IS SET IF RDESIRED AND SGNRDOT REQUIRE CLOSURE THROUGH
# INFINITY (NO SOLUTION), CLEAR IF A PHYSICAL SOLUTION IS POSSIBLE.
# COGAFLAG NONE AN INTERPRETIVE SWITCH WHICH IS SET IF RESTRICTION 1 HAS BEEN VIOLATED (NO SOLUTION),
# CLEAR IF NOT.
# APSESW NONE AN INTERPRETIVE SWITCH WHICH IS SET IF RDESIRED WAS GREATER THAN RADIUS OF APOCENTER OR
# Page 1274
# LESS THAN RADIUS OF PERICENTER. THE APOCENTER OR PERICENTER SOLUTION, RESPECTIVELY,
# WILL THEN BE RETURNED. THE SWITCH IS CLEAR IF RDESIRED WAS BETWEEN PERICENTER AND
# APOCENTER.
# SOLNSW NONE AN INTERPRETIVE SWITCH WHICH IS SET IF THE CONIC IS SO CLOSE TO A CIRCLE THAT THE TERMIN
# POINT IS AMBIGUOUS, VIOLATING RESTRICTION 3. IF ECCENTRICITY IS GREATER THAN 2-TO-THE-
# MINUS-18, THE SWITCH IS CLEAR.
#
# IN ADDITION, IF RVSW IS CLEAR, THE FOLLOWING ARE OUTPUT --
# MPAC - +7 FOR EARTH DP TERMINAL VELOCITY VECTOR IN METERS/CENTISEC.
# MPAC+5 +5 FOR MOON
# 0D - 5D +29 FOR EARTH DP TERMINAL POSITION VECTOR IN METERS (PL AT 6D)
# +27 FOR MOON
#
# FOR OTHER OUTPUT WHICH MAY BE OF USE, SEE DEBRIS.
#
# DEBRIS --
# PARAMETERS WHICH MAY BE OF USE --
# SCALE FACTOR
# VARIABLE IN POWERS OF 2 DESCRIPTION AND REMARKS
# -------- -------------- -----------------------
# R1 (32D) +29 FOR EARTH DP MAGNITUDE OF INITIAL POSITION VECTOR, RVEC, IN METERS
# +27 FOR MOON
# R1A +6 DP RATIO OF R1 TO SEMI-MAJOR AXIS (NEG. FOR HYPERBOLIC TRAJECTORIES)
# P +4 DP RATIO OF SEMILATUS RECTUM TO R1
# COGA +5 DP COTAN OF ANGLE BETWEEN RVEC AND VVEC
# UR1 +1 DP UNIT VECTOR OF RVEC
# U2 +1 DP UNIT VECTOR OF VVEC
# UN +1 DP UNIT VECTOR OF UR1*U2
# CSTH +1 DP COSINE OF TRUE ANOMALY DIFFERENCE BETWEEN RVEC AND RDESIRED.
# SNTH +1 DP SINE OF TRUE ANOMALY DIFFERENCE.
#
# PARAMETERS OF NO USE --
# SP PARAMETERS -- RTNTT, GEOMSGN, RTNPRM, MAGVEC2*R2 (DP), PLUS PUSHLIST LOCATIONS 0-11D, 14D-21D, 24D-39D, 41D
# ADDITIONAL INTERPRETIVE SWITCHES USED -- NORMSW, 360SW
#
# Page 1275
# PROGRAM DESCRIPTION -- APSIDES SUBROUTINE DATE -- 1 SEPTEMBER 1967
# MOD NO. -- 0 LOG SECTION -- CONIC SUBROUTINES
# MOD BY KRAUSE ASSEMBLY -- COLOSSUS REVISION 88
#
# FUNCTIONAL DESCRIPTION --
# THIS SUBROUTINE, GIVEN AN INITIAL STATE VECTOR, CALCULATES THE RADIUS OF PERICENTER AND OF APOCENTER AND THE
# ECCENTRICITY OF THE RESULTING CONIC TRAJECTORY, WHICH MAY BE A STRAIGHT LINE,
# CIRCLE, ELLIPSE, PARABOLA, OR HYPERBOLA WITH RESPECT TO THE EARTH OR THE MOON. THE USE OF THE SUBROUTINE CAN
# BE EXTENDED USING OTHER PRIMARY BODIES BY SIMPLE ADDITIONS TO THE MUTABLE WITHOUT INTRODUCING ANY CODING CHANGES,
# ACCEPTING THE INHERENT SCALE FACTOR CHANGES IN POSITION AND VELOCITY.
#
# THE RESTRICTIONS ARE --
# 1. IF APOCENTER IS BEYOND THE SCALING OF POSITION, THE SCALE FACTOR LIMIT (536,870,910 METERS WITH RESPECT
# TO THE EARTH OR 134,217,727.5 METERS WITH RESPECT TO THE MOON) WILL BE RETURNED.
# 2. THE PARAMETERS IN THE PROBLEM MUST NOT EXCEED THEIR SCALING LIMITS SPECIFIED IN THE GSOP. IF THE LIMITS
# ARE EXCEEDED, THE RESULTING SOLUTION WILL BE MEANINGLESS.
#
# THE AGC COMPUTATION TIME IS APPROXIMATELY .103 SECONDS.
#
# REFERENCES --
# MISSION PROGRAMMING DEFINITION MEMO NO. 10, LUNAR LANDING MISSION GSOP-SECTION 5.5.
#
# INPUT -- ERASABLE INITIALIZATION REQUIRED
# SCALE FACTOR
# VARIABLE IN POWERS OF 2 DESCRIPTION AND REMARKS
# -------- -------------- -----------------------
# RVEC +29 FOR EARTH DP INITIAL POSITION VECTOR IN METERS
# +27 FOR MOON
# VVEC +7 FOR EARTH DP INITIAL VELOCITY VECTOR IN METERS/CENTISECOND
# +5 FOR MOON
# X1 (38D) NONE INDEX REGISTER TO BE SET TO -2D OR -10D ACCORDING TO WHETHER THE EARTH OR MOON,
# RESPECTIVELY, IS THE CENTRAL BODY.
#
# SUBROUTINES CALLED --
# PARAM, GEOM
#
# CALLING SEQUENCE AND NORMAL EXIT MODES --
# Page 1276
# IF ONLY TIME IS DESIRED AS OUTPUT --
# L CALL # MUST BE IN INTERPRETIVE MODE BUT OVFIND ARBITRARY.
# L+1 APSIDES # RETURNS WITH PL AT 0, RADIUS OF APOCENTER IN MPAC AND RADIUS OF PERICENTER IN 0D
# L+2 STODL APOAPSE
# L+3 0D
# L+4 STORE PERIAPSE # APOAPSE AND PERIAPSE ARE SYMBOLIC REPRESENTATIONS OF THE USER'S LOCATIONS
# L+5 ... # CONTINUE
#
# OUTPUT --
# SCALE FACTOR
# VARIABLE IN POWERS OF 2 DESCRIPTION AND REMARKS
# -------- -------------- -----------------------
# MPAC +29 FOR EARTH DP RADIUS OF APOCENTER IN METERS
# +27 FOR MOON
# 0D-1D +29 FOR EARTH DP RADIUS OF PERICENTER IN METERS
# +27 FOR MOON
# ECC +3 DP ECCENTRICITY OF CONIC TRAJECTORY
#
# FOR OTHER OUTPUT WHICH MAY BE OF USE, SEE DEBRIS.
#
# DEBRIS --
# PARAMETERS WHICH MAY BE OF USE --
# SCALE FACTOR
# VARIABLE IN POWERS OF 2 DESCRIPTION AND REMARKS
# -------- -------------- -----------------------
# R1 (32D) +29 FOR EARTH DP MAGNITUDE OF INITIAL POSITION VECTOR, RVEC, IN METERS
# +27 FOR MOON
# R1A +6 DP RATIO OF R1 TO SEMI-MAJOR AXIS (NEG. FOR HYPERBOLIC TRAJECTORIES)
# P +4 DP RATIO OF SEMILATUS RECTUM TO R1
# COGA +5 DP COTAN OF ANGLE BETWEEN RVEC AND VVEC
# UR1 +1 DP UNIT VECTOR OF RVEC
# U2 +1 DP UNIT VECTOR OF VVEC
# UN +1 DP UNIT VECTOR OF UR1*U2
# MAGVEC2 +7 FOR EARTH DP MAGNITUDE OF VVEC
# +5 FOR MOON
#
# PARAMETERS OF NO USE --
# SP PARAMETERS -- RTNAPSE, GOMSGN, RTNPRM, PLUS PUSHLIST LOCATIONS 0-5, 10D-11D, 14D-21D, 31D-38D.
# ADDITIONAL INTERPRETIVE SWITCHES USED -- NORMSW
SETLOC CONICS
# Page 1277
BANK
COUNT 12/CONIC
EBANK= UR1
KEPLERN SETPD BOV
0
+1
VLOAD*
MUTABLE,1
STOVL 14D
RRECT
UNIT SSP
ITERCTR
20D
STODL URRECT
36D
STOVL R1
RRECT
DOT SL1R
VRECT
DMP SL1R
1/ROOTMU # 1/ROOTMU (-17 OR -14)
STOVL KEPC1 # C1=R.V/ROOTMU (+17 OR +16)
VRECT
VSQ DMPR
1/MU # 1/MU (-34 OR -28)
DMP SL3
R1
DSU ROUND
D1/64
STORE KEPC2 # C2=RV.V/MU -1 (+6)
BDSU SR1R
D1/64
DDV
R1
STORE ALPHA # ALPHA=(1-C2)/R1 (-22 OR -20)
BPL DLOAD # MAXIMUM X DEPENDS ON TYPE OF CONIC
1REV
-50SC # -50SC (+12)
DDV BOV
ALPHA
STOREMAX
SQRT GOTO
STOREMAX
# Page 1278
1REV SQRT BDDV
2PISC # 2PISC (+6)
BOV
STOREMAX
STOREMAX STORE XMAX
DMP PDDL
1/ROOTMU
ALPHA
NORM PDDL
X1
SL* DDV
0 -6,1
BOV BMN
MODDONE
MODDONE # MPAC=PERIOD
PERIODCH PDDL ABS # 0D=PERIOD
TAU.
DSU BMN
0D
MODDONE
SIGN
TAU.
STODL TAU.
GOTO
PERIODCH
MODDONE SETPD DLOAD
0
XKEPNEW
STORE X
SIGN BZE
TAU.
BADX
BMN ABS
BADX
DSU BPL
XMAX
BADX
STORBNDS DLOAD BPL
TAU.
STOREMIN
DLOAD DCOMP
XMAX
STODL XMIN
KEPZERO
STCALL XMAX
DXCOMP
STOREMIN DLOAD
KEPZERO
STORE XMIN
DXCOMP DLOAD DMPR
# Page 1279
TAU.
BEE22
ABS
STODL EPSILONT
XPREV
XDIFF BDSU
X
STORE DELX
KEPLOOP DLOAD DSQ
X # X=XKEP
NORM PUSH # 0D=XSQ (+34 OR +32 -N1) PL AT 2
X1
DMP SRR*
ALPHA
0 -6,1
STCALL XI # XI=ALPHA XSQ (+6)
DELTIME
BOV BDSU
TIMEOVFL # UNLIKELY
TAU.
STORE DELT # DELT=DELINDEP
ABS BDSU
EPSILONT
BPL DLOAD
KEPCONVG
T
DSU NORM
TC
X1
PDDL NORM
DELX
X2
XSU,1 DMP
X2
DELT
SLR* DDV
1,1
SR1 PUSH # 0D=TRIAL DELX PL AT 2
BPL DLOAD
POSDELX
X
STORE XMAX # MOVE MAX BOUND IN
BDSU DSU # PL AT 0
XMIN
BOV BPL
NDXCHNGE
NDXCHNGE
DLOAD GOTO
# Page 1280
0D
NEWDELX
NDXCHNGE DLOAD DSU
XMIN
X
DMPR GOTO # TO FORCE MPAC +2 TO ZERO
DP9/10
NEWDELX
POSDELX DLOAD
X
STORE XMIN # MOVE MIN BOUND IN
BDSU DSU # PL AT 0
XMAX
BOV BMN
PDXCHNGE
PDXCHNGE
DLOAD
0D
NEWDELX STORE DELX
BZE DAD
KEPCONVG
X
STODL X
T
STORE TC
BRNCHCTR RTB BHIZ
CHECKCTR
KEPCONVG
GOTO
KEPLOOP # ITERATE
PDXCHNGE DLOAD DSU
XMAX
X
DMPR GOTO # TO FORCE MPAC +2 TO ZERO
DP9/10
NEWDELX
BADX DLOAD SR1
XMAX
SIGN
TAU.
STCALL X
STORBNDS
# Page 1281
TIMEOVFL DLOAD BMN # X WAS TOO BIG
X
NEGTOVFL
STORE XMAX
CMNTOVFL DLOAD SR1
DELX
STORE DELX
BZE BDSU
KEPRTN
X
STODL X
TC
STCALL T
BRNCHCTR
NEGTOVFL STCALL XMIN
CMNTOVFL
KEPCONVG DLOAD SR4R
R1
DSU VXSC
XSQC(XI)
URRECT
VSL1 PDDL # 0D=(R1-XSQC(XI))URRECT (+33 OR +31)
X
DSQ NORM
X1
DMPR DMPR
1/ROOTMU
X
DMP SRR*
S(XI)
0 -7,1
BDSU
T
SL1 VXSC
VRECT
VSL1 VAD
VSL4
STORE RCV # RCV (+29 OR +27)
ABVAL NORM
X2
STODL RCNORM
XI
DMPR DSU
S(XI)
D1/128
DMP SL1R
ROOTMU
DMP SLR*
# Page 1282
X
0 -3,2
DDV VXSC
RCNORM
URRECT
VSL1 PDDL # 0D=URRECT(XI S(XI)-1)X ROOTMU/RCV (+15
XSQC(XI) # OR +13) PL AT 6
SLR* DDV
0 -4,2
RCNORM
BDSU VXSC
D1/256
VRECT
VAD VSL8
STADR # PL AT 0
STODL VCV # VCV (+7 OR +5)
T
STODL TC
X
STCALL XPREV
KEPRTN
# Page 1283
DELTIME EXIT # MPAC=XI (+6), 0D=XSQ (+34 OR +32 -N1)
TC POLY
DEC 8
2DEC .083333334
2DEC -.266666684
2DEC .406349155
2DEC -.361198675
2DEC .210153242
2DEC -.086221951
2DEC .026268812
2DEC -.006163316
2DEC .001177342
2DEC -.000199055
TC INTPRET
STODL S(XI)
XI
EXIT
TC POLY
DEC 8
2DEC .031250001
2DEC -.166666719
2DEC .355555413
2DEC -.406347410
2DEC .288962094
2DEC -.140117894
2DEC .049247387
2DEC -.013081923
2DEC .002806389
2DEC -.000529414
TC INTPRET
# Page 1284
DMP SRR* # PL AT 0
0D
0 -5,1
STORE XSQC(XI) # XSQC(XI) (+33 OR +31)
DMP SL1
KEPC1
RTB PDDL # XCH WITH PL. 0D=C1 XSQ C(XI) (+49 OR +46)
TPMODE # PL AT 0,3
DMP SRR*
S(XI)
0 -5,1
DMP SL1
KEPC2
RTB PDDL # 3D=C2 XSQ S(XI) (+35 OR +33) PL AT 6
TPMODE
R1
SR TAD # PL AT 3
6
NORM DMP # TO PRESERVE SIGNIF.
X1
X
SR* TAD # X(C2 XSQ S(XI) +R1) (+49 OR +46) PL AT 0
0 -3,1
SL4R DMPR
1/ROOTMU
STORE T
RVQ
# Page 1285
ITERATOR BONCLR DLOAD
SLOPESW
FIRSTIME
DEP
DSU NORM
DEPREV
X1
PDDL NORM
DELINDEP
X2
XSU,1 DMP
X2
DELDEP
SLR* DDV # PL UP 2
1,1
SR1 BOFF
ORDERSW
SGNCHECK
ABS SIGN # IN CASE 2ND DERIV. CHANGED SIGN, MUST
DELDEP # DISREGARD IT TO FIND MIN.
SGNCHECK PUSH BPL # TRIAL DELINDEP PL DOWN 2
POSDEL
DLOAD BON
INDEP
ORDERSW
MINCHECK
STORE MAX # IF NOT 2ND ORDER, CAN MOVE MAX BOUND IN.
MINCHECK BDSU DSU
MIN
BOV BPL
MODNGDEL
MODNGDEL
GOTO
DELOK
MODNGDEL DLOAD DSU # TRIAL DELINDEP WOULD EXCEED MIN BOUND
MIN
INDEP
DMP GOTO
DP9/10
NEWDEL
FIRSTIME DLOAD DMP
MIN
TWEEKIT # DLOAD TWEEKIT(40D) SENSITIVE TO CHANGE.
PDDL DMP # S2(41D) SHOULDN'T CONTAIN HI ORDER ONES
# Page 1286
MAX
TWEEKIT
DSU
SIGN GOTO
DELDEP
SGNCHECK
POSDEL DLOAD BON
INDEP
ORDERSW
MAXCHECK
STORE MIN # IF NOT 2ND ORDER, CAN MOVE MIN BOUND IN.
MAXCHECK BDSU DSU
MAX
BOV BMN
MODPSDEL
MODPSDEL
DELOK DLOAD
0D
NEWDEL STORE DELINDEP