Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proof P51-P53 pages 956-965, continuation of issue #617 #833

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
199 changes: 95 additions & 104 deletions Luminary099/P51-P53.agc
Original file line number Diff line number Diff line change
Expand Up @@ -1203,21 +1203,21 @@ S52.3 STQ
QMAJ

# Page 955
# NAME -- R52 (AUTOMATIC OPTICS POSITIONING ROUTINE)
# NAME -R52 (AUTOMATIC OPTICS POSITIONING ROUTINE)
#
# FUNCTION -- POINT THE AOT APTICS AXIS BY MANEUVERING THE LEM TO A NAVIGATION
# STAR SELECTED BY ALIGNMENT PROGRAMS OR DSKY INPUT
# FUNCTION-POINT THE AOT OPTIC AXIS BY MANEUVERING THE LEM TO A NAVIGATION
# STAR SELECTED BY ALIGNMENT PROGRAMS OR DSKY INPUT
#
# CALLING -- CALL R52
# CALLING -CALL R52
#
# INPUT -- BESTI AND BESTJ (STAR CODES TIMES 6)
# INPUT -BESTI AND BESTJ (STAR CODES TIMES 6)
#
# OUTPUT -- STAR CODE IN BITS 1-6, DETENT CODE IN BITS 7-9
# (NO CHECK IS MADE TO INSURE THE DETENT CODE TO BE VALID)
# POINTVSM-1/2 UNIT NAV STAR VEC IN SM
# SCAXIS-AOT OPTIC AXIS VEC IN NB X-Z PLANE
# OUTPUT -STAR CODE IN BITS1-6, DETENT CODE IN BITS 7-9
# (NO CHECK IS MADE TO INSURE THE DETENT CODE TO BE VALID)
# POINTVSM-1/2 UNIT NAV STAR VEC IN SM
# SCAXIS-AOT OPTIC AXIS VEC IN NB X-Z PLANE
#
# SUBROUT -- R60LEM
# SUBROUT -R60LEM

COUNT* $$/R52
R52 STQ EXIT
Expand All @@ -1232,9 +1232,9 @@ R52 STQ EXIT
R52A CAF V01N70
TC BANKCALL
CADR GOFLASH # DISPLAY STARCODE AND WAIT FOR RESPONSE
TC GOTOPOOH # V34 -- TERMINATE
TCF R52B # V33 -- PROCEED TO ORIENT LEM
TCF R52A # ENTER -- SELECT NEW STARCODE -- RECYCLE
TC GOTOPOOH # V34-TERMINATE
TCF R52B # V33-PROCEED TO ORIENT LEM
TCF R52A # ENTER-SELECT NEW STARCODE-RECYCLE

R52B TC DOWNFLAG
ADRES 3AXISFLG # BIT6 OF FLAGWRD5 ZERO TO ALLOW VECPOINT
Expand All @@ -1259,7 +1259,7 @@ R52B TC DOWNFLAG
CA AOTAZ -1 # PICK UP AZ CORRESPONDING TO DETENT
TS L
EBANK= XSM
CA EBANK5 # CHANGE TO EBANK5 BUT DON'T DISTURB L
CA EBANK5 # CHANGE TO EBANK5 BUT DONT DISTURB L
TS EBANK
CA BIT13 # SET ELV TO 45 DEG
XCH L # SET C(A)=AZ, C(L)=45 DEG
Expand All @@ -1268,12 +1268,12 @@ R52B TC DOWNFLAG
GETAZEL CAF V06N87 # CODE 0 OR 7, GET AZ AND EL KEY IN
TC BANKCALL
CADR GOFLASH
TC GOTOPOOH # V34 -- TERMINATE
TCF +2 # PROCEED -- CALC OPTIC AXIS
TCF GETAZEL # ENTER -- RECYCLE
TC GOTOPOOH # V34-TERMINATE
TCF +2 # PROCEED-CALC OPTIC AXIS
TCF GETAZEL # ENTER-RECYCLE

EXTEND
DCA AZ # PICK UP AZ AND EL IN SP 2'S COMP
DCA AZ # PICK UP AZ AND EL IN SP 2S COMP
AZEL INDEX FIXLOC # JAM AZ AND EL IN 8 AND 9 OF VAC
DXCH 8D
TC INTPRET
Expand All @@ -1290,7 +1290,7 @@ AZEL INDEX FIXLOC # JAM AZ AND EL IN 8 AND 9 OF VAC
TC BANKCALL
CADR R60LEM # GO TORQUE LEM OPTIC AXIS TO STAR LOS

CAF HIGH9 # IF COAS CALIBRATION CODE 0. RECYCLE
CAF HIGH9 # IF COAS CALIBRATION CODE 0. RECYCLE
MASK STARCODE
EXTEND
BZF R52A
Expand All @@ -1312,16 +1312,16 @@ V06N87 VN 687
COUNT* $$/R59

R59 CS FLAGWRD3
MASK REFSMBIT # IF REFSMMAT FLAG CLEAR BYPASS STAR ACQUIRE
MASK REFSMBIT # IF REFSMMAT FLAG CLEAR BYPASS STAR AQUIR
CCS A
TCF R59OUT # NO REFSMMAT GO TO AOTMARK

CAF V01N70* # SELECT STAR CODE FOR ACQUISITION
TC BANKCALL
CADR GOFLASH
TC GOTOPOOH # V34 -- TERMINATE
TCF R59A # V33 -- PROCEED
TCF R59 # V32 -- RECYCLE
TC GOTOPOOH # V34-TERMINATE
TCF R59A # V33-PROCEED
TCF R59 # V32-RECYCLE

R59A CS HIGH9 # GRAB STARCODE FOR INDEX
MASK AOTCODE
Expand All @@ -1348,7 +1348,7 @@ R59A CS HIGH9 # GRAB STARCODE FOR INDEX
STORE STAR # TEMP STORE STAR VEC(NB)
EXIT

CAF BIT1 # INITIALIZE AZ POSITION COD TO 1 (-60)
CAF BIT1 # INITIALIZE AZ POSITION CODE TO 1 (-60)
TS POSCODE

EBANK= XYMARK
Expand Down Expand Up @@ -1381,7 +1381,7 @@ INCAZ CA EBANK7

DSU BPL
DEG30 # SEE IF STAR IN AOT FIELD-OF-VIEW
NXAX # NOT IN FIELD -- TRY NEXT POSITION
NXAX # NOT IN FIELD - TRY NEXT POSITION
DLOAD DSU # SEE IF STAR AT FIELD CENTER
24D
DEG.5
Expand All @@ -1395,20 +1395,20 @@ INCAZ CA EBANK7
SCAXIS # OA
VXV UNIT
XUNIT
PUSH VXV # OA X UNITX PD 0-5
PUSH VXV # OA X UNITX PD 0-5
SCAXIS
VCOMP
UNIT PDVL # UNIT(OA X (OA X UNITX)) PD 6-11
UNIT PDVL # UNIT(OA X(OA X UNITX)) PD 6-11
SCAXIS
VXV UNIT
STAR
PUSH DOT # 1/2(OA X STAR) PD 12-17
0 # DOT WITH 1/2(OA X UNITX) FOR YROT
PUSH DOT # 1/2(OA X STAR) PD 12-17
0 # DOT WITH 1/2(OA X UNITX) FOR YROT
SL1 ARCCOS
STOVL 26D # STORE THET SCALED IN REVS
# Page 959
DOT # UP 12-17, UP 6-11 FOR C2
BPL DLOAD # IF THET NEG -- GET 360-THET
BPL DLOAD # IF THET NEG-GET 360-THET
R59D
ABOUTONE
DSU
Expand All @@ -1431,7 +1431,7 @@ R59D SLOAD SR1
TCF 79DISP # GO DISPLAY CURSOR-SPIRAL-POS CODE

ZSPCR EXIT
CAF ZERO # STAR ALMOST OPTIC AXIS, ZERO CURSOR
CAF ZERO # STAR ALMOST OPTIC AXIS,ZERO CURSOR
TS CURSOR # AND SPIRAL ANGLES
TS SPIRAL
TCF 79DISP
Expand All @@ -1444,22 +1444,22 @@ NXAX EXIT
BZMF R59ALM # THIS STAR NOT AT ANY POSITION
TCF INCAZ

R59ALM TC ALARM # THIS STAR CAN'T BE LOCATED IN AOT FIELD
R59ALM TC ALARM # THIS STAR CANT BE LOCATED IN AOT FIELD
OCT 404
CAF VB05N09 # DISPLAY ALARM
TC BANKCALL
CADR GOFLASH
TCF GOTOPOOH # VB34 -- TERMINATE
TCF R59OUT # VB33 -- PROCEED, GO WITHOUT ACQUIRE
TCF R59 # VB32 -- RECYCLE AND TRY ANOTHER STAR
TCF GOTOPOOH # VB34-TERMINATE
TCF R59OUT # VB33-PROCEED, GO WITHOUT ACQUIRE
TCF R59 # VB32-RECYCLE AND TRY ANOTHER STAR

79DISP CAF V06N79 # DISPLAY CURSOR, SPIRAL AND POS CODE
TC BANKCALL
CADR GOFLASH
TCF GOTOPOOH # V34 -- TERMINATE
TCF GOTOPOOH # V34-TERMINATE
# Page 960
TCF R59E # V33 -- PROCEED TO MARK ROUTINE
TCF R59 # V32 -- RECYCLE TO TOP OF R59 AGAIN
TCF R59E # V33-PROCEED TO MARK ROUTINE
TCF R59 # V32-RECYCLE TO TOP OF R59 AGAIN

R59E CAF SEVEN # GET DETENT CODE CORRESPONDING TO POSCODE
MASK POSCODE
Expand All @@ -1480,31 +1480,31 @@ R59OUT TC BANKCALL # GO TO AOTMARK FOR SIGHTING
V01N70* VN 170
V06N79 VN 679
DEG30 2DEC .083333333 # 30 DEGREES
DEG.5 2DEC .00138888 # .5 DEGREES SCALED IN REVS.
DEG.5 2DEC .00138888 # .5 DEGREES SCALED IN REVS
DEG60 OCT 12525 # 60 DEG CDU SCALING
CURSOR EQUALS GDT/2
SPIRAL EQUALS GDT/2 +2
POSCODE EQUALS GDT/2 +4

# Page 961
# NAME -- PLANET
# FUNCTION -- TO PROVIDE THE REFERENCE VECTOR FOR THE SIGHTED CELESTIAL
# BODY. STARS ARE FETCHED FROM THE CATALOG, SUN, EARTH AND
# MOON ARE COMPUTED BY LOCSAM, PLANET VECTORS ARE ENTERED
# BY DSKY INPUT.
# CALL -- CALL
# PLANET
# INPUT -- TIME IN MPAC
# OUTPUT -- VECTOR IN MPAC
# SUBROUTINES -- LOCSAM
# DEBRIS -- VAC, STARAD - STARAD +17
# NAME - PLANET
# FUNCTION -TO PROVIDE THE REFERENCE VECTOR FOR THE SIGHTED CELESTIAL
# BODY. STARS ARE FETCHED FROM THE CATALOG,SUN,EARTH AND
# MOON ARE COMPUTED BY LOCSAM,PLANET VECTORS ARE ENTERED
# BY DSKY INPUT
# CALL - CALL
# PLANET
# INPUT - TIME IN MPAC
# OUTPUT - VECTOR IN MPAC
# SUBROUTINES - LOCSAM
# DEBRIS - VAC .STARAD - STARAD +17

SETLOC P50S
BANK
COUNT* $$/P51

PLANET STOVL TSIGHT
ZEROVEC
ZEROVEC # ZERO N88 DISPLAY VEC
STORE STARAD
STQ EXIT
GCTR
Expand Down Expand Up @@ -1561,41 +1561,35 @@ CALSAM DLOAD CALL
GCTR
DEC227 DEC 227
VNPLANV VN 0688
PIPSRINE = PIPASR +3 # EBANK NOT 4 SO DON'T LOAD PIPTIME1
PIPSRINE = PIPASR +3 # EBANK NOT 4 SO DONT LOAD PIPTIME1

# Page 963
# GRAVITY VECTOR DETERMINATION ROUTINE
# BY KEN VINCENT
#
# FOR DETAILED DESCRIPTION SEE 504GSOP 5.6.3.2.5.
#
# THIS PROGRAM FINDS THE DIRECTION OF THE MOON'S GRAVITY
# WHILE THE LM IS IN THE MOON'S SURFACE. IT WILL BE USED
# FOR LUNAR SURFACE ALIGNMENT. THE GRAVITY VECTOR IS
# FOR DETAILED DESCRIPTION SEE 504GSOP 5.6.3.2.5
# THIS PROGRAM FINDS THE DIRECTION OF THE MOONS GRAVITY
# WHILE THE LM IS ON THE MOONS SURFACE. IT WILL BE USED
# FOR LUNAR SURFACE ALIGNMENT. THE GRAVITY VECTOR IS
# DETERMINED BY READING THE PIPAS WITH THE IMU AT TWO
# PARTICULAR ORIENTATIONS. THE TWO READINGS ARE AVERAGED
# AND UNITIZED AND TRANSFORMED TO NB COORDINATES. THE TWO
# ORIENTATIONS WERE CHOSEN TO REDUCE BIAS ERRORS IN THE
# PARTICULAR ORIENTATIONS. THE TWO READINGS ARE AVERAGED
# AND UNITIZED AND TRANSFORMED TO NB COORDINATES. THE TWO
# ORIENTATION WERE CHOSEN TO REDUCE BIAS ERRORS IN THE
# READINGS.
#
# CALL --
# TC BANKCALL
# CADR GVDETER
#
# INPUTS --
# PIPAS, CDUS
#
# OUTPUTS --
# STARSAV1 = UNIT GRAVITY
# GSAV = DITTO
# GRAVBIT = 1
#
# SUBROUTINES --
# PIPASR, IMUCOARS, IMUFINE, IMUSTALL, 1/PIPA, DELAYJOB, CDUTRIG,
# *NBSM*, *SNMB*, CALCGA, GOFLASH
#
# DEBRIS --
# VAC, SAC, STARAD, XSM, XNB, THETAD, DELV, COSCDU, SINCDU
# CALL-
# TC BANKCALL
# CADR GVDETER
# INPUTS-
# PIPAS,CDUS
# OUTPUTS-
# STARSAV1 = UNIT GRAVITY
# GSAV = DITTO
# GRAVBIT = 1
# SUBROUTINES-
# PIPASR,IMUCOARS,IMUFINE,IMUSTALL,1/PIPA,DELAYJOB,CDUTRIG,
# *NBSM* ,*SNMB*, CALCGA,FOFLASH
# DEBRIS-
# VAC,SAC,STARAD,XSM,XNB,THETAD,DELV,COSCDU,SINCDU

GVDETER CAF 42DEG
TS THETAD
Expand All @@ -1608,38 +1602,36 @@ GVDETER CAF 42DEG
REFSMFLG
LUNG

# FIND GIMBAL ANGLES WHICH ROTATE SM 180 DEG ABOUT G VEC
#
# DEFINE G COOR SYS
# _
# [ X ] [ UNIT G ]
# * [ _ ] [ _ ]
# M = [ Y ] = [ UNITEZSM * X ]
# [ _ ] [ _ _ ]
# [ Z ] [ UNIT( X * Y )]
# FIND GIMBAL ANGLES WHICH ROTATE SM 180 DEG ABOUT G VEC
#
# THEN ROTATED SM WRT PRESENT IS
# DEFINE G COOR SYS
# _
# X UNIT G
# * _ _
# M= Y = UNITEZSM * X )
# _ _ _
# Z UNIT( X * Y )
# THEN ROTATED SM WRT PRESENT IS
#
# Page 964
# [ 1 0 0 ]
# * *T [ ] * * *
# XSM = M [ 0 -1 0 ] M = 2 (X X ) - 1/2 I
# [ ] I J
# [ 0 0 -1 ]
# 1, 0 , 0
# * *T * * *
# XSM = M 0, -1 , 0 M = 2 (X X ) - 1/2 I *
# I J
# 0, 0 ,-1
#
# ALSO NB WRT PRES SM IS
# ALSO NB WRT PRES SM IS
#
# * * *
# XNB = NBSM I
#
# * *
# GIMBAL ANGLES = CALCGA( XSM, XNB )
# * *
# GIMBAL ANGLES = CALCGA( XSM , XNB )

SETLOC P50S
BANK
COUNT* $$/P57
AXT,1 SSP # X1=18
18D # S1=6
18D # S1= 6
S1 # X2, -2
6D
LXC,2
Expand All @@ -1650,7 +1642,7 @@ GRAVEL VLOAD* CALL
STORE XNB +18D,1
VLOAD
STAR
LXC,2 VXSC* # COMPLEMENT -- UNITX ARE BACKWARD --
LXC,2 VXSC* # COMPLEMENT- UNITX ARE BACKWARD -
X2
STAR +6,2 # OUTER PRODUCT
VSL2 LXC,2
Expand Down Expand Up @@ -1684,8 +1676,8 @@ GRAVEL VLOAD* CALL
TC BANKCALL
CADR GOFLASH
TC GOTOPOOH
TCF PROGRAV # VB33 -- PROCEED
TC UPFLAG # VB32 -- RECYCLE -- STORE GRAV AND DO IT AGAIN
TCF PROGRAV # VB33-PROCEED
TC UPFLAG # VB32-RECYCLE-STORE GRAV AND DO IT AGAIN
ADRES FREEFLAG # AND SET FREEFLAG TO SHOW RECYCLE

PROGRAV TC PHASCHNG
Expand All @@ -1696,7 +1688,7 @@ PROGRAV TC PHASCHNG
STARSAV1
STORE GSAV
EXIT
CAF FREEFBIT # IF FREEFLAG SET, RE-COMPUTE GRAVITY
CAF FREEFBIT # IF FREEFLAG SET, RE-COMPUTE GRAVITY.
MASK FLAGWRD0
CCS A
TCF GVDETER # SET
Expand Down Expand Up @@ -2338,4 +2330,3 @@ LSORIENT STQ VLOAD
XSMD
STCALL YSMD
QMAJ