Post Reply 
(HP-67/97) Planetary Ephemeris
08-03-2023, 10:07 PM (This post was last modified: 08-04-2023 08:40 AM by Josef.)
Post: #5
RE: (HP-67/97) Planetary Ephemeris
I tested the program and found that it contains multiple bugs. Some of the errors are due to bad copy, and some are due to using incorrectly marked functions. The algorithm is quite simple and quite inaccurate. I also analyzed the program's data which contains the major planet semi-axis, orbital period and longitude of perihelion in the order of Earth, Mercury, Venus, Mars, Jupiter and Saturn. Subsequently, we can replace them with Uranus, Neptune and Pluto. I've modified the program, and at least it works reasonably. The printed version doesn't even calculate Century Day correctly, which is a prerequisite for correct calculations. There are reasonably good astronomy programs for HP 50g, and I have been able to modify some of them to work.

Here is a listing of the modified program for the HP-67.

Code:
001:  31 25 11     LBL A
002:     33 00     STO 0
003:  33 51 00     STO-0
004:     33 01     STO 1
005:     31 83       INT
006:  33 51 01     STO-1
007:        01         1
008:        51         -
009:        02         2
010:     32 71      XLEY
011:  33 51 00     STO-0
012:     32 71      XLEY
013:  35 51 02      SF 2
014:     35 53      R DN
015:        03         3
016:        00         0
017:        83         .
018:        05         5
019:        08         8
020:        71         x
021:     23 02     DSP 2
022:     31 24       RND
023:  33 61 00     STO+0
024:     34 01     RCL 1
025:        43       EEX
026:        02         2
027:        71         x
028:        41     ENTER
029:     31 83       INT
030:  33 61 00     STO+0
031:        51         -
032:        03         3
033:        06         6
034:        05         5
035:        02         2
036:        05         5
037:        71         x
038:        41     ENTER
039:     31 83       INT
040:  33 61 00     STO+0
041:        51         -
042:  35 71 02      F? 2
043:     22 00     GTO 0
044:     31 61      XNE0
045:     22 00     GTO 0
046:        01         1
047:  33 51 00     STO-0
048:  31 25 00     LBL 0
049:     34 00     RCL 0
050:     23 02     DSP 2
051:     35 22       RTN
052:  31 25 12     LBL B
053:        00         0
054:     33 01     STO 1
055:     33 02     STO 2
056:        04         4
057:  35 51 02      SF 2
058:     22 01     GTO 1
059:  31 25 14     LBL D
060:        01         1
061:        07         7
062:     22 01     GTO 1
063:  31 25 15     LBL E
064:        02         2
065:        02         2
066:     22 01     GTO 1
067:  32 25 11    LBL fa
068:        08         8
069:     22 01     GTO 1
070:  32 25 12    LBL fb
071:        01         1
072:        01         1
073:     22 01     GTO 1
074:  32 25 13    LBL fc
075:        01         1
076:        04         4
077:  31 25 01     LBL 1
078:     35 33      ST I
079:     34 00     RCL 0
080:     34 24   RCL (i)
081:     32 83      FRAC
082:        43       EEX
083:        05         5
084:        71         x
085:        51         -
086:     31 34       ISZ
087:     34 24   RCL (i)
088:  31 22 08     GSB 8
089:        41     ENTER
090:     31 34       ISZ
091:     34 24   RCL (i)
092:     31 83       INT
093:        51         -
094:        02         2
095:        81         /
096:     31 64       TAN
097:        01         1
098:     34 24   RCL (i)
099:     32 83      FRAC
100:     33 03     STO 3
101:        61         +
102:        01         1
103:     34 03     RCL 3
104:        51         -
105:        81         /
106:        71         x
107:     32 64     TAN-1
108:        02         2
109:        71         x
110:        41     ENTER
111:     31 63       COS
112:     34 03     RCL 3
113:        71         x
114:        01         1
115:        51         -
116:        01         1
117:     34 03     RCL 3
118:     32 54       x^2
119:        51         -
120:     35 52      X<>Y
121:        81         /
122:     35 52      X<>Y
123:     34 24   RCL (i)
124:     31 83       INT
125:        51         -
126:     35 52      X<>Y
127:     31 33       DSZ
128:     31 33       DSZ
129:     34 24   RCL (i)
130:     31 83       INT
131:        43       EEX
132:        04         4
133:        81         /
134:        71         x
135:     31 72       R<P
136:  35 71 02      F? 2
137:     22 02     GTO 2
138:     33 01     STO 1
139:     35 52      X<>Y
140:     33 02     STO 2
141:        04         4
142:  35 51 02      SF 2
143:     22 01     GTO 1
144:  31 25 02     LBL 2
145:  33 51 01     STO-1
146:     35 52      X<>Y
147:  33 51 02     STO-2
148:     34 02     RCL 2
149:     34 01     RCL 1
150:     32 72       R>P
151:     35 52      X<>Y
152:     31 71      XLT0
153:  31 22 07     GSB 7
154:        41     ENTER
155:     33 03     STO 3
156:        02         2
157:        71         x
158:     31 62       SIN
159:        02         2
160:        83         .
161:        04         4
162:        71         x
163:        51         -
164:  35 71 00      F? 0
165:  31 22 09     GSB 9
166:     32 74    H>H.MS
167:        84       R/S
168:     34 03     RCL 3
169:     31 62       SIN
170:        02         2
171:        03         3
172:        83         .
173:        05         5
174:        71         x
175:     32 74    H>H.MS
176:        84       R/S
177:     35 54      R UP
178:     35 22       RTN
179:  31 25 07     LBL 7
180:        03         3
181:        06         6
182:        00         0
183:        61         +
184:     35 22       RTN
185:  31 25 08     LBL 8
186:        81         /
187:     32 83      FRAC
188:        03         3
189:        06         6
190:        00         0
191:        71         x
192:     35 22       RTN
193:  31 25 13     LBL C
194:     34 00     RCL 0
195:        02         2
196:        00         0
197:        83         .
198:        06         6
199:        61         +
200:     34 07     RCL 7
201:  31 22 08     GSB 8
202:  35 71 00      F? 0
203:  31 22 09     GSB 9
204:     32 74    H>H.MS
205:     35 22       RTN
206:  31 25 09     LBL 9
207:        01         1
208:        05         5
209:        81         /
210:     35 22       RTN
211:  32 25 15    LBL fe
212:        00         0
213:  35 71 00      F? 0
214:     22 00     GTO 0
215:  35 51 00      SF 0
216:  31 22 07     GSB 7
217:     22 09     GTO 9
218:  31 25 00     LBL 0
219:  35 61 00      CF 0
220:     22 07     GTO 7
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
RE: (HP-67/97) Planetary Ephemeris - Josef - 08-03-2023 10:07 PM
RE: (HP-67/97) Planetary Ephemeris - Josef - 08-07-2023, 10:24 AM
RE: (HP-67/97) Planetary Ephemeris - Josef - 09-01-2023, 01:02 PM



User(s) browsing this thread: 1 Guest(s)