Proof LUNAR_AND_SOLAR_EPHEMERIDES_SUBROUTINES #605 (#713)

Co-authored-by: James Harris <wopian@wopian.me>
This commit is contained in:
rnd-debug 2020-10-13 20:41:18 +02:00 committed by GitHub
parent ce43358d57
commit 0d6c2b10cc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -25,104 +25,91 @@
# 16:27 JULY 14, 1969
# Page 984
# NAME -- LSPOS -- LOCATE SUN AND MOON DATE -- 25 OCT 67
# MOD NO. 1
# NAME - LSPOS - LOCATE SUN AND MOON DATE - 25 OCT 67
# MOD NO.1
# MOD BY NEVILLE ASSEMBLY SUNDANCE
#
# FUNCTIONAL DESCRIPTION
#
# COMPUTES UNIT POSITION VECTOR OF THE SUN AND MOON IN THE BASIC REFERENCE SYSTEM. THE SUN VECTOR S IS
# LOCATED VIA TWO ANGLES. THE FIRST ANGLE (OBLIQUITY) IS THE ANGLE BETWEEN THE EARTH EQUATOR AND THE ECLIPTIC. THE
# POSITION VECTOR OF THE SUN IS
# _
# S = (COS(LOS), COS(OBL)*SIN(LOS), SIN(OBL)*SIN(LOS)), WHERE
# COMPUTES UNIT POSITION VECTOR OF THE SUN AND MOON IN THE BASIC REFERENCE SYSTEM. THE SUN VECTOR S IS
# LOCATED VIA TWO ANGLES. THE FIRST ANGLE(OBLIQUITY) IS THE ANGLE BETWEEN THE EARTH EQUATOR AND THE ECLIPTIC. THE
# SECOND ANGLE IS THE LONGITUDE OF THE SUN MEASURED IN THE ECLIPTIC.
# THE POSITION VECTOR OF THE SUN IS
# -
# S=(COS(LOS), COS(OBL)*SIN(LOS), SIN(OBL)*SIN(LOS)), WHERE
#
# LOS = LOS +LOS *T-(C *SIN(2PI*T)/365.24 +C *COS(2PI*T)/365.24)
# 0 R 0 1
# LOS (RAD) IS THE LONGITUDE OF THE SUN FOR MIGNIGHT JUNE 30TH OF THE PARTICULAR YEAR.
# 0
# LOS (RAD/DAY) IS THE MEAN RATE FOR THE PARTICULAR YEAR.
# R
#
# LOS AND LOS ARE STORED AS LOSC AND LOSR IN RATESP.
# LOS=LOS +LOS *T-(C *SIN(2PI*T)/365.24 +C *COS(2PI*T)/365.24)
# 0 R 0 1
# LOS (RAD) IS THE LONGITUDE OF THE SUN FOR MIGNIGHT JUNE 30TH OF THE PARTICULAR YEAR.
# 0
# LOS (RAD/DAY) IS THE MEAN RATE FOR THE PARTICULAR YEAR.
# R
# LOS AND LOS ARE STORED AS LOSO AND LOSR IN RATESP.
# 0 R
# COS(OBL) AND SIN(OBL) ARE STORED IN THE MATRIX KONMAT.
#
# T, TIME MEASURED IN DAYS (24 HOURS) IS STORED IN TIMEP.
#
# C AND C ARE FUDGE FACTORS TO MINIMIZE THE DEVIATION. THEY ARE STORED AS ONE CONSTANT (CMOD), SINCE
# T, TIME MEASURED IN DAYS(24 HOURS), IS STORED IN TIMEP.
# C AND C ARE FUDGE FACTORS TO MINIMIZE THE DEVIATION. THEY ARE STORED AS ONE CONSTANT(CMOD), SINCE
# 0 1 2 2 1/2
# C *SIN(X)+C *COS(X) CAN BE WRITTEN AS (C +C ) *SIN(X+PHI), WHERE PHI=ARCTAN(C /C ).
# 0 1 1 0
# 0 1 0 1 1 0
#
# THE MOON IS LOCATED VIA FOUR ANGLES, THE FIRST IS THE OBLIQUITY. THE SECOND IS THE MEAN LONGITUDE OF THE MOON,
# THE MOON IS LOCATED VIA FOUR ANGLES. THE FIRST IS THE OBLIQUITY. THE SECOND IS THE MEAN LONGITUDE OF THE MOON,
# MEASURED IN THE ECLIPTIC FROM THE MEAN EQUINOX TO THE MEAN ASCENDING NODE OF THE LUNAR ORBIT, AND THEN ALONG THE
# ORBIT. THE THIRD ANGLE IS THE ANGLE BETWEEN THE ECLIPTIC AND THE LUNAR ORBIT. THE FOURTH ANGLE IS THE LONGITUDE
# OF THE NODE OF THE MOON, MEASURED IN THE LUNAR ORBIT. LET THESE ANGLES BE OBL,LOM,IM, AND LON RESPECTIVELY.
# ORBIT. THE THIRD ANGLE IS THE ANGLE BETWEEN THE ECLIPTIC AND THE LUNAR ORBIT. THE FOURTH ANGLE IS THE LONGITUDE
# OF THE NODE OF THE MOON, MEASURED IN THE LUNAR ORBIT. LET THESE ANGLES BE OBL,LOM,IM, AND LON RESPECTIVELY.
#
# THE SIMPLIFIED POSITION VECTOR OF THE MOON IS
# _
# M=(COS(LOM), COS(OBL)*SIN(LOM)-SIN(OBL)*SIN(IM)*SIN(LOM-LON), SIN(OBL)*SIN(LOM)+COS(OBL)*SIN(IM)*SIN(LOM-LON))
# -
# M=(COS(LOM), COS(OBL)*SIN(LOM)-SIN(OBL)*SIN(IM)*SIN(LOM-LON), SIN(OBL)*SIN(LOM)+COS(OBL)*SIN(IM)*SIN(LOM-LON))
#
# WHERE
# LOM=LOM +LOM *T-(A *SIN(2PI*T/27.5545)+A *COS(2PI*T/27.5545)+B *SIN(2PI*T/32)+B *COS(2PI*T/32)), AND
# 0 R 0 1 0 1
# LON=LON +LON
# 0 R
# A , A , B AND B ARE STORE AS AMOD AND BMOD (SEE DESCRIPTION OF CMOD, ABOVE). COS(OBL), SIN(OBL)*SIN(IM),
# WHERE
# LOM=LOM +LOM *T-(A *SIN(2PI*T/27.5545)+A *COS(2PI*T/27.5545)+B *SIN(2PI*T/32)+B *COS(2PI*T/32)), AND
# 0 R 0 1 0 1
# LON=LON +LON
# 0 R
# A , A , B AND B ARE STORED AS AMOD AND BMOD (SEE DESCRIPTION OF CMOD, ABOVE). COS(OBL), SIN(OBL)*SIN(IM),
# 0 1 0 1
# SIN(OBL), AND COS(OBL)*SIN(IM) ARE STORED IN KONMAT AS K1, K2, K3, AND K4, RESPECTIVELY. LOM , LOM , LON , LON
# 0 R 0 R
# ARE STORED AS LOM0, LOMR, LON0, AND LONR IN RATESP.
#
# SIN(OBL), AND COS(OBL)*SIN(IM) ARE STORED IN KONMAT AS K1, K2, K3 AND K4, RESPECTIVELY. LOM , LOM , LON , LON
# ARE STORED AS LOMO, LOMR, LONO, AND LONR IN RATESP. 0 R 0 R
# THE THREE PHIS ARE STORED AS AARG, BARG, AND CARG(SUN). ALL CONSTANTS ARE UPDATED BY YEAR.
#
# CALLING SEQUENCE
# Page 985
# CALL LSPOS. RETURN IS VIA CPRET.
#
# CALL LSPOS. RETURN IS VIA QPRET.
# ALARMS OR ABORTS
# NONE
#
# NONE
# ERASABLE INITIALIZATION REQUIRED
# TEPHEM -- TIME FROM MIGNIGHT 1 JULY PRECEDING THE LAUNCH TO THE TIME OF THE LAUNCH (WHEN THE AGC CLOCK WENT
# TO ZERO). TEPHEM IS TP WITH UNITS OF CENTI-SECONDS.
#
# TIME2 AND TIME1 ARE IN MPAC AND MPAC +1 WHEN PROGRAM IS CALLED.
#
# TEPHEM - TIME FROM MIGNIGHT 1 JULY PRECEDING THE LAUNCH TO THE TIME OF THE LAUNCH (WHEN THE AGC CLOCK WENT
# TO ZERO). TEPHEM IS TP WITH UNITS OF CENTI-SECONDS.
# TIME2 AND TIME1 ARE IN MPAC AND MPAC +1 WHEN PROGRAM IS CALLED.
# OUTPUT
# UNIT POSITIONAL VECTOR OF SUN IN VSUN. (SCALED B-1)
# UNIT POSITIONAL VECTOR OF MOON IN VMOON. (SCALED B-1)
#
# UNIT POSITIONAL VECTOR OF SUN IN VSUN. (SCALED B-1)
# UNIT POSITIONAL VECTOR OF MOON IN VMOON. (SCALED B-1)
# SUBROUTINES USED
# NONE
#
# NONE
# DEBRIS
# CURRENT CORE SET, WORK AREA AND FREEFLAG
# CURRENT CORE SET,WORK AREA AND FREEFLAG
BANK 04
SETLOC EPHEM
BANK
EBANK= VSUN
COUNT* $$/EPHEM
LUNPOS EQUALS LSPOS
LSPOS SETPD SR
0
14D # TP
TAD DDV
# HG comments in [...] are hand written comments in original listing
TEPHEM # TIME OF LAUNCH [IN CENTISEC B 42]
CSTODAY # 24 HOURS -- 8640000 CENTI-SECS/DAY B-33
STORE TIMEP # T IN DAYS [@ B 9 = 512 DAYS]
AXT,1 AXT,2 # [GRANULRITY = 0.164 SEC]
## Comments in [...] are hand-written notations in original listing
TEPHEM # TIME OF LAUNCH [in centisec B 42]
CSTODAY # 24 HOURS-8640000 CENTI-SECS/DAY B-33
STORE TIMEP # T IN DAYS [@ B 9 = 512 days]
AXT,1 AXT,2 # [∴ granularity ≈ 0.164 sec]
0
0
CLEAR
FREEFLAG # SWITCH BIT
POSITA DLOAD
KONMAT +2 # ZEROS
KONMAT +2 # ZERO$
STORE GTMP
POSITB DLOAD DMP*
TIMEP # T
@ -132,11 +119,11 @@ POSITB DLOAD DMP*
8D
VAL67 +2,1 # AARG
SIN DMP* # SIN(T/27+PHI) OR T/32 OR T/365
VAL67,1 # (A0**2+A1**2)**1/2 SIN(X+PHIA)
VAL67,1 # (A0**2+A1**2)**1/2SIN(X+PHIA)
DAD INCR,1 # PLUS
GTMP # (B0**2+B1**2)**1/2 SIN(X+PHIB)
GTMP # (B0**2+B1**2)**1/2SIN(X+PHIB)
DEC -6
STORE GTMP # OR (C0**2+C1**2)**1/2 SIN(X+PHIC)
STORE GTMP # OR (C0**2+C1**2)**1/2SIN(X+PHIC)
BOFSET
FREEFLAG
POSITB
@ -145,7 +132,7 @@ POSITD DLOAD DMP*
RATESP,2 # LOMR,LOSR,LONR
SL DAD*
5D
RATESP +6,2 # LOM0,LOS0,LON0
RATESP +6,2 # LOMO,LOSO,LONO
DSU
GTMP
STORE STMP,2 # LOM,LOS,LON
@ -184,7 +171,7 @@ POSITE DLOAD
STORE GTMP
GOTO
POSITD
LUNVEL RVQ
LUNVEL RVQ # TO FOOL INTEGRATION
SETLOC EPHEM1
BANK