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 #617 #828

Open
wants to merge 2 commits 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
130 changes: 62 additions & 68 deletions Luminary099/P51-P53.agc
Original file line number Diff line number Diff line change
Expand Up @@ -26,61 +26,61 @@
# 16:27 JULY 14, 1969

# Page 926
# PROGRAM NAME -- PROG52 DATE -- JAN 9, 1967
# MOD NO -- 0 LOG SECTION -- P51-P53
# MODIFICATION BY -- LONSKE ASSEMBLY -- SUNDANCE REV 46
# PROGRAM NAME- PROG52 DATE- JAN 9, 1967
# MOD NO- 0 LOG SECTION- P51-P53
# MODIFICATION BY- LONSKE ASSEMBLY- SUNDANCE REV 46
#
# FUNCTIONAL DESCRIPTION --
# 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:
# 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.
# 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 ( R )
# -SM
#
# Y = UNIT (V X R)
# Y = UNIT (V X R)
# SM
#
# Z = UNIT (X X Y )
# SM SM SM
#
# WHERE:
# WHERE_
#
# R = THE GEOCENTRIC 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
# (C) REFSMMAT ORIENTATION
#
# (D) LANDING SITE -- THIS IS NOT AVAILABLE IN SUNDANCE
# (D) LANDING SITE - THIS IS NOT AVAILIBLE IN SUNDANCE
#
# THIS SELECTION CORRECTS THE PRESENT IMU ORIENTATION. THE PRESENT ORIENTATION DIFFERS FROM THAT TO WHICH IT
# WAS LAST ALIGNED ONLY DUE TO GYRO DRIFT (I.E., NEITHER GIMBAL LOCK NOR IMU POWER INTERRUPTION HAS OCCURRED
# THIS SELECTION CORRECTS THE PRESENT IMU ORIENTATION. THE PRESENT ORIENTATION DIFFERS FROM THAT TO WHICH IT
# WAS LAST ALIGNED ONLY DUE TO GYRO DRIFT (I.E. NEITHER GIMBAL LOCK NOR IMU POWER INTERRUPTION 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.
# NEW ORIENTATION AND THE PRESENT VEHICLE ATTITUDE. CAL52A THEN USES THESE ANGLES, STORED IN THETAD,+1,+2, TO
# COARSE ALIGN THE IMU. THE STAR 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 --
# CALLING SEQUENCE-
#
# Page 927
# THE PROGRAM IS CALLED BY THE ASTRONAUT BY DSKY ENTRY.
#
# SUBROUTINES CALLED --
# SUBROUTINES CALLED-
#
# 1. FLAGDOWN 7. S52.2 13. NEWMODEX
# 2. R02BOTH 8. CAL53A 14. PRIOLARM
Expand All @@ -89,33 +89,32 @@
# 5. GOFLASH 11. R51
# 6. S52.3 12. GOPERF3
#
# NORMAL EXIT MODES --
# NORMAL EXIT MODES-
#
# EXITS TO ENDOFJOB
#
# ALARM OR ABORT EXIT MODES --
# ALARM OR ABORT EXIT MODES-
#
# NONE
#
# OUTPUT --
# OUTPUT-
#
# THE FOLLOWING MAY BE FLASHED ON THE DSKY
# 1. IMU ORIENTATION CODE
# 2. ALARM CODE 215 -- PREFERRED IMU ORIENTATION NOT SPECIFIED
# 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
# 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.
# 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 --
# DEBRIS-
#
# WORK AREA

Expand All @@ -140,8 +139,8 @@ P52B CAF BIT1
TC BANKCALL # FLASH OPTION CODE AND ORIENTATION CODE
CADR GOPERF4R # FLASH V04N06
TC GOTOPOOH
TCF +5 # V33 -- PROCEED
TC P52B # NEW CODE -- NEW ORIENTATION CODE INPUT
TCF +5 # V33-PROCEED
TC P52B # NEW CODE - NEW ORIENTATION CODE INPUT
TC PHASCHNG # DISPLAY RETURN
OCT 00014
TC ENDOFJOB
Expand Down Expand Up @@ -182,7 +181,7 @@ P52V CA OPTION2
CCS A
TC P52W
# Page 929
TC INTPRET # OPTION 4 -- GET LS ORIENTATION
TC INTPRET # OPTION 4 - GET LS ORIENTATION
GOTO
P52LS

Expand All @@ -198,7 +197,7 @@ P52D CALL # READ VEHICLE ATTITUDE AND
TC BANKCALL # DISPLAY GIMBAL ANGLES
CADR GOFLASH
TC GOTOPOOH
TCF COARSTYP # V33 -- PROCEED, SEE IF GYRO TORQUE COARSE
TCF COARSTYP # V33-PROCEED, SEE IF GYRO TORQUE COARSE
P52H TC INTPRET
GOTO
P52D
Expand All @@ -216,14 +215,14 @@ VB05N09 = V05N09
V06N34* VN 634

# Page 931
# CHECK FOR GYRO TORQUE COARSE ALIGNMENT
# CHECK FOR GRRO TORQUE COARSE ALIGNMENT

COARSTYP CAF OCT13
TC BANKCALL # DISPLAY V 50N25 WITH COARSE ALIGN OPTION
CADR GOPERF1
TCF GOTOPOOH # V34 -- TERMIN&OE
TCF REGCOARS # V33 -- NORMAL COARSE
TC INTPRET # V32 -- GYRO TORQUE COARSE
TCF GOTOPOOH # V34-TERMIN&OE
TCF REGCOARS # V33-NORMAL COARSE
TC INTPRET # V32-GYRO TORQUE COARSE
VLOAD MXV
XSMD # GET SM(DESIRED) WRT SM(PRESENT)
REFSMMAT
Expand Down Expand Up @@ -265,7 +264,7 @@ P52LS SET CLEAR # GET LANDING SITE ORIENTATION
STCALL XSMD
LSORIENT
GOTO
P52D # NOW GO COMPUTE GIMBAL ANGLES.
P52D # NOW GO COMPUTE GIMBAL ANGLES

# Page 933
# SUBROUTINE TO CALCULATE AND DISPLAY THE LUNAR LANDING SITE
Expand All @@ -290,9 +289,9 @@ N89DISP STQ
LSDISP CAF V06N89* # DISPLAY LAT,LONG/2,ALT
TC BANKCALL
CADR GOFLASH
TCF GOTOPOOH # V34 -- TERMINATE -- EXIT P57
TCF +2 # V33 -- PROCEED -- ACCEPT LS DATA
TCF LSDISP # V32 OR E -- LOOK AGAIN AND/OR LOAD NEW LS
TCF GOTOPOOH # V34-TERMINATE-EXIT P57
TCF +2 # V33-PROCEED- ACCEPT LS DATA
TCF LSDISP # V32 OR E- LOOK AGAIN AND/OR LOAD NEW LS

TC INTPRET
DLOAD SL1
Expand All @@ -310,57 +309,53 @@ LSDISP CAF V06N89* # DISPLAY LAT,LONG/2,ALT
V06N89* VN 689

# Page 934
# NAME -- S50 ALIAS LOCSAM
# NAME -S50 ALIAS LOCSAM
# BY
# VINCENT
#
# FUNCTION -- COMPUTE INPUTS FOR PICAPAR AND PLANET
# FUNCTION - COMPUTE INPUTS FOR PICAPAR AND PLANET
#
# DEFINE
#
# U = UNIT( SUN WRT EARTH )
# U = UNIT( SUN WRT EARTH)
# ES
#
# U = UNIT( MOON WRT EARTH )
# U =UNIT( MOON WRT EARTH)
# EM
#
# R = POSITION VECTOR OF LEM
# R =POSITION VECTOR OF LEM
# L
#
# R = MEAN DISTANCE (384402KM) BETWEEN EARTH AND MOON
# R =MEAN DISTANCE (384402KM) BETWEEN EARTH AND MOON
# EM
#
# P = RATIO R /(DISTANCE SUN TO EARTH) > .00257125
# EM
# P =RATIO R /(DISTANCE SUN TO EARTH) >.00257125
# EM
#
# R = EQUATORIAL RADIUS (6378.166KM) OF EARTH
# R =EQUATORIAL RADIUSS (6378.166KM) OF EARTH
# E
#
# LOCSAM COMPUTES IN EARTH INFLUENCE
#
# VSUN = U
# ES
# VSUN = U
# ES
#
# VEARTH = -UNIT( R )
# L
#
# VMOON = UNIT(R .U - R )
# EM EM L
# VMOON = UNIT(R .U - R )
# EM EM L
#
# CSUN = COS 90
# CSUN = COS 90
#
# CEARTH = COS(5 + ARCSIN(R /MAG(R )))
# E L
#
# CMOON = COS 5
# CMOON = COS 5
#
# INPUT -- TIME IN MPAC
#
# OUTPUT -- LISTED ABOVE
#
# SUBROUTINES -- LSPOS, LEMPREC
#
# DEBRIS -- VAC AREA, TSIGHT
# INPUT - TIME IN MPAC
# OUTPUT - LISTED ABOVE
# SUBROUTINES -LSPOS,LEMPREC
# DEBRIS - VAC AREA ,TSIGHT

# Page 935
COUNT* $$/LOSAM
Expand Down Expand Up @@ -2338,4 +2333,3 @@ LSORIENT STQ VLOAD
XSMD
STCALL YSMD
QMAJ