forked from chrislgarry/Apollo-11
-
Notifications
You must be signed in to change notification settings - Fork 0
/
P20-P25.s
3529 lines (3411 loc) · 69.9 KB
/
P20-P25.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: P20-P25.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: 562-534
# Mod history: 2009-05-10 RSB Adapted from the Colossus249/ file
# of the same name, using Comanche055 page
# images.
# 2009-05-20 RSB Corrections: P2OS -> P20S, STO -> STQ,
# GOTOPOOH -> GOTOP00H, a duplicated EXTEND
# was fixed, P23.10 -> R23.10,
# S22B0X44 -> S22BOX44, S22SUBSCL -> 22SUBSCL,
# S22DPP -> S22DSPP, changed some instructions in
# P23.152.
#
# 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 562
# RENDEZVOUS NAVIGATION PROGRAM 20
#
# PROGRAM DESCRIPTION
#
# MOD NO -- 1
# MOD BY -- N. BRODEUR
#
# FUNCTIONAL DESCRIPTION
#
# TO CONTROL THE CSM ATTITUDE AND OPTICS TO ACQUIRE THE LEM IN THE S+T
# FIELD AND TO POINT THE CSM TRANSPONDER AT THE LEM. TO UPDATE EITHER THE
# LEM OR CSM STATE VECTOR (AS SPECIFIED BY THE ASTRONAUT BY THE DSKY
# ENTRY) ON THE BASIS OF OPTICAL TRACKING DATA (REQUESTED BY DSKY)
#
# CALLING SEQUENCE --
#
# ASTRONAUT REQUEST THROUGH DSKY V37E20E
#
# SUBROUTINES CALLED
#
# R02BOTH (IMU STATUS CHECK) BANKCALL
# FLAGUP 2PHCHNG LOADTIME
# R61CSM (PREFERRED TRACKING ATTITUDE) FLAGDOWN
# R52 (AUTO OPTICS POSITIONING ROUT) SETINTG
# R22 (REND TRACK DATA PROC ROUT) PRIOCHNG
# ENDOFJOB INTEGRV GRP2PC
# INTPRET MKRLEES FINDVAC
#
# NORMAL EXIT MODES --
#
# P20 MAY BE TERMINATED IN TWO WAYS -- ASTRONAUT SELECTION OF IDLING
# PROGRAM (P00) BY KEYING V37E00E OR BY KEYING IN V56E
#
# ALARM OR ABORT EXIT MODES --
#
# NONE DIRECTLY FROM P20
#
# OUTPUT
#
# TRKMKCNT = NO OF RENDEZVOUS TRACKING MARKS TAKEN (COUNTER)
# VHFCNT = NO OF VHF RANGING MARKS INCORPORATED (COUNTER)
#
# FLAGS SET + RESET
#
# RNDVZFLG,VEHUPFLG,UPDATFLG,TRACKFLG,TARG1FLG
# HOLDFLAG,WBODY,WBODY1,WBODY2,DELCDUX,DELCDUY,DELCDUZ
# STIKFLAG,PRFTRKAT,VINTFLAG,DIM0FLAG,R60FLAG,R61CNTR
BANK 33
SETLOC P20S
BANK
EBANK= ESTROKER
COUNT* $$/P20
PROG20 TC BANKCALL
CADR R02BOTH # IMU STATUS CHECK
# BLOCKING OF UPLINK IS DONE BY UPLINK PRG
CAF ZERO
TS TRKMKCNT # ZERO REND TRACKING MARK COUNTER
TS VHFCNT # ZERO REND VHF RNG MRK COUNTER
TC UPFLAG # SET PREF TRACK ATT FLAG
ADRES PRFTRKAT # BIT 10 FLAG 5
TC DOWNFLAG # LEM TO BE UPDATED. VEHUPFLG RESET.
ADRES VEHUPFLG # BIT 8 FLAG 1
# Page 563
TC UPFLAG # SET TRACKFLAG
ADRES TRACKFLG # BIT 5 FLAG 1
TC UPFLAG # SET UPDATFLG
ADRES UPDATFLG # BIT 7 FLAG 1
TC UPFLAG # SET RNDVZFLG
ADRES RNDVZFLG # BIT 7 FLAG 0
TC 2PHSCHNG
OCT 4
OCT 05022
OCT 26000
TC INTPRET
RTB
LOADTIME
STCALL MARKTIME
SETINTG # SET INTEGRATION FLAGS
BOFF SET
RENDWFLG
P20.1
DIM0FLAG # SET TO INTEGRATE THE W MATRIX
P20.1 BON CLEAR
VEHUPFLG
P20.2
VINTFLAG # SET FOR LM INTEGRATION
P20.2 CALL
INTEGRV
CALL
GRP2PC # GROUP 2 PHASE CHANGE
CALL
SETINTG # SET INTEGRATION FLAGS
BOFF CLEAR
VEHUPFLG
P20.3
VINTFLAG # SET FOR LM INTEGRATION
P20.3 CALL
INTEGRV
EXIT
CAF PRIO26
TC FINDVAC
EBANK= MRKBUF2
2CADR R22
TC 2PHSCHNG
OCT 00072
OCT 00111
PIKUP20 CAF PRIO14 # ALLOW HIGHER PRIO THAN LAMBERT
TC PRIOCHNG
CAF BIT5 # IS TRACK FLAG SET
MASK STATE +1
EXTEND
BZF ENDOFJOB # NO
# Page 564
CAF BIT13
MASK STATE +3 # IS REFSMFLG SET
EXTEND
BZF ENDOFJOB
CAF ZERO
TS R61CNTR # INITIALIZE R61 COUNTER
TC BANKCALL
CADR R61CSM
EBANK= QMIN
CAF EBANK5
TS EBANK
TC UPFLAG # SET TARGET FLAG TO LEM
ADRES TARG1FLG # BIT 10 FLAG 1
P20R52JB TC INTPRET
CALL
R52 # SET UP AUTO OPTICS JOB
EXIT
TC BANKCALL
CADR MKRLEES
CAF ONE # HOLD PRESENT ATTITUDE
TS HOLDFLAG
TC ENDOFJOB
OCT203 OCT 00203
FIRST3 EQUALS FURST3
# Page 565
# ORBITAL NAVIGATION PROGRAM 22
BANK 31
SETLOC P20S1
BANK
EBANK= LANDMARK
COUNT* $$/P22
PROG22 TC DOWNFLAG # RESET RNDVZFLG BIT 7 FLAG 0
ADRES RNDVZFLG
TC BANKCALL
CADR R02BOTH # IMU STATUS CHECK
TC INTPRET # COMPUTE ANGLE BETWEEN Y AND VXR SM
RTB
LOADTIME
STCALL TDEC1
CSMCONIC # INTEGRATE TO PRESENT TIME
VLOAD VXV # CROSS PRODUCT BETWEEN V AND R
VATT
RATT
UNIT DOT
REFSMMAT +6
ABS
SL1 ARCCOS
STORE +MGA
CLEAR EXIT
RENDWFLG
CAF V06N45B
TC BANKCALL
CADR GOFLASHR
TC GOTOP00H # TERM P22
TC PROG22A # PROC
TC -5 # ENTER
CAF THREE
TC BLANKET # BLANK OUT R1 + R2
TC ENDOFJOB
PROG22A CS PRIO7 # RESULT=70777 SET OFFSET NO.=0
MASK LANDMARK
TS LANDMARK
TC INTPRET
CLEAR
P22MKFLG
SET BOFF
ERADFLAG
CMOONFLG
PROG22B # EARTH
SET # MOON
LUNAFLAG
DLOAD CALL # MPAC=V05N70,MPAC+1=NONZERO FOR N70
V05N7022
# Page 566
S22N7071
GOTO
CALLR52
PROG22B CLEAR SET # EARTH ORBIT
LUNAFLAG
KNOWNFLG
CALL # GET LAT/LONG/ALT FROM ASTRO
P22SUBRB
CALLR52 EXIT
TC 2PHSCHNG
OCT 00004
OCT 05022
OCT 13000
CAF FIVE
TS MARKINDX # SET MARK INDEX=5 FOR R52
TC UPFLAG
ADRES TARG2FLG # SET FOR SIGHTING LMK
TC DOWNFLAG
ADRES TARG1FLG # CLEAR FOR NON-LEM
TC INTPRET
CALL
R52
DOV5N71 SLOAD CALL # MPAC=V05N71,MPAC+1=0 FOR N71
V05N7122
S22N7071
PROG22C LXC,2 SLOAD*
MARKSTAT
QPRET,2
STCALL 8NN
S22.1 # ESTABLISH LANDMARK -- COMPUTE ORBITAL
P22OVER EXIT
TC PHASCHNG
OCT 04022
TC PROG22A # POINT A ON GSOP
V06N45B VN 0645
V05N7022 VN 00570
V05N7122 VN 00571
SETLOC P20S
BANK
SETLOC P20S1
BANK
S22LSITE RTB # CONVERT RLS FROM MOON-FIXED TO BASIC REF
LOADTIME
STOVL 6D # 6-7D= TIME
RLS
STODL 0D # 0-5D= LANDING SITE VECTOR
HIDPHALF # MPAC= ANY NON-ZERO FOR MOON
CALL
# Page 567
RP-TO-R # RLS IN BASIC REF B-27 IN MPAC
VSR2 # LUNAFLAG AND ERADFLAG SET ABOVE
STORE ALPHAV # SCALE RLS B-29 FOR LAT-LONG
RTB
LOADTIME # SET PRESENT TIME IN MPAC FOR LAT-LONG
CALL
LAT-LONG
GOTO
S22TOFF # EXIT
OBTAINLL CALL # GET LAT/LONG/ALT FROM ASTRO
P22SUBRB
GOTO
S22TOFF # EXIT
P22SUBRB STQ EXIT # GET LAT/LONG/ALT FROM ASTRO
S22TOFF +1
CAF V06N89B
TC BANKCALL
CADR GOFLASH
TC GOTOP00H # TERMINATE
TC +2 # PROCEED
TC -5 # ENTER OR RECYCLE
TC INTPRET
DLOAD ABS # TEST LAT/LONG GREATER THAN 90
LANDLAT
BDSU BMN # 1/4 REV - LAT
DP1/4TH
N89ERRX
DLOAD ABS
LANDLONG
BDSU BPL
DP1/4TH
+4
N89ERRX EXIT
TC FALTON
TC P22SUBRB +2 # LONG GR. THAN 90 REDISPLAY
CALL
LLASRDA
GOTO
S22TOFF +1 # EXIT
S22N7071 STORE 8KK # 8KK=V05N71,V05N70 8KK+1=0 N71, NOT 0 N70
STQ EXIT
S22TOFF
S22DSPPA CA 8KK # V05N70 OR V05N71
TC BANKCALL
CADR GOFLASHR
TC GOTOP00H # V34E TERMINATE
TC +5 # V33E PROCEED
TC -5 # V32E RECYCLE
CAF FIVE # IMMEDIATE RETURN BLANK OUT R1,R3
TC BLANKET
# Page 568
TC ENDOFJOB
CA LANDMARK
MASK PRIO7 # 07000
TS CXOFF # 08000 = OFFSET INDICATOR
CS PRIO5 # 5 8-5
AD CXOFF
EXTEND
BZMF +2 # OFF=0 THRU 5 OK
TC S22DSPP # OFF=6.7 ILLEGAL REDISPLAY
TC DOWNFLAG
ADRES KNOWNFLG # CLEAR KNOWNFLG
CA LANDMARK # MASK A FROM ABCDE
MASK 13,14,15
EXTEND
BZMF S22DSPP # A=0,4,5,6,7 ILLEGAL REDISPLAY
TS 22SUBSCL # TEMP
CS BIT14
AD 22SUBSCL
CCS A
S22DSPP TC FALTON # + A=3 ILLEGAL REDISPLAY
TC S22DSPPA # COMMON ERROR EXIT BACK TO DISPLAY
TC +2 # - A=1 KNOWN LMK CHECK DE
TC S22ABDE # -0 A=2 UNKNOWN LMK, DE MEANINGLESS
TC UPFLAG
ADRES KNOWNFLG # SET KNOWNFLG
CS HIGH9 # RESULT= 00077
MASK LANDMARK
TS 22SUBSCL # 000DE
CS BIT1
AD 22SUBSCL
EXTEND
BZMF S22ABDE # DE=0,1 OK FOR BOTH N70,N71
CA 8KK +1 # =0 FOR N71, NOT =0 FOR N70
EXTEND
BZF S22DSPP # N71 REDISPLAY DE MUST= 0 OR 1
CA BIT5 # N70 TEST DE= 50-57 OCTAL FOR ADV. ORBIT
AD OCT50 # SUM=00070
MASK 22SUBSCL # 00D0
CS A
AD OCT50
EXTEND
BZF DE-GR-50 # D=5 OR DE=50-57, OK FOR N70
TC S22DSPP # DE NOT 50-57 ILLEGAL, REDISPLAY
S22ABDE TC INTPRET
BOFF SLOAD
KNOWNFLG # UNKNOWN LMK, DE MEANINGLESS
S22TOFF
22SUBSCL # =0 GET LLA FROM ASTRO, NOT=0 USE RLS
BHIZ GOTO
OBTAINLL # GET LAT/LONG/ALT FROM ASTRO N89
# Page 569
S22LSITE # GET LAT/LONG/ALT FROM RLS
DE-GR-50 TC 2PHSCHNG
OCT 00004
OCT 05022
OCT 13000
CA FIVE
TS MARKINDX
TC UPFLAG
ADRES TARG2FLG
TC DOWNFLAG
ADRES TARG1FLG
TC INTPRET
CALL
ADVORB
GOTO
DOV5N71
# Page 570
# PROGRAM NAME: OPTICS CALIBRATION ROUTINE
# MOD NO: 1
# MOD BY: TOM KNATT
#
# FUNCTIONAL DESCRIPTION: TO MEASURE THE EFFECT OF SOLAR RADIATION ON
# THE SXT TRUNNON ANGLE AND STORE THE MEASURED TRUNNION BIAS FOR P23
#
# CALLING SEQUENCE: CALL
# R57
#
# SUBROUTINES CALLED: DISPLAY ROUTINES
#
# NORMAL EXIT MODES: VIA EGRESS
#
# ALARMS: NONE
#
# ABORT MODES: P23 ABORT IF MARKING SYSTEM OR EXTENDED VERB ACTIVE
#
# INPUT: NONE REQURIES, NORMALLY CALLED BY P23
#
# OUTPUT: TRUNNION BIAS ANGLE: ANGLE DETERMINED WHEN SHAFT LINE OF SIGHT
# (SLOS) AND LANDMARK LINE OF SIGHT (LLOS) ARE SUPERIMPOSED. THIS ANGLE
# MAY NOT BE EXACTLY ZERO BECAUSE OF UNEVEN HEATING OF THE OPTICS, FOR
# EXAMPLE.
#
# ERASABLE INITIALIZATION REQUIRED: MRKBUF1, EXTVBACT
#
# DEBRIS: RUPTREGS USED BY MARKRUPT AND ERASABLES USED BY DISPLAYS.
BANK 33
SETLOC P20S
BANK
COUNT* $$/R57
EBANK= MRKBUF1
R57 STQ EXIT
EGRESS
CAF EBANK7
TS EBANK
CAF SIX # BIT2 = MARKING SYSTEM IN USE
MASK EXTVBACT # BIT3 = EXTENDED VERB IN PROGRESS
CCS A
TC P23ABRT # SET, THEREFORE ABORT
CAF BIT2 # NOT SET
ADS EXTVBACT # SET IT
R57A TC UPFLAG # SET V59FLAG (BIT 12 FLAG 5 TO INDICATE
ADRES V59FLAG # CALIBRATION MARK
CAF V59NB
TC BANKCALL
CADR GOMARKFR
TC GOTOP00H # TERMINATE
TC ENDR57
TC ENDR57
CAF SEVEN
# Page 571
TC BLANKET # BLANK OUT R1,R2,R3
TC ENDOFJOB
# STORE TRUNNION ANGLE (OCDU)
MARKDISP CAF V06N87NB
TC BANKCALL
CADR GOMARKFR
TC GOTOP00H # TERMINATE
TC R57B # PROCEED
TC R57A # ENTER (RECYCLE)
CAF FIVE
TC BLANKET # BLANK OUT R1,R3
TC ENDOFJOB
R57B CA 19.77DEG # PUT FIXED INTO ERASABLE FOR MSU
TS L # INSTRUCTION COMING UP
CA MRKBUF1 +5 # CONTAINS TRUNNION
EXTEND
MSU L # CONNECTS TRUNBIAS FROM 2'S TO 1'S
TS TRUNBIAS
ENDR57 TC DOWNFLAG # RESET V59FLAG
ADRES V59FLAG # BIT 12 FLAG 5
CAF EBANK5
TS EBANK
CAF PRIO14
TC NOVAC # THIS JOB CLEARS BIT IN
EBANK= MARKSTAT
2CADR ENDMARK # MARKING IN R57 SO R53 CAN TAKE OVER
TC INTPRET
GOTO
EGRESS
P23ABRT TC BAILOUT
OCT 01211
V06N87NB VN 0687
V59NB VN 5900
V51NB VN 5100
19.77DEG OCT 61740
# Page 572
# PROGRAM DESCRIPTION
# MOD NO: 1
# MOD BY: N. BRODEUR
#
# FUNCTIONAL DESCRIPTION
#
# TO PERFORM SIGHTING MARKS IN CONJUNCTION WITH THE RENDEZVOUS NAVIG-
# ATION PROGRAM. CALLED BY ASTRONAUT VIA EXTENDED VERB.
#
# CALLING SEQUENCE:
#
# R21 VIA V57
# R23 VIA V 54
#
# SUBROUTINES CALLED:
#
# FLAGUP FLAGDOWN BANKCALL
# ENDOFJOB GOMARK2 GOMARKF
# INTPRET GENTRAN KLEENEX
# ENDMARK
#
# NORMAL EXIT MODES:
#
# MARKRUPT USED BY SXTMARK HAS BEEN MODIFIED TO STORE MARK IN MRKBUF2
# FOR USE BY R22. WHEN ASTRONAUT IS FINISHED TAKING MARKS, HE HITS AN
# PROCEED, R21 IS TERMINATED THUS CAUSING THE FINAL MARK TO BE TRANSFRD
# TO MRKBUF2 FOR PROCESSING BY R22
#
# ALARM OR ABORT EXIT MODES:
#
# NONE
#
# OUTPUT:
#
# 7 REGISTER MRKBUF2 CONTAINING TIME2,TIME1,CDUY,OPTICS X,CDUZ, OPTICS Y,
# CDUX.
#
# ERASABLE INTIALIZATION REQUIRED
#
# FLAGS SET AND RESET
# R21MARK (COMMUNICATION TO MARKRUPT TO STORE MARKS IN MRKBUF1 +2)
# R23FLG INDICATES COAS MARKING
#
# DEBRIS
EBANK= MRKBUF1
SETLOC RENDEZ
BANK
COUNT* $$/R21
R21CSM TC UPFLAG # SET R21MARK
ADRES R21MARK # BIT 14 FLAG 2
R23CSM CA NEGONE
TS MRKBUF1
TS MRKBUF2
CA FLAGWRD1
MASK R23BIT # TEST R23FLG
EXTEND
BZF R21C1 # NOT SET REGULAR R21 MARKING
CAF V0694 # R23 BACKUP MARKING
TC BANKCALL # DISPLAY SHAFT + TRUNNION
CADR GOMARKF
TC R21END # TERM
TC +2 # PROC
# Page 573
TC -5 # ENTER
R23CSM1 CAF V53 # PERFORM ALT LOST SIGHT MARK
TC BANKCALL
CADR GOMARK2
TC R21END # V34: TERMINATE R23
TCF R21CSMA # PROCEED: END BACK UP MARKING (R23)
CAF SIX # TRANSFER MRKBUF1 TO MRKBUF2
TC GENTRAN
ADRES MRKBUF1
ADRES MRKBUF2
EXTEND
DCA TIME2
DXCH MRKBUF1 # READ TIME
CA CDUY # READ CDU ANGLES
TS MRKBUF1 +2
CA CDUZ
TS MRKBUF1 +4
CA CDUX
TS MRKBUF1 +6
RELINT
TC R23CSM1
R21C1 CAF V51NB
TC BANKCALL
CADR GOMARK2
TC R21END # V34: TERMINATE R21
TCF R21CSMA # PROCEED: END R21
TCF R21C1 # RECYCLE
R21CSMA CA MRKBUF1 # IF -1 NO MARK
AD ONE
EXTEND
BZF R21END # ZERO = NO MARK
CAF SIX # MARK THEREFORE TRANSFER IT TO MRKBUF2
R21CSM1 TC GENTRAN # TRANSFER MRKBUF1 TO MRKBUF2
ADRES MRKBUF1
ADRES MRKBUF2
RELINT
R21END TC BANKCALL
CADR KLEENEX
TC DOWNFLAG # RESET R21MARK
ADRES R21MARK # BIT 14 FLAG 2
TC ENDMARK # END MARKING AND ENDJOB
V53 VN 5300
V0694 VN 0694
# Page 574
# PREFERRED TRACKING ATTITUDE ROUTINE R61CSM
#
# PROGRAM DESCRIPTION
# MOD NO: 2
# MOD BY: N. BRODEUR
#
# FUNCTIONAL DESCRIPTION:
#
# TO COMPUTE THE PREFERRED TRACKING ATTITUDE OF THE CSM TO ENABLE OPTICS
# TRACKING OF THE LM AND TO PERFORM THE MANEUVER TO THE PREFERRED
# OR X-AXIS TRACKING ATTITUDE.
#
# CALLING SEQUENCE:
#
# TC BANKCALL
# CADR R61CSM
#
# SUBROUTINE CALLED
#
# MAKECADR BANKCALL
# INTPRET FLAGUP FLAGDOWN
# BANKJUMP CRS61.1 R60CSM
# PHASCHNG
#
# NORMAL EXIT MODES:
#
# NORMAL RETURN TO CALLER + 1
#
# OUTPUT:
#
# SEE OUTPUT FOR CRS61.1 & ATTITUDE MANEUVER ROUTINE (R60CSM)
#
# ERASABLE INITIALIZATION REQUIRED
#
# GENRET USED TO SAVE Q FOR RETURN
# R61CNTR MUST BE PRESET TO ZERO
#
# FLAGS SET + RESET
#
# 3-AXIS FLAG
#
# DEBRIS
#
# SEE SUBROUTINES
EBANK= GENRET
COUNT* $$/R61 # ROUTINES -- NAVIGATION -- PREF. TR. 9TT=
R61CSM CAF EBANK6 # SWITCH TO EBANK 6
XCH EBANK
TS SAVBNK # SAVE EBANK
TC MAKECADR
TS GENRET
CCS R61CNTR # TEST R61DNTR
TC DECRM61 # NOT READY TO DO R61
TC +2 # DO R61
TC DECRM61 +1
TC INTPRET
CALL
CRS61.1 # LOS DETERMINATION + VEH ATTITUDE
EXIT
INDEX MPAC
TC +1
TC R61END # SUBROUTINE DRIVING DAP (EXIT R61)
# OR AUTO MODE NOT SET (EXIT R61)
# OR SKIKFLAG SET (EXIT R61)
R61C1 TC DOWNFLAG # RESET 3-AXIS FLAG
ADRES 3AXISFLG # BIT 6 FLAG 5
# Page 575
CS ONE # SET R61CNTR NEG. TO INDICATE KALCMANU
TS R61CNTR
TC UPFLAG # SET FLAG FOR PRIORITY DISPLAYS FOR R60
ADRES PDSPFLAG # BIT 12 FLAG 4
TC BANKCALL
CADR R60CSM
TC DOWNFLAG # RESET FLAG FOR PRIORITY DISPLAYS IN R60
ADRES PDSPFLAG # BIT 12 FLAG 4
TC PHASCHNG
OCT 00111
CAF ZERO
TC DECRM61
R61END CAF THREE
DECRM61 TS R61CNTR
CAE GENRET
LXCH A # RETURN IS IN L
CA SAVBNK # RESTORE EBANK
XCH EBANK
LXCH A # RETURN IS NOW BACK IN A
TC BANKJUMP # EXIT R61
BANK 13
SETLOC P20S2
BANK
EBANK= MRKBUF1
# Page 576
# BVECTOR PERFORMS COMPUTATIONS FOR
#
# DELTAQ, THE MEASURED DEVIATION BASED ON THE DIFFERENCE BETWEEN THE CSM-LEM
# STATE VECTOR ESTIMATES AND THE ACTUAL TRACKING MEASUREMENT.
#
# US, THE MODIFIED FICTITIOUS STAR DIRECTION VECTOR
# GEOMETRY VECTORY B ASSOCIATED WITH EACH TRACKING MEASUREMENT.
#
# INPUT
#
# UM, 1/2 UNIT VECTOR ALONG THE CSM-LM LINE-OF-SIGHT (BASIC REF. SYSTEM)
#
# USTAR, FICTITIOUS STAR DIRECTION (1/2 UNIT VECTOR)
#
# RCLP, RELATIVE CSM TO LM POSITION VECTOR
#
# OUTPUT
#
# USTAR, MODIFIED FICTITIOUS STAR DIRECTION (1/2 UNIT VECTOR)
#
# BVECTOR = 9 DIMENTIONAL BVECTOR (1/2 UNIT VEC.)
#
# DELTAQ = MEASURED DEVIATION
#
# CALLING SEQUENCE
#
# L CALL BVECTORS
#
# NORMAL EXIT
#
# L+1 OF CALLING SEQUENCE
COUNT 23/20SUB
BVECTORS STQ
EGRESS
VLOAD UNIT
RCLP # RELATIVE POSITION VECTOR
STODL 26D # RCLP UNIT VEC
36D # RCLP ABS VALUE
STOVL TEMPOR1 # MOVE TO SAFE LOCATION
USTAR
VXV UNIT
26D # USTAR = UNIT(US X UCL)
STCALL BVECTOR
GRP2PC # PHASE CHANGE
VLOAD
BVECTOR
STORE USTAR
DOT SL1
UM # USTAR DOT UM
ACOS DSU
DP1/4TH
NORM DMP
X1
PI/4.0
DMP SRR*
TEMPOR1 # RCLP ABS VALUE
0 -3,1 # ADJUST SCALING
STOVL DELTAQ
ZEROVECS
STORE BVECTOR +6
STORE BVECTOR +12D
GOTO
# Page 577
EGRESS
PI/4.0 2DEC .785398164
# Page 578
# GETUM: DETERMINES THE LINE OF SIGHT UNIT VECTOR UM IN THE BASIC REFERENCE
# COORDINATE SYSTEM FROM THE OPTICS SHAFT AND TRUNNION ANGLES AND THE IMU
# GIMBAL ANGLES.
#
# INPUT
#
# MARKDATA, BASE ADDRESS OF MARK DATA
# REFSMMAT, ROTATION MATRIX FROM STABLE MEMBER TO BASIC REF. COORD. SYSTEM
#
# SUROUTINES CALLED:
#
# SXTNB -- SEXT. ANGULAR READINGS TO NAV. BASE COOR.
# NBSM -- TRANSFORM FROM NAV. BASE TO STABLE MEMBER
#
# OUTPUT
#
# MPAC = LINE OF SIGHT 1/2 UNIT VECTOR IN BASIC REFERENCE SYSTEM
#
# CALLING SEQUENCE
#
# L CALL GETUM
#
# NORMAL EXIT
#
# L+1 OF CALLING SEQUENCE
GETUM STQ SETPD
EGRESS
0
LXC,1 VLOAD*
MARKDATA # CONTAINS ADDRESS OF MARK DATA
1,1
STODL* MARKDOWN +1 # TRANSFER DATA FROM WORKING STORAGE
0,1 # TO MARKDOWN ARRAY FOR DOWNLINK
STORE MARKDOWN
AXT,2
2
XSU,2 SXA,2
X1 # X1 = MARKDATA
S1 # S1 = MARKDATA(ADR) +2
CALL
SXTNB # SEXT. ANGULAR READINGS TO NAV. BASE COOR.
CALL
NBSM # TRANSFORM FROM NAV. BASE TO STABLE MEM.
VXM VSL1
REFSMMAT
GOTO # MPAC = (UM) LINE OF SIGHT VECTOR
EGRESS # EXIT
# Page 579
# RENDEZVOUS TRACKING DATA PROCESSING ROUTINE (R22)
#
# PURPOSE (1) TO PROCESS RENDEZVOUS SIGHTING MARK DATA TO UPDATE THE STATE VECTOR OF EITHER THE CSM OR LM AS
# DEFINED BY THE RENDEZVOUS NAVIGATION PROGRAM (P20).
#
# ASSUMPTIONS (1) THIS ROUTINE IS MANUALLY SELECTED BY THE ASTRONAUT BY V55E WHENEVER RENDEZVOUS SIGHTING MARKS
# ARE DESIRED. ITS SELECTION, HOWEVER, IS LIMITED TO PERIODS WHEN THE CMC IS HOLDING FOR A V/N FLASHING
# DATA DISPLAY. THIS ROUTINE RETURNS TO THE ORIGINAL PROGRAM AT THE INTERRUPTED DISPLAY.
BANK 34
SETLOC P20S3
BANK
COUNT 34/R22
R22 CAF PRIO26
TS PHSPRDT2
TC PRIOCHNG
CA NEG3
TS MRKBUF2
TC INTPRET
RTB
LOADTIME
STORE VHFTIME # PRESENT TIME
REND1 CALL
GRP2PC
CALL
WAITONE
REND1A EXIT
CA MRKBUF2
EXTEND
BZF REND2
EXTEND
BZMF REND3A
REND2 CAF SIX
TC GENTRAN
ADRES MRKBUF2
ADRES MARKTIME # MARKTIME MUST BE CONTIGUOUS WITH VTEMP
CAF NEG3 # NEG VALUE TO INDICATE VALUES USED
TS MRKBUF2
RELINT
TC INTPRET
CLEAR CALL
SOURCFLG # 0 = OPTICS DATA
GRP2PC
SSP GOTO
MARKDATA
ECADR VTEMP -2
REND4
REND3A TC INTPRET
REND3 CALL
# Page 580
GRP2PC
CALL
WAITONE
BOFF
VHFRFLAG
REND1A
RTB
LOADTIME # PRESENT TIME
DSU DSU
60SECDP # 1 MIN
VHFTIME # LAST READING OF RADAR
BMN CALL
REND1A
RANGERD # READ RADAR RANGE
DLOAD
MARKTIME
STORE VHFTIME # FOR DOWNLINK
REND4 CALL
SETINTG # SET INTEGRV FLAGS
BON CALL
VEHUPFLG
CSMUPP # BRANCH IF CSM UPDATE
INTEGRV
CALL
GRP2PC # PHASE CHANGE
CALL
SETINTG # SET INTEGRV FLAGS
CLEAR
VINTFLAG # SET INTEGRATION VEHICLE TO LM
REND5 BOFF SET
RENDWFLG
REND5A # DO NOT INTEGRATE W IF FLAG = 0
DIM0FLAG
REND5A CALL
INTEGRV
CALL
SHIFTNDX # SET EARTH MOON SCALING INDEX
CALL
CMPOS # SET CSM POSITION
SET CALL
INCORFLG # SET FOR 1ST PASS
LMPOS # SET LM POSITION
CLEAR BON
ORBWFLAG # CLEAR FOR ORBITAL AND CISLUNAR
RENDWFLG
REND6
DLOAD
WRENDPOS
STCALL 0 # 0 = WRENDPOS 1 = WRENDVEL
INITIALW # INTIIALIZE W MATRIX
# Page 581
DLOAD
ZEROVECS
STORE VHFCNT # ZERO OUT VHFCNT AND TRKMKCNT
REND6 SET
RENDWFLG
VLOAD VSU
LEMPOS
CSMPOS
STORE RCLP # LM - CSM
REND7 UNIT BON
SOURCFLG
REND14 # BRANCH IF DATA IS RADAR
STORE UCL
BOFF CALL
INCORFLG
REND9
GETUM # CALCULATE UM LINE OF SIGHT
STOVL UM
UCL
VXV BOV
UM # UCL X UM
REND8
REND8 UNIT BOV
REND3 # BRANCH IF OVERFLOW IGNORE MARK
STORE USTAR
REND9 CALL
BVECTORS
BON VLOAD
VEHUPFLG
REND9A
BVECTOR
VCOMP
STORE BVECTOR
REND9A CALL
GRP2PC
BON
R23FLG
REND15 # BRANCH IF BACKUP OPTICS (R23 WORKING)
DLOAD DAD
SXTVAR
IMUVAR
REND10 STOVL VARIANCE # TEMP STORAGE FOR VARIANCE CALC.
RCLP
ABVAL NORM
X1
DSQ DMP
VARIANCE
XAD,1 CALL
X1
SHIFTNDX # GET EARTH MOON SCALING INDEX
# Page 582
XAD,1 XAD,1
X2
X2
SR* TLOAD
0 -2,1 # ADJUST SCALING TO B-40
MPAC
STORE VARIANCE
SLOAD SR
INTVAR # INTEGRATION VARIANCE SCALED B-15
25D # SCALE IT B-40
TAD RTB
VARIANCE
TPMODE
STORE VARIANCE
BOFF TAD
SOURCFLG # BRANCH IF NOT VHF RADAR
REND10A
RVARMIN # VHF RADAR MIN. VARIANCE
BPL TLOAD
REND10A
RVARMIN