Planets in Perihelion & Aphelion for the HP-41
Overview
-From a given date, the following program calculates the time of passage
of one of the 9 major planets through perihelion or aphelion.
Program Listing
Data Registers: R00-R01-R02: temp (
R01 = k , k mod 2 = 0 for the perihelions , k mod 2 = 1 for the aphelions
)
Flags: /
Subroutines: "J0" & "DT" ( cf "Julian
& Gregorian Calendars for the HP-41" )
-Lines 17-34-50-67-83-99 are synthetic three-byte
GTO 14
01 LBL "PRAPH"
02 STO 00 03 X<>Y 04 XEQ "J0" 05 GTO IND 00 06 LBL 01 07 44 08 - 09 43.98467482 10 STO 02 11 / 12 INT 13 STO 01 14 RCL 02 15 * 16 45.757 17 GTO 14 18 LBL 02 19 193 20 - 21 112.3504094 22 STO 02 23 / 24 INT 25 ENTER^ 26 STO 01 27 122 E6 28 / 29 CHS 30 RCL 02 31 + 32 * 33 193.733 34 GTO 14 |
35 LBL 03
36 4 37 - 38 182.6298179 39 STO 02 40 / 41 INT 42 ENTER^ 43 STO 01 44 256 E6 45 / 46 RCL 02 47 + 48 * 49 3.007 50 GTO 14 51 LBL 04 52 650 53 - 54 343.4978929 55 STO 02 56 / 57 INT 58 ENTER^ 59 STO 01 60 337 E5 61 / 62 CHS 63 RCL 02 64 + 65 * 66 650.526 67 GTO 14 68 LBL 05 |
69 4091
70 - 71 2166.493533 72 STO 02 73 / 74 INT 75 ENTER^ 76 STO 01 77 29261 78 / 79 RCL 02 80 + 81 * 82 4092.436 83 GTO 14 84 LBL 06 85 1286 86 - 87 5382.10838 88 STO 02 89 / 90 INT 91 ENTER^ 92 STO 01 93 4837 94 / 95 RCL 02 96 + 97 * 98 1285.62 99 GTO 14 100 LBL 07 101 18664 102 - |
103 15347.4384
104 STO 02 105 / 106 INT 107 ENTER^ 108 STO 01 109 739 110 / 111 CHS 112 RCL 02 113 + 114 * 115 18669 116 GTO 14 117 LBL 08 118 17349 119 - 120 30095.165 121 STO 02 122 / 123 INT 124 ENTER^ 125 STO 01 126 117 127 / 128 RCL 02 129 + 130 * 131 17350.6 132 GTO 14 133 LBL 09 134 3664 135 + 136 45285.795 |
137 STO 02
138 / 139 INT 140 ENTER^ 141 ENTER^ 142 STO 01 143 18.4 144 / 145 4.053 146 + 147 * 148 RCL 02 149 + 150 * 151 3664.229 152 CHS 153 LBL 14 154 + 155 INT 156 LASTX 157 FRC 158 X<0? 159 DSE Y 160 "" 161 24 162 ST* Y 163 MOD 164 HMS 165 X<>Y 166 XEQ "DT" 167 RCL 01 168 2 169 MOD 170 END |
( 391 bytes / SIZE 003 )
STACK | INPUTS | OUTPUTS |
Z | / | HH.MNSS |
Y | approx date | YYYY.MNDD |
X | planet | 0 or 1 |
Planet = 1 for Mercury , ................ , planet = 9 for Pluto.
X-output: 0 = perihelion , 1 = aphelion
Example:
2400.0101 ENTER^
9
XEQ "PRAPH" >>>>
1
---Execution time = 7s---
RDN 2362.0114
RDN 2.2435
-So, a time of passage of Pluto through aphelion is 2362 January 14th ( the hour minutes seconds are not guaranteed at all )
Notes:
-The formulas are based on unperturbed elliptic orbits.
-So, the errors can reach a few hours for Mars, 15 days for Jupiter,
more than one month for Saturn
and even more for Uranus and Neptune...
-With X-input = 3 , the results actually concern the Earth-Moon barycenter.
-If you want a better accuracy for the Earth, add the following instructions
after line 48 ( just before 3.007 )
49 66.394292
50 RCL 01 51 * 52 31.59 53 - 54 SIN 55 RCL 01 56 2 57 MOD 58 STO 03 59 2.63 60 * 61 CHS 62 1.278 |
63 +
64 * 65 + 66 282.451576 67 RCL 01 68 * 69 43.87 70 - 71 SIN 72 .116 73 RCL 03 74 * 75 .055 76 - |
77 *
78 + 79 225.190369 80 RCL 01 81 * 82 13.8 83 - 84 SIN 85 .153 86 RCL 03 87 * 88 .091 89 - 90 * |
91 +
92 329.653368 93 RCL 01 94 * 95 STO 00 96 136.95 97 + 98 SIN 99 .085 100 RCL 03 101 * 102 .056 103 - 104 * |
105 +
106 RCL 00 107 2 108 / 109 249.52 110 + 111 SIN 112 .076 113 RCL 03 114 * 115 .045 116 - 117 * 118 + |
-Without these instructions, one gets:
2400.0101 ENTER^
3
XEQ "PRAPH" >>>>
1
RDN 2399.0712
RDN 5.3658
-After the modifications, it yields:
2400.0101 ENTER^
3
XEQ "PRAPH" >>>>
1
RDN 2399.0710
RDN 18.3215
-On the other hand, several decimals may be deleted to save room for
epochs that are not too far from J2000.
References:
[1] Jean Meeus - "Astronomical Algorithms" - Willmann-Bell
- ISBN 0-943396-61-1
[2] Jean Meeus - "Mathematical Astronomy Morsels" - Willmann-Bell
- ISBN 0-943396-51-4