(HP-67/97) Planetary Ephemeris
|
09-13-2015, 11:10 AM
Post: #1
|
|||
|
|||
(HP-67/97) Planetary Ephemeris | |||
09-20-2015, 08:53 PM
(This post was last modified: 09-20-2015 08:58 PM by Dieter.)
Post: #2
|
|||
|
|||
RE: (HP-67/97) Planetary Ephemeris
(09-13-2015 11:10 AM)Thomas Klemm Wrote: From Programming Handheld Calculators by Paul Lutus. Could you take a look at line 101? The code there is... Code: 97 1 This calculates (1–R3)/(1–R3) which is always 1. ;-) I think line 101 should read "+". I also assume that "lbl A", "lbl B", "lbl C" and "lbl D" in the user instructions (table 3) are supposed to mean simply "A", "B", "C" and "D". Typing a label instruction in run mode does not do anything. ;-) Finally there are some "TF" commands. This was a HP65 instruction. On the HP67/97 testing flags is done with the "F?" command. I hope the program considers the 67/97's special behaviour of Flag 2 tests. ;-) Dieter |
|||
09-20-2015, 09:47 PM
Post: #3
|
|||
|
|||
RE: (HP-67/97) Planetary Ephemeris
(09-20-2015 08:53 PM)Dieter Wrote: Could you take a look at line 101? The code there is... It appears that these lines calculate \(\frac{1+e}{1-e}\) of the formula in the mentioned article. Quote:I also assume that "lbl A", "lbl B", "lbl C" and "lbl D" in the user instructions (table 3) are supposed to mean simply "A", "B", "C" and "D". I haven't tested this program. But Paul Lutus mentioned that there were errors both in the listing and the data: Quote:As with the solar position program, the article's publication created a lot of correspondence, including inquiries from JPL and its consultants asking about mathematical details and correcting some errors in the original published data tables (example). It would be cool if we could make this program run correctly. Cheers Thomas |
|||
09-20-2015, 10:00 PM
Post: #4
|
|||
|
|||
RE: (HP-67/97) Planetary Ephemeris
(09-20-2015 09:47 PM)Thomas Klemm Wrote: It appears that these lines calculate \(\frac{1+e}{1-e}\) of the formula in the mentioned article. Yes, that's why I think there must be a "+" instead of a "–" in line 101. (09-20-2015 09:47 PM)Thomas Klemm Wrote: I haven't tested this program. But Paul Lutus mentioned that there were errors both in the listing and the data: This should be no problem with a simple image editor. ;-) Or maybe a HP97 user provides a (corrected) printed listing. I do not know anything about astronomy, so maybe someone who is more into this could check the program as well as its data set, and post some results it returns. Or those it should return. ;-) Dieter |
|||
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 |
|||
08-06-2023, 01:06 PM
Post: #6
|
|||
|
|||
RE: (HP-67/97) Planetary Ephemeris
That's great!
From what I can see you additionally changed the following lines: Code: 021: 23 02 DSP 2 I took your program, added the data in the registers and pasted it in this HP-67 emulator: Code: PROG Example I just followed the example in table 3: 10.1277 A 28409.22 B 22.37 C 13.26 D 6.45 R/S 23.06 R/S 4.72 This looks quite good already. But the result for the Sun is totally off. In a comment it says that "10.1277 is the date of a solar eclipse". Therefore I assume that the Sun's and Moon's position should agree. Do you have any idea what's going wrong? |
|||
08-07-2023, 10:24 AM
Post: #7
|
|||
|
|||
RE: (HP-67/97) Planetary Ephemeris
Yes, you have a right. I am now preparing a much better version of the calculation of the Sun's position that is significantly more accurate. Unfortunately, fitting the positions of the planets and Sun into one program in 224 steps with reasonable accuracy is impossible. The author did not give the exact algorithm for calculating the positions, it could be reverse decoded, but it is better to write the program again and better.
|
|||
09-01-2023, 01:02 PM
Post: #8
|
|||
|
|||
RE: (HP-67/97) Planetary Ephemeris
I also tested the calculations for Mercury and Venus, they are completely off, they just don't work. I have prepared new calculations of planetary positions according to other algorithms and allow calculations for years higher than 1999, which the above program does not allow.
|
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 2 Guest(s)