forked from chrislgarry/Apollo-11
-
Notifications
You must be signed in to change notification settings - Fork 0
/
P51-P53.s
2213 lines (2115 loc) · 40.1 KB
/
P51-P53.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: P51-P53.agc
# Purpose: Part of the source code for Comanche, build 055. It
# is part of the source code for the Command Module's
# (CM) Apollo Guidance Computer (AGC), Apollo 11.
# Assembler: yaYUL
# Reference: pp. 737-784
# Contact: Ron Burkey <info@sandroid.org>
# Website: http://www.ibiblio.org/apollo.
# Mod history: 2009-05-12 RSB Adapted from Colossus249 file of the same
# name, and Comanche 055 page images.
# 2009-05-20 RSB Corrections: SETI/PDT -> SET1/PDT,
# GOTOPOOH -> GOTOP00H, R33EXIT -> R53EXIT,
# V853 -> VB53, R56A -> R56A1 (some places
# only), added missing R56A1 label, added a
# missing CAF in COARSTYP, corrected a SETLOC
# from P50S to P50S3.
# 2009-05-21 RSB In COARFINE, a TC BANKCALL was corrected to
# TC PHASCHNG. In R53C, a CADR GOFLASHR was
# corrected to CADR GOFLASH.
#
# The contents of the "Comanche055" files, in general, are transcribed
# from scanned documents.
#
# Assemble revision 055 of AGC program Comanche by NASA
# 2021113-051. April 1, 1969.
#
# This AGC program shall also be referred to as Colossus 2A
#
# Prepared by
# Massachussets Institute of Technology
# 75 Cambridge Parkway
# Cambridge, Massachusetts
#
# under NASA contract NAS 9-4065.
#
# Refer directly to the online document mentioned above for further
# information. Please report any errors to info@sandroid.org.
# Page 737
# PROGRAM NAME -- PROG52 DATE -- NOV 30, 1966
# MOD NO -- 2 LOG SECTION -- P51-P53
# MODIFICATION BY -- LONSKE ASSEMBLY -- SUNDISK REV 30
#
# FUNCTIONAL DESCRIPTION --
#
# ALIGNS THE IMU TO ONE OF THREE ORIENTATIONS SELECTED BY THE ASTRONAUT. THE PRESENT IMU ORIENTATION IS KNOWN
# AND IS STORED IN REFSMMAT. THE THREE POSSIBLE ORIENTATIONS MAY BE:
#
# (A) PREFERRED ORIENTATION
#
# AN OPTIMUM ORIENTATION FOR A PREVIOUSLY CALCULATED MANEUVER. THIS ORIENTATION MUST BE CALCULATED AND
# STORED BY A PREVIOUSLY SELECTED PROGRAM.
#
# (B) NOMINAL ORIENTATION
#
# X = UNIT ( Y x Z )
# -SM -SM -SM
#
# Y = UNIT (V X R)
# -SM - -
#
# Z = UNIT ( -R )
# -SM -
#
# WHERE:
#
# R = THE GEOMETRIC RADIUS VECTOR AT TIME T(ALIGN) SELECTED BY THE ASTRONAUT
# -
#
# V = THE INERTIAL VELOCITY VECTOR AT TIME T(ALIGN) SELECTED BY THE ASTRONAUT
# -
#
# (C) RERSMMAT ORIENTATION
#
# THIS SELECTION CORRECTS THE PRESENT IMU ORIENTATION. THE PRESENT ORIENTATION DIFFERS FROM THAT TO WHICH IT
# WAS LAST ALIGNED ONLY DUE TO GYRO DRIVE (I.E., NEITHER GIMBAL LOCK NOR IMU POWER INTERRUPT HAS OCCURRED
# SINCE THE LAST ALIGNMENT).
#
# AFTER A IMU ORIENTATION HAS BEEN SELECTED ROUTINE S52.2 IS OPERATED TO COMPUTE THE GIMBAL ANGLES USING THE
# NEW ORIENTATION AND THE PRESENT VEHICLE ATTITUDE. CAL52A THEN USES THESE ANGLES, STORED IN THETAD,+1,+2, TO
# COARSE ALIGN THE IMU. THE STARS SELECTION ROUTINE, R56, IS THEN OPERATED. IF 2 STARS ARE NOT AVAILABLE AN ALARM
# IS FLASHED TO NOTIFY THE ASTRONAUT. AT THIS POINT THE ASTRONAUT WILL MANEUVER THE VEHICLE AND SELECT 2 STARS
# EITHER MANUALLY OR AUTOMATICALLY. AFTER 2 STARS HAVE BEEN SELECTED THE IMU IS FINE ALIGNED USING ROUTINE R51. IF
# THE RENDEZVOUS NAVIGATION PROCESS IS OPERATING (INDICATED BY RNDVZFLG) P20 IS DISPLAYED. OTHERWISE P00 IS
# REQUESTED.
#
# CALLING SEQUENCE --
#
# THE PROGRAM IS CALLED BY THE ASTRONAUT BY DSKY ENTRY.
# Page 738
#
# SUBROUTINES CALLED --
#
# 1. FLAGDOWN 7. S52.2 13. NEWMODEX
# 2. R02BOTH 8. CAL53A 14. PRIOLARM
# 3. GOPERF4 9. FLAGUP
# 4. MATMOVE 10. R56
# 5. GOFLASH 11. R51
# 6. S52.3 12. GOPERF3
#
# NORMAL EXIT MODES --
#
# EXITS TO ENDOFJOB
#
# ALARM OR ABORT EXIT MODES --
#
# NONE
#
# OUTPUT --
#
# THE FOLLOWING MAY BE FLASHED ON THE DSKY
# 1. IMU ORIENTATION CODE
# 2. ALARM CODE 215 -- PREFERRED IMU ORIENTATION NOT SPECIFIED
# 3. TIME OF NEXT IGNITION
# 4. GIMBAL ANGLES
# 5. ALARM CODE 405 -- TWO STARS NOT AVAILABLE
# 6. PLEASE PERFORM P00
# THE MODE DISPLAY MAY BE CHANGED TO 20
#
# ERASABLE INITIALIZATION REQUIRED --
#
# PFRATFLG SHOULD BE SET IF A PREFERRED ORIENTATION HAS BEEN COMPUTED. IF IT HAS BEEN COMPUTED IT IS STORED IN
# XSMD, YSMD, ZSMD.
#
# RNDVZFLG INDICATES WHETHER THE RENDEZVOUS NAVIGATION PROCESS IS OPERATING.
#
# DEBRIS --
#
# WORK AREA
P54 = PROG52
BANK 33
SETLOC P50S
BANK
SBANK= LOWSUPER
EBANK= SAC
COUNT 15/P52
PROG52 TC PHASCHNG
OCT 00254
TC DOWNFLAG
ADRES UPDATFLG # BIT 7 FLAG 1
# Page 739
TC DOWNFLAG
ADRES TRACKFLG # BIT 5 FLAG 1
TC BANKCALL
CADR R02BOTH # IMU STATUS CHECK
CAF BIT4
MASK STATE +2 # IS PFRATFLG SET?
CCS A
TC P52A # YES
CAF BIT2 # NO
TC P52A +1
P52A CAF BIT1
TS OPTION2
P52B CAF BIT1
TC BANKCALL # FLASH OPTION CODE AND ORIENTATION CODE
CADR GOPERF4R
TC GOTOP00H
TC +5
TC P52B # NEW CODE -- NEW ORIENTATION CODE INPUT
TC PHASCHNG
OCT 00014
TC ENDOFJOB
CA OPTION2
MASK THREE
INDEX A
TC +1
TC P52T # L.S.
TC P52J # PREF
TC P52T # NORM
TCF P52C # REF
P52T EXTEND
DCA NEG0
DXCH DSPTEM1
CAF V06N34
TC BANKCALL
CADR GOFLASH
TC GOTOP00H
TC +2
TC -5
EXTEND
DCA DSPTEM1
EXTEND
BZF +2
TCF +4
EXTEND
DCA TIME2
DXCH DSPTEM1
CA OPTION2
MASK BIT2
CCS A
# Page 740
TCF +6 # NOM
TC INTPRET # LS
CALL
P52LS
GOTO
P52D
TC INTPRET
DLOAD
DSPTEM1
CALL # COMPUTE NOMINAL IMU
S52.3 # ORIENTATION
P52D CALL # READ VEHICLE ATTITUDE AND
S52.2 # COMPUTE GIMBAL ANGLES
EXIT
CAF VB06N22
TC BANKCALL # DISPLAY GIMBAL ANGLES
CADR GOFLASH
TC GOTOP00H
TC COARSTYP
P52J TC INTPRET # RECYCLE: VEHICLE HAS BEEN MANEUVERED
GOTO
P52D
TC INTPRET
CALL # DO COARSE ALIGN
CAL53A # ROUTINE
CAL53RET SET EXIT
REFSMFLG
P52C TC PHASCHNG
OCT 04024
CAF ALRM15
TC BANKCALL
CADR GOPERF1
TC GOTOP00H
TC +2 # V33
TC P52F # E
TC INTPRET
RTB DAD
LOADTIME
TSIGHT1
CALL
LOCSAM
EXIT
P52E TC BANKCALL # DO STAR SELECTION
CADR PICAPAR
TC P52I # 2 STARS NOT AVAILABLE
P52F TC INTPRET # 2 STARS AVAILABLE
CALL
R51
ENDP50S EXIT
TC GOTOP00H
# Page 741
P52I TC ALARM
OCT 405
CAF V05N09
TC BANKCALL
CADR GOFLASH
TC GOTOP00H
TC P52F # PROCEED: DO FINE ALIGN-R51
TC P52C # RECYCLE: VEHICLE HAS BEEN MANEUVERED
V06N34 VN 0634
VB06N22 VN 00622
COARSTYP CAF OCT13
TC BANKCALL
CADR GOPERF1
TCF GOTOP00H # V34
TCF P52J +3 # NORMAL
TC INTPRET # GYRO COARSE
GYCRS VLOAD MXV
XSMD
REFSMMAT
UNIT
STOVL XDC
YSMD
MXV UNIT
REFSMMAT
STOVL YDC
ZSMD
MXV UNIT
REFSMMAT
STCALL ZDC
CALCGTA
CLEAR CLEAR
DRIFTFLG
REFSMFLG
EXIT
CAF V16N20
TC BANKCALL
CADR GODSPR
CA R55CDR
TC BANKCALL
CADR IMUPULSE
TC BANKCALL
CADR IMUSTALL
TC CURTAINS
TC PHASCHNG
OCT 04024
TC INTPRET
AXC,1 AXC,2
XSMD
REFSMMAT
CALL
# Page 742
MATMOVE
CLEAR SET
PFRATFLG
REFSMFLG
RTB VLOAD
SET1/PDT
ZEROVEC
STORE GCOMP
SET GOTO
DRIFTFLG
R51K
V16N20 VN 1620
ALRM15 EQUALS OCT15
SETLOC P50S2
BANK
V06N89* VN 0689
# NAME -- P52LS
#
# FUNCTION -- TO DISPLAY THE LANDING SITE LATITUDE,
# LONGITUDE AND ALTITUDE. TO ACCEPT NEW DATA VIA
# THE KEYBOARD. TO COMPUT THE LANDING SITE
# ORIENTATIION FOR P52 OR P54.
#
# LET:
# RLS = LANDING SITE VECTOR IN REF COORDINATES
# R = CSM POSITION VECTOR IN REF COORDINATES
# V = CSM VELOCITY VECTOR IN REF COORDINATES
# THEN THE LANDING SITE ORIENTATION IS:
# XSMD = UNIT(RLS)
# YSMD = UNIT(ZSMD*XSMD)
# ZSMD = UNIT((R*V)*RLS)
#
# CALL: CALL
# P52LS
#
# INPUTS: DSPTEM1 = TIME OF ALIGNMENT
# RLS = LANDING SITE VECTOR IN MOON FIXED COORDINATES
#
# OUTPUTS: XSMD, YSMD, ZSMD
#
# SUBROUTINES: RP-TO-R, LAT-LONG, LLASRD, LLASRDA, CSMPREC
#
# DEBRIS: VAC, SEE SUBROUTINES
P52LS STQ SET
QMAJ
LUNAFLAG
DLOAD
DSPTEM1
STORE TSIGHT
VLOAD SET
RLS
ERADFLAG
STODL 0D
TSIGHT
STCALL 6D
# Page 743
RP-TO-R
VSR2
STODL ALPHAV
TSIGHT
CALL
LAT-LONG
CALL
LLASRD
EXIT
LSDISP CAF V06N89*
TC BANKCALL
CADR GOFLASH
TC GOTOP00H
TC +2
TC LSDISP
TC INTPRET
CALL
LLASRDA
DLOAD CALL
TSIGHT
LALOTORV
VLOAD UNIT
ALPHAV
STODL XSMD
TSIGHT
STCALL TDEC1
CSMPREC
VLOAD VXV
RATT
VATT
VXV UNIT
XSMD
STORE ZSMD
VXV UNIT
XSMD
STCALL YSMD
QMAJ
SETLOC P50S1
BANK
# NAME: AUTOMATIC OPTICS POSITIONING ROUTINE
#
# FUNCTION: (1) TO POINT THE STAR LOS OF THE OPTICS AT A STAR OR LANDMARK DEFINED BY THE PROGRAM OR BY DSKY INPUT.
# (2) TO POINT THE STAR LOS OF THE OPTICS AT THE LEM DURING RENDEZVOUS TRACKING OPERATIONS.
#
# CALLING: CALL R52
#
# INPUT: 1. TARG1FLG AND TARG2FLG: PRESET BY CALLER
# 2. RNDVZFLG AND TRACKFLG: PRESET BY CALLER
# 3. STAR CODE: PRESET BY CALLER. ALSO INPUT THROUGH DSKY
# 4. LAT, LONG, AND ALT OF LANDMARK: INPUT THROUGH DSKY
# Page 744
# 5. NO. OF MARKS (MARKINDX): PRESET BY CALLER
#
# OUTPUT: DRIVE SHAFT AND TRUNNION CDUS.
#
# SUBROUTINES: 1. FIXDELAY 7. CLEANDSP
# 2. GOPERF1 8. GODSPR
# 3. GOFLASH 9. REFLASHR
# 4. R53 10. R52.2
# 5. ALARM 11. R52.3
# 6. SR52.1
COUNT 15/R52
R52 STQ CLEAR
SAVQR52
ADVTRK
R52VRB EXIT
EXTEND
DCA CDUT
DXCH DESOPTT
TC INTPRET
SSP CLEAR
OPTIND
0
R53FLAG
EXIT
R52A TC INTPRET
SET BON
TRUNFLAG
TARG1FLG
R52H
CLEAR EXIT
TERMIFLG
R52C CA SWSAMPLE # IS OPTICS MODE IN AGC
EXTEND
BZMF R52M # MANUAL
R52D TC BANKCALL # AGC
CADR SR52.1
TCF R52L # GR 90 DEGREES
TCF R52J # GR 50 DEGREES
TC UPFLAG # LS 50 DEGREES
ADRES TRUNFLAG # SET TRUNFLAG BIT 4 FLAG 0
R52JA CAF BIT10 # IS THIS A LEM
MASK STATE +1
CCS A
TC R52E # YES
CAF BIT6 # NO, IS R53FLAG SET
MASK STATE
CCS A
TCF R52E # YES
# Page 745
CAF V06N92 # NO
TC BANKCALL
CADR GODSPR
R52E CA SWSAMPLE # IS OSS IN CMC MODE
EXTEND
BZMF R52F # NO
CS STATE # YES: IS TRUNFLAG SET
MASK BIT4
CCS A
TC +3 # NO
CA PAC # YES
TS DESOPTT
CA SAC
TS DESOPTS
R52F CAF .5SEC # WAIT 1/2 SEC
TC BANKCALL
CADR DELAYJOB
CAF BIT10
MASK STATE +1
CCS A
TCF R52HA # YES, LEM
CAF BIT15 # NO
MASK STATE +7 # IS TERMIFLG SET
EXTEND
BZF R52C # NO
R52Q TC INTPRET # YES
GOTO
SAVQR52
R52H EXIT # LEM
R52HA TC BANKCALL
CADR R61CSM
CA STATE +1
MASK BIT5
EXTEND # TRACKFLG
BZF R52Q
CS STATE +1
MASK BIT7 # UPDATFLG
CCS A
TCF R52SYNC
R52I CA STATE +5
MASK BIT10
CCS A
TC R52D # PRFTRKAT = 1
R52SYNC CAF 1.8SEC # MAKE UP FOR LOST TIME
TCF R52F +1
R52J TC DOWNFLAG # CLEAR TRUNFLAG
ADRES TRUNFLAG # BIT 4 FLAG 0
# Page 746
TC ALARM # SET 407 ALARM
OCT 407
TC R52JA
R52M CAF BIT6 # IS R53FLAG SET
MASK STATE
CCS A
TC R52F # YES
INHINT # NO
CAF PRIO24
TC FINDVAC
EBANK= SAC
2CADR R53JOB
RELINT
TCF R52F
R53JOB TC INTPRET
CALL
R53
ENDPLAC EXIT # INTERPRETER RETURN TO ENDOFJOB (R22 USES)
TC ENDOFJOB
V06N92 VN 00692
V06N89A VN 0689
SHAXIS 2DEC .5376381241 B-1
2DEC 0
2DEC .8431766920 B-1
R52L CAF BIT10 # IS THIS A LEM
MASK STATE +1
CCS A
TC R52J # YES
CAF OCT404
TC BANKCALL
CADR PRIOLARM
TCF TERM52 # TERMINATE
TCF R52F # PROCEED
TCF R52F # NO PROVISION FOR NEW DATA
TCF ENDOFJOB
OCT404 OCT 404
1.8SEC DEC 180
TERM52 TC CLEARMRK
TC BANKCALL # KILL MARK SYSTEM
CADR MKRELEAS
# Page 747
CAF ZERO
TS OPTCADR
TC BANKCALL # CLEAR OUT EXTENDED VERBS
CADR KLEENEX
TC GOTOP00H # NO GO TO P00
ADVORB STQ SET # SETS UP ADVANCED ORBIT TRACKING
SAVQR52
ADVTRK
SET SET
LUNAFLAG
ERADFLAG
GOTO
R52VRB
# Page 748
# NAME -- S50 ALIAS LOCSAM
# NAME: LOCSAM
#
# FUNCTION -- TO COMPUTE QUATITIGS LISTED BELOW, USED IN THE
# IMU ALIGNMENT PROGRAMS.
#
# DEFINE:
#
# RATT = POSITION VECTOR OF CM WRT PRIMARY BODY
#
# VATT = VELOCITY VECTOR OF CM WRT PRIMARY BODY
#
# RE = RADIUS OF EARTH
#
# RM = RADIUS OF MOON
#
# ECLIPOL = POLE OF ECLIPTIC SCALED BY TANGENTIAL VELOCITY OF EARTH
# WRT TO SUN OVER THE VELOCITY OF LIGHT
#
# REM = POSITION OF MOON WRT EARTH
#
# RES = POSITION OF SUN WRT EARTH
#
# C = VELOCITY OF LIGHT
#
# EARTH IS PRIMARY MOON IS PRIMARY
# _ _
# VEARTH=-1(RATT) VEARTH=-1(REM+RATT)
# _ _
# VMOON = 1(REM-RATT) VMOON =-1(RATT)
# _ _
# VSUN = 1(RES) VSUN = 1(RES-REM)
# -1
# CEARTH=COS(SIN (RE/RATT)+5) CEARTH=COS 5
# -1
# CMOON =COS 5 CMOON =COS(SIN CRM/RATT)+5)
#
# CSUN =COS 15 CSUN =COS 15
#
# VEL/C = VSUN x ECLIPOL + VATT/C
#
# CALL: DLOAD CALL
# DESIRED TIME
# LOCSAM
#
# INPUTS: MPAC = TIME
#
# OUTPUTS: VEARTH, VMOON, VSUN, CEARTH, CMOON, CSUN, VEL/C
#
# SUBROUTINES: LSPOS, CSMCONIC
#
# DEBRIS: VAC AREA, SEE SUBROUTINES.
# Page 749
SETLOC P50S1
BANK
COUNT* $$/S50
LOCSAM = S50
S50 STQ
QMAJ
STCALL TSIGHT
LSPOS
STOVL VMOON
2D
STODL VSUN
TSIGHT
STCALL TDEC1
CSMCONIC
SSP TIX,2
S2
0
MOONCNTR
EARTCNTR VLOAD VSU
VMOON
RATT
UNIT
STOVL VMOON
RATT
UNIT VCOMP
STODL VEARTH
RSUBE
CALL
OCCOS
STODL CEARTH
CSS5
STOVL CMOON
VSUN
UNIT
STCALL VSUN
ENDSAM
MOONCNTR VLOAD VSR8
VMOON
VSR1 BVSU
VSUN
UNIT
STOVL VSUN
VMOON
VAD UNIT
RATT
VCOMP
STOVL VEARTH
# Page 750
RATT
UNIT VCOMP
STODL VMOON
RSUBM
CALL
OCCOS
STODL CMOON
CSS5
STOVL CEARTH
VSUN
ENDSAM VXV
ECLIPOL
STOVL VEL/C
VATT
VXSC VAD
1/C
VEL/C
STODL VEL/C
CSSUN
STCALL CSUN
QMAJ
OCCOS DDV SR1
36D
ASIN DAD
5DEGREES
COS SR1
RVQ
SETLOC P50S
BANK
RSUBM 2DEC 1738090 B-29 # MOON RADIUS IN METERS
RSUBE 2DEC 6378166 B-29
5DEGREES 2DEC .013888889 # SCALED IN REVS
1/C 2DEC .000042699 B-1 # *
ECLIPOL 2DEC 0 # *
2DEC -.00007896 B-1 # *
2DEC .00018209 B-1 # * * FOR USE BY CSM ONLY
TSIGHT1 2DEC 24000
CEARTH = 14D
CSUN = 16D
CMOON = 18D
CSS5 2DEC .2490475 # (COS 5)/4
# Page 751
CSSUN 2DEC .24148 # (COS 15)/4
# Page 752
# PROGRAM NAME -- PICAPAR DATE: DEC 20 66
# MOD 1 LOG SECTION: P51-P53
# ASSEMBLY: SUNDISK REV40
# BY KEN VINCENT
#
# FUNCTION
# THIS PROGRAM READS THE IMU-CDUS AND COMPUTES THE VEHICLE ORIENTATION
# WITH RESPECT TO INERTIAL SPACE. IT THEN COMPUTES THE SHAFT AXIS (SAX)
# WITH RESPECT TO REFERENCE INTERTIAL. EACH STAR IN THE CATALOG IS TESTED
# TO DETERMINE IF IT IS OCCULTED BY EITHER EARTH, SUN OR MOON. IF A
# STAR IS NOT OCCULTED THEN IT IS PAIRED WITH ALL STARS OF LOWER INDEX.
# THE PAIRED STAR IS TESTED FOR OCCULTATION. PAIRS OF STARS THAT PASS
# THE OCCULTATION TESTS ARE TESTED FOR GOOD SEPARATION. A PAIR OF STARS
# HAVE GOOD SEPARATION IF THE ANGLE BETWEEN THEM IS LESS THAN 66 DEGREES
# AND MORE THAN 40 DEGREES. THOSE PAIRS WITH GOOD SEPARATION
# ARE THEN TESTED TO SEE IF THEY LIE IN CURRENT FIELD OF VIEW. (WITHIN
# 33 DEGREES OF SAX). THE PAIR WITH MAX SEPARATION IS CHOSEN FROM
# THOSE WITH GOOD SEPARATION, AND IN FIELD OF VIEW.
#
# CALLING SEQUENCE
# L TC BANKCALL
# L+1 CADR PICAPAR
# L+2 ERROR RETURN -- NO STARS IN FIELD OF VIEW
# L+3 NORMAL RETURN
#
# OUTPUT
# BESTI, BESTJ -- SINGLE PREC, INTEGERS, STAR NUMBERS TIMES 6
# VFLAG -- FLAG BIT SET IMPLIES NO STARS IN FIELD OF VIEW
#
# INITIALIZATION
# 1) A CALL TO LOCSAM MUST BE MADE
# 2) VEARTH = -UNIT(R) WHERE R HAS BEEN UPDATED TO APPROXIMATE TIME OF
# SIGHTINGS.
#
# DEBRIS
# WORK AREA
# X,Y,ZNB
# SINCDU, COSCDU
# STARAD -- STAR +5
COUNT 14/PICAP
SETLOC P50S1
BANK
PICAPAR TC MAKECADR
TS QMIN
TC INTPRET
CALL
CDUTRIG
CALL
CALCSMSC
# Page 753
SETPD
0
SET DLOAD # VFLAG = 1
VFLAG
DPZERO
STOVL BESTI
XNB
VXSC PDVL
SIN33
ZNB
AXT,1 VXSC
228D # X1 = 37 X 6 + 6
COS33
VAD
VXM UNIT
REFSMMAT
STORE SAX # SAX = SHAFT AXIS
SSP SSP # S1 = S2 = 6
S1
6
S2
6
PIC1 TIX,1 GOTO # MAJOR STAR
PIC2
PICEND
PIC2 VLOAD* CALL
CATLOG,1
OCCULT
BON LXA,2
CULTFLAG
PIC1
X1
PIC3 TIX,2 GOTO
PIC4
PIC1
PIC4 VLOAD* CALL
CATLOG,2
OCCULT
BON VLOAD*
CULTFLAG
PIC3
CATLOG,1
DOT* DSU
CATLOG,2
CSS66 # SEPARATION LESS THAN 66 DEG.
BMN DAD
PIC3
CSS6640 # SEPARATION MORE THAN 40 DEG.
BPL
PIC3
# Page 754
VLOAD* DOT
CATLOG,1
SAX
DSU BMN # MAJOR STAR IN CONE
CSS33
PIC1
VLOAD* DOT
CATLOG,2
SAX
DSU BPL
CSS33
STRATGY
GOTO
PIC3
STRATGY BONCLR
VFLAG
NEWPAR
XCHX,1 XCHX,2
BESTI
BESTJ
STRAT VLOAD* DOT*
CATLOG,1
CATLOG,2
PUSH BOFINV
VFLAG
STRAT -3
DLOAD DSU
BPL
PIC3
NEWPAR SXA,1 SXA,2
BESTI
BESTJ
GOTO
PIC3
OCCULT MXV BVSU
CULTRIX
CSS
BZE
CULTED
BMN SIGN
CULTED
MPAC +3
BMN SIGN
CULTED
MPAC +5
BMN CLRGO
CULTED
CULTFLAG
QPRET
CULTED SETGO
# Page 755
CULTFLAG
QPRET
CSS = CEARTH
SIN33 2DEC .5376381241
COS33 2DEC .8431756920
CSS66 2DEC .060480472 # (COS76)/4
CSS6640 2DEC -.15602587 # (COS76 - COS30)/4
CSS33 2DEC .197002688 # (COS(1/2(76))/4
PICEND BOFF EXIT
VFLAG
PICGXT
TC PICBXT
PICGXT EXIT
INCR QMIN
PICBXT CA QMIN
TC SWCALL
#V1 = 12D
# Page 756
# NAME -- R51 FINE ALIGN
# FUNCTION -- TO ALIGN THE STABLE MEMBER TO REFSSMAT
# CALLING SEQ -- CALL R51
# INPUT -- BESTI, BESTJ (PAIR OF STAR NO)
# OUTPUT -- GYRO TORQUE PULSES
# SUBROUTINES -- R52, R54, R55 (SXTNB, NBSM, AXISGEN)
COUNT 14/R51
R51 EXIT
CAF BIT1
TS STARIND
TS MARKINDX
R51.2 TC INTPRET
R51.3 CLEAR CLEAR
TARG2FLG
TARG1FLG
EXIT
TC PHASCHNG
OCT 05024 # RESTART GR 4 FOR R52-R53
OCT 13000
INDEX STARIND
CA BESTI
EXTEND
MP 1/6TH
TS STARCODE
R51DSP CAF V01N70
TC BANKCALL
CADR GOFLASHR
TC GOTOP00H
TC +5
TC -5
CAF SIX
TC BLANKET
TCF ENDOFJOB
TC CHKSCODE
TC FALTON
TC R51DSP
TC INTPRET
RTB CALL
LOADTIME
PLANET
SSP LXA,1
S1
0
STARIND
TIX,1
R51ST
STCALL STARSAV2 # 2ND STAR
R51ST +1
R51ST STORE STARSAV1 # 1ST STAR
# Page 757
EXIT
CS MODREG # IS THIS P54
AD OCT66
EXTEND
BZF R51B # YES
TC INTPRET
CALL
R52 # AOP WILL MAKE CALLS TO SIGHTING
R51A CALL # COMPUTE LOS IN SM FROM MARK DATA
SXTSM
STORE STARSAV2
EXIT
TC BANKCALL
CADR MKRELEAS
TC INTPRET
DLOAD CALL
TSIGHT
PLANET
EXIT
CCS STARIND
TC R51.4
TC INTPRET
MXV UNIT
REFSMMAT
STORE STARAD
VLOAD
STARSAV2
STOVL 6D
STARSAV1
STOVL 12D
PLANVEC
STCALL STARAD +6
R54 # STAR DATA TEST
BOFF CALL