hp41programs

Astronomical Ephemeris 4 Astronomical Ephemeris (IV) for the HP41
 

Overview
 

1°)  JPL Approximate Ephemeris  [ -3000 , +3000 ]
2°)  Another Approximate Ephemeris  [ 1900 , 2100 ]

    a)  Azimuths & Heights
    b)  Heliocentric & Geocentric Coordinates

    c)  Heliocentric Coordinates only

3°)  2 More Complete Programs but even less accurate  [ 1900 , 2100 ]
4°)  Simple Programs
  [ 1900 , 2100 ]

    a) Program#1 ( 2193 bytes )
    b) Program#2 ( 2028 bytes )
    c) Program#3 ( 1803 bytes )

    d) Program#4 ( 1622 bytes )


Latest Update:   Paragraph 4°)a) & 4°)b)

-The program listed in paragraph 1°) calculates the geocentric and heliocentric longitudes and latitudes of the Sun and the major planets, including Pluto.
-They are referred to the standard equinox J2000.
-The data are given by the JPL in reference [1] and the results are valid between  3000 BC and AD 3000
-Low accuracy is to be expected for Saturn & Uranus and relatively good accuracy for the Sun, Mercury, Venus and Mars.

-In paragraph 2°) the coordinates are referred to the mean ecliptic & equinox of the date.
-The position of Pluto is not computed but the Moon's coordinates are given.
-The precision is better than in paragraph 1°) but the accuracy is not excellent however !
 
 

1°)  JPL Approximate Ephemeris  [ -3000 , +3000 ]
 

Data Registers
 

-Registers R00 thru R15 are used.

 R00 = T = time since 2000/01/01 0h TT is to be initialized before executing this program   -5 < T < 1     ( Unit = 1000 years = 365250 days )
 R01, R02, R03 contain the Sun's rectangular ecliptic coordinates. Execute "SUN"  first.
 R04 = geocentric longitude in decimal degrees
 R05 = geocentric latitude    ------------------
 R06 = distance to the Earth in Astronomical Units
 R07 = heliocentric longitude in decimal degrees
 R08 = heliocentric latitude   -------------------
 R09 = radius vector in Astronomical Units

 R10 = semi-major axis
 R11 = eccentricity
 R12 = inclination over the ecliptic J2000
 R13 = mean longitude
 R14 = longitude of the perihelion
 R15 = longitude of the ascending node
 

 >>>> The HP-41 must be set in DEG mode.
 

  LBL 01 = Mercury
  LBL 02 = Venus
  LBL 04 = Mars
  LBL 05 = Jupiter
  LBL 06 = Saturn
  LBL 07 = Uranus
  LBL 08 = Neptune
  LBL 09 = Pluto
 
 

  01  LBL "SUN"
  02  CLX
  03  STO 01
  04  STO 02
  05  STO 03
  06  SIGN
  07  STO 10
  08  1673
  09  RCL 00
  10  37
  11  *
  12  -
  13  STO 11
  14  1
  15  RCL 00
  16  134
  17  *
  18  +
  19  STO 12
  20  359993731
  21  RCL 00
  22  *
  23  80026
  24  -
  25  STO 13
  26  3180
  27  RCL 00
  28  *
  29  77070
  30  -
  31  STO 14
  32  174887
  33  RCL 00
  34  2412
  35  *
  36  -
  37  XEQ 14
  38  RCL 06
  39  XEQ 12
  40  STO 01
  41  RDN
  42  STO 02
  43  X<>Y
  44  STO 03
  45  RCL 06
  46  RCL 05
  47  RCL 04
  48  RTN
  49  LBL 01
  50  .3781
  51  STO 10
  52  20564
  53  RCL 00
  54  21
  55  *
  56  +
  57  STO 11
  58  7006
  59  RCL 00
  60  59
  61  *
  62  -
  63  STO 12
  64  RCL 00
  65  1494726749
  66  *
  67  250206
  68  +
  69  STO 13
  70  RCL 00
  71  1594
  72  *
  73  77458
  74  +
  75  STO 14
  76  48340
  77  RCL 00
  78  1221
  79  *
  80  -
  81  XEQ 14
  82  RTN
  83  LBL 02
  84  .7233
  85  STO 10        
  86  676
  87  RCL 00
  88  51
  89  *
  90  -
  91  STO 11
  92  3398
  93  RCL 00
  94  4
  95  *
  96  +
  97  STO 12
  98  RCL 00
  99  585178156 
100  *
101  181179
102  +
103  STO 13
104  131768
105  RCL 00
106  568
107  *
108  +
109  STO 14
110  76673
111  RCL 00
112  2727
113  *
114  -
115  XEQ 14
116  RTN
117  LBL 04
118  1.5237
119  STO 10
120  9337
121  RCL 00
122  92
123  *
124  +
125  STO 11
126  1852
127  RCL 00
128  73
129  *
130  -
131  STO 12
132  RCL 00
133  191402993
134  *
135  4830
136  -
137  STO 13
138  RCL 00
139  4522
140  *
141  23917
142  -
143  STO 14
144  49713
145  RCL 00
146  2685
147  *
148  -
149  XEQ 14
150  RTN
151  LBL 05
152  5.202
153  STO 10
154  4854
155  RCL 00
156  180
157  *
158  +
159  STO 11
160  1299
161  RCL 00
162  32
163  *
164  -
165  STO 12 
166  30349037
167  RCL 00       
168  12
169  *
170  -
171  RCL 00
172  *
173  34293
174  +
175  RCL 00 
176  383.5
177  *
178  356
179  P-R
180  6
181  /
182  -
183  -
184  STO 13
185  14275
186  RCL 00
187  1820
188  *
189  +
190  STO 14
191  100293
192  RCL 00
193  1303
194  *
195  +
196  XEQ 14
197  RTN
198  LBL 06
199  9.541
200  STO 10
201  5551
202  RCL 00
203  320
204  *
205  -
206  STO 11
207  2494
208  RCL 00
209  45
210  *
211  +
212  STO 12
213  12221149
214  RCL 00
215  26
216  *
217  +
218  RCL 00
219  *
220  50059
221  +
222  RCL 00
223  383.5
224  *
225  873
226  P-R
227  6.5
228  /
229  -
230  +
231  STO 13
232  92861
233  RCL 00
234  5418
235  *
236  +
237  STO 14
238  113640
239  RCL 00
240  2502
241  *
242  -
243  XEQ 14
244  RTN
245  LBL 07
246  19.188
247  RCL 00       
248  500
249  /
250  -
251  STO 10
252  4686
253  RCL 00
254  16
255  *
256  -
257  STO 11
258  773
259  RCL 00 
260  18
261  *
262  -
263  STO 12
264  4284951
265  RCL 00
266  58
267  *
268  +
269  RCL 00
270  *
271  45803
272  -
273  RCL 00
274  76.7
275  *
276  177
277  P-R
278  5.52
279  *
280  -
281  +
282  STO 13
283  172434
284  RCL 00
285  927
286  *
287  +
288  STO 14
289  73963
290  RCL 00
291  574
292  *
293  +
294  XEQ 14
295  RTN
296  LBL 08
297  30.07
298  STO 10
299  895
300  RCL 00
301  8
302  *
303  +
304  STO 11
305  1770
306  RCL 00
307  ST+ X
308  +
309  STO 12
310  2184652
311  RCL 00
312  41
313  *
314  -
315  RCL 00
316  *
317  55780
318  -
319  RCL 00
320  76.7
321  *
322  102
323  P-R
324  6.7
325  *
326  -
327  -
328  STO 13       
329  46682
330  RCL 00
331  101
332  *
333  +
334  STO 14
335  131786
336  RCL 00 
337  61
338  *
339  -
340  XEQ 14 
341  RTN
342  LBL 09
343  39.487
344  RCL 00
345  22
346  /
347  +
348  STO 10
349  24885
350  RCL 00
351  60
352  *
353  +
354  STO 11
355  17141
356  STO 12
357  1451804
358  RCL 00
359  1263
360  *
361  -
362  RCL 00
363  *
364  238963
365  +
366  STO 13
367  224097
368  RCL 00
369  97
370  *
371  -
372  STO 14
373  110302
374  RCL 00
375  81
376  *
377  -
378  GTO 14
379  LBL 12
380  X<>Y
381  RDN
382  P-R
383  R^
384  X<>Y
385  P-R
386  RTN
387  LBL 13
388  R-P
389  X<>Y
390  RDN
391  R-P
392  R^
393  X<>Y
394  RTN
395  LBL 14
396   E3
397  ST/ 12
398  ST/ 13
399  ST/ 14
400  /
401  STO 15
402   E5
403  ST/ 11
404  9
405  STO 09
406  RCL 13
407  RCL 14        
408  -
409  360
410  MOD
411  ENTER^
412  ENTER^
413  LBL 11
414  SIN
415  RCL 11 
416  R-D
417  *
418  +
419  DSE 09 
420  GTO 11
421  2
422  /
423  1
424  RCL 11
425  +
426  1
427  LASTX
428  -
429  /
430  SQRT
431  P-R
432  LASTX
433  /
434  R-P
435  RDN
436  ST+ X
437  1
438  R^
439  ST+ X
440  COS
441  RCL 11
442  *
443  -
444  RCL 10
445  *
446  STO 09
447  CLX
448  RCL 15
449  -
450  RCL 14
451  +
452  COS
453  RCL 12
454  LASTX
455  SIN
456  P-R
457  X<>Y
458  ASIN
459  STO 08
460  X<> Z
461  R-P
462  CLX
463  RCL 15
464  +
465  STO 07
466  RCL 09
467  XEQ 12
468  RCL 03
469  ST+ T
470  CLX
471  RCL 02
472  ST+ Z
473  CLX
474  RCL 01
475  +
476  XEQ 13
477  STO 06
478  X<> Z
479  STO 05
480  X<>Y
481  STO 04
482  END

 
    ( 899 bytes / SIZE 016 )
 
 

   STACK    INPUTS                 OUTPUTS
        Z         /      distance to the earth ( AU )
        Y         /       geocentric latitude ( deg )
        X         /      geocentric longitude ( deg )

 
Example:       T = -3   STO 00    i-e    -1001.1209   Gregorian =  -1001.1219  Julian      (  year -1001 =  1002 BC )
 

   •   XEQ "SUN"    >>>>    Long = -60°324              =  R04                     R01 = X =  0.487138
                               RDN      Lat  =  -0°356               =  R05         and       R02 = Y = -0.854871
                               RDN     Dist  =  0.983943 AU     =  R06                     R03 = Z =  -0.006105

   •   Mercury    R/S  or   XEQ 01   >>>>    Long = -78°210              =  R04                     R07 = -122°772
                                                       RDN      Lat  =  -0°516               =  R05         and       R08 = -0°658
                                                       RDN     Dist  =  1.265888 AU     =  R06                     R09 =  0.462176 AU

   •     Venus     R/S  or   XEQ 02   >>>>    Long = -32°829              =  R04                      R07 =  5°941
                                                       RDN      Lat  =  -1°920               =  R05         and       R08 = -3°323
                                                       RDN     Dist  =  1.4392 AU         =  R06                     R09 =  0.7266 AU

   •     Mars      R/S  or   XEQ 04   >>>>     Long = -29°972              =  R04                      R07 = -9°152
                                                       RDN      Lat  =  -1°398               =  R05         and       R08 = -1°905
                                                       RDN     Dist  =  2.157 AU           =  R06                     R09 =  1.400 AU

   •    Jupiter     R/S  or   XEQ 05   >>>>     Long =  62°420              =  R04                      R07 =  71°774
                                                       RDN      Lat  =  -0°736               =  R05         and       R08 = -0°581
                                                       RDN     Dist  =  4.493 AU          =  R06                      R09 =  5.092 AU

   •   Saturn      R/S  or   XEQ 06   >>>>    Long = 108°735              =  R04                      R07 =  109°922
                                                       RDN      Lat  =  -0°558              =  R05         and       R08 = -0°459
                                                       RDN     Dist  =  8.042 AU          =  R06                     R09 =  9.010 AU

   •  Uranus     R/S  or   XEQ 07     >>>>    Long =  52°952              =  R04                      R07 =  55°605
                                                       RDN      Lat  =  -0°260               =  R05         and       R08 = -0°237
                                                       RDN     Dist  =  19.118 AU         =  R06                     R09 =  19.528 AU

   •  Neptune   R/S  or   XEQ 08     >>>>    Long = -128°938            =  R04                      R07 =  229°330
                                                       RDN      Lat  =  1°718                 =  R05         and       R08 =  1°749
                                                       RDN     Dist  =  30.676 AU         =  R06                     R09 =  30.332 AU

   •   Pluto      R/S  or   XEQ 09     >>>>    Long = 172°634              =  R04                      R07 =  171°182
                                                       RDN      Lat  = 15°319               =  R05         and       R08 =  15°045
                                                       RDN     Dist  =  31.498 AU        =  R06                     R09 =  32.081 AU
 
 

2°)  Another Approximate Ephemeris  [ 1900 , 2100 ]
 

     a)  Azimuths & Heights


Data Registers:              R00 = t = time in century since 2000/01/01 0h TT              ( Registers R16-R17-R18 are to be initialized before executing "EPH" )

                                         R01 = XSun       R03 = geocentric longitude   ( deg )        R06 = heliocentric longitude  ( deg )     R09 = right-ascension ( deg )     R11 = Azimuth ( deg )
                                         R02 = YSun       R04 = geocentric latitude      ( deg )        R07 = heliocentric latitude     ( deg )     R10 = declination ( deg )           R12 = Height ( deg )
                                                                   R05 = distance Earth-Planet  ( AU )       R08 = distance Sun-Planet    ( AU )     R13 thru R15: temp

                                       •  R16 = Longitude ( ° ' " )  positive East
                                       •  R17 = Latitude ( ° ' " )  positive North
                                       •  R18 = Delta T = TT - UT  ( in seconds )                         R19 = local sidereal time ( deg )

Flags: /
Subroutine:   "J1"  ( cf "Julian & Gregorian Calendars for the HP-41" )

 
 

 01 LBL "EPH"
 02 DEG
 03 HR
 04 STO 15
 05 24
 06 /
 07 X<>Y
 08 XEQ "J1"
 09 +
 10 36525
 11 /
 12 STO 00
 13 36000770
 14 STO 06
 15 *
 16  E3
 17 STO 09
 18 /
 19 99.9678
 20 +
 21 RCL 15
 22 15
 23 *
 24 +
 25 RCL 16
 26 HR
 27 +
 28 STO 19
 29 RCL 18
 30 315576 E4
 31 /
 32 ST+ 00
 33 1671
 34 STO 10
 35 48
 36 +
 37 STO 15
 38 80026
 39 CHS
 40 STO 12
 41 77063
 42 CHS
 43 STO 13
 44 CLST
 45 STO 01
 46 STO 02
 47 STO 11
 48 XEQ 13
 49 RCL 03
 50 RCL 05
 51 P-R
 52 STO 01
 53 X<>Y
 54 STO 02
 55 R^
 56 R^
 57 RTN
 58 LBL 03
 59 RCL 00
 60 3599905
 61 %
 62 2.96
 63 -
 64 STO 12
 65 RCL 00
 66 44526711
 67 %
 68 68.25
 69 -
 70 STO 13
 71 ST+ X
 72 STO 03
 73 STO 14
 74 STO 15
 75 RCL 00
 76 47719887
 77 %
 78 128.43
 79 +
 80 STO 07
 81 ST- 03
 82 ST+ X
 83 STO 08
 84 ST- 15
 85 RCL 00
 86 48320202
 87 %
 88 86.66
 89 +
 90 STO 09
 91 ST+ X
 92 STO 06
 93 2574
 94 RCL 07
 95 COS
 96 28
 97 *
 98 RCL 03
 99 COS
100 5
101 *
102 +
103 RCL 14
104 COS
105 4
106 *
107 +
108 5
109 *
110 -
111  E6
112 /
113 STO 05
114 RCL 07          
115 RCL 09
116 +
117 SIN
118 281
119 *
120 RCL 07
121 RCL 09
122 -
123 SIN
124 278
125 *
126 +
127 RCL 14
128 RCL 09
129 -
130 SIN
131 173
132 *
133 +
134 RCL 03
135 RCL 09
136 +
137 SIN
138 55
139 *
140 +
141 RCL 03
142 RCL 09
143 -
144 SIN
145 46
146 *
147 +
148 RCL 09
149 RCL 14
150 +
151 SIN
152 33
153 *
154 +
155 RCL 08
156 RCL 09
157 +
158 SIN
159 17
160 *
161 +
162 RCL 09
163 SIN
164 5128
165 *
166 +
167 STO 04
168 RCL 07
169 SIN
170 6289
171 *
172 RCL 14
173 SIN
174 658
175 *
176 +
177 RCL 08
178 SIN
179 214
180 *
181 +
182 RCL 06
183 SIN
184 114
185 *
186 -
187 RCL 15
188 SIN
189 59
190 *
191 +
192 RCL 03
193 RCL 12
194 -
195 SIN
196 57
197 *
198 +
199 RCL 07
200 RCL 14
201 +
202 STO 10
203 SIN
204 53
205 *
206 +
207 RCL 14
208 RCL 12
209 -
210 STO 11
211 SIN
212 46
213 *
214 +
215 RCL 12
216 RCL 07
217 -
218 SIN
219 41
220 *
221 -
222 RCL 03
223 SIN
224 1274
225 *
226 +
227 RCL 12
228 SIN
229 37
230 *
231 RCL 13
232 SIN
233 7
234 *
235 +
236 RCL 07
237 RCL 12          
238 +
239 SIN
240 6
241 *
242 +
243 RCL 14
244 RCL 06
245 -
246 SIN
247 3
248 *
249 -
250 5
251 *
252 -
253 481267881
254 RCL 00
255 *
256 211728
257 +
258 +
259  E3
260 ST/ 04
261 /
262 360
263 MOD
264 STO 03
265 XEQ 00
266 RTN
267 LBL 01
268 387.1
269 STO 09
270 20563
271 STO 10
272 7005
273 STO 11
274 1556
275 STO 15
276 77456
277 STO 13
278 250205
279 STO 12
280 149474072
281 STO 06
282 48331
283 1186
284 XEQ 13
285 RTN
286 LBL 02
287 723.3
288 STO 09
289 677
290 STO 10
291 3395
292 STO 11
293 1402
294 STO 15
295 131564
296 STO 13
297 181179
298 STO 12
299 58519213
300 STO 06
301 76680
302 901
303 XEQ 13
304 RTN
305 LBL 04
306 XEQ 12
307 RCL 15
308 10
309 *
310 18
311 -
312 COS
313 16
314 *
315 STO 03
316 CLX
317 STO 04
318 STO 05
319 1524
320 STO 09
321 9340
322 STO 10
323 1850
324 STO 11
325 9
326 -
327 STO 15
328 4829
329 CHS
330 STO 12
331 19141696
332 STO 06
333 23940
334 CHS
335 STO 13
336 49558
337 772
338 XEQ 14
339 RTN
340 LBL 05
341 XEQ 12
342 RCL 08
343 73
344 +
345 COS
346 RCL 10
347 RCL 07
348 -
349 41
350 +
351 SIN
352 -
353 509
354 SQRT
355 *
356 RCL 09
357 75
358 -
359 SIN
360 37
361 *
362 +
363 RCL 06          
364 RCL 11
365 -
366 61
367 -
368 SIN
369 42
370 *
371 +
372 RCL 10
373 33
374 -
375 SIN
376 56
377 *
378 +
379 RCL 11
380 7
381 -
382 SIN
383 329
384 *
385 -
386 STO 03
387 CLX
388 STO 04
389 STO 05
390 5203
391 STO 09
392 1303
393 STO 11
394 4849
395 STO 10
396 1613
397 STO 15
398 34310
399 STO 12
400 3036303
401 STO 06
402 14331
403 STO 13
404 86133
405 +
406 1021
407 XEQ 14
408 RTN
409 LBL 06
410 XEQ 12
411 RCL 07
412 RCL 11
413 +
414 50
415 -
416 SIN
417 45
418 *
419 RCL 09
420 14
421 +
422 COS
423 118
424 *
425 +
426 RCL 07
427 RCL 11
428 -
429 30
430 +
431 COS
432 228
433 *
434 +
435 RCL 11
436 7
437 -
438 SIN
439 810
440 *
441 +
442 STO 03
443 RCL 09
444 ST+ X
445 STO 13
446 33
447 +
448 COS
449 20
450 *
451 RCL 07
452 RCL 11
453 +
454 20
455 +
456 COS
457 18
458 *
459 -
460 STO 04
461 RCL 13
462 60
463 -
464 COS
465 19
466 *
467 STO 05
468 9543
469 STO 09
470 5553
471 RCL 00
472 35
473 *
474 -
475 STO 10
476 2489
477 STO 11
478 1964
479 STO 15
480 50061
481 STO 12          
482 1223511
483 STO 06
484 93057
485 STO 13
486 20609
487 +
488 877
489 XEQ 14
490 RTN
491 LBL 07
492 XEQ 12
493 RCL 06
494 RCL 12
495 -
496 10
497 -
498 COS
499 RCL 12
500 RCL 04
501 -
502 COS
503 -
504 15
505 *
506 RCL 05
507 RCL 12
508 +
509 11
510 -
511 COS
512 RCL 12
513 RCL 03
514 -
515 51
516 -
517 COS
518 +
519 40
520 *
521 +
522 RCL 03
523 73
524 +
525 SIN
526 RCL 04
527 39
528 +
529 SIN
530 +
531 35
532 *
533 -
534 RCL 14
535 ST+ X
536 19
537 +
538 STO 11
539 SIN
540 209
541 *
542 -
543 RCL 05
544 62
545 -
546 SIN
547 858
548 *
549 +
550 STO 03
551 CLX
552 STO 04
553 RCL 11
554 COS
555 34
556 *
557 STO 05
558 19192
559 STO 09
560 45955
561 CHS
562 STO 12
563 429864
564 STO 06
565 4630
566 STO 10
567 773
568 STO 11
569 1486
570 STO 15
571 172993
572 STO 13
573 74005
574 521
575 XEQ 14
576 RTN
577 LBL 08
578 XEQ 12
579 RCL 04
580 50
581 -
582 COS
583 24
584 *
585 RCL 14
586 RCL 05
587 -
588 11
589 -
590 COS
591 22
592 *
593 +
594 RCL 14
595 7
596 +
597 SIN
598 71
599 *
600 +
601 RCL 05
602 28
603 +
604 COS
605 584
606 *
607 +
608 STO 03          
609 CLX
610 STO 04
611 RCL 14
612 COS
613 17
614 *
615 CHS
616 STO 05
617 30070
618 STO 09
619 899
620 STO 10
621 1770
622 RCL 00
623 9
624 *
625 -
626 STO 11
627 1426
628 STO 15
629 55654
630 CHS
631 STO 12
632 219883
633 STO 06
634 48124
635 STO 13
636 83660
637 +
638 1102
639 GTO 14
640 LBL 12
641 102
642 RCL 00
643 2.06
644 *
645 STO 15
646 *
647 STO 14
648 208
649 LASTX
650 *
651 STO 12
652 19
653 RCL 15
654 *
655 STO 11
656 593
657 LASTX
658 *
659 STO 07
660 LASTX
661 880
662 *
663 STO 08
664 +
665 STO 06
666 LASTX
667 RCL 07
668 -
669 STO 09
670 +
671 STO 10
672 4
673 RCL 15
674 *
675 STO 05
676 ST+ X
677 STO 04
678 LASTX
679 31
680 *
681 STO 03
682 RTN
683 LBL 13
684 0
685 STO 03
686 STO 04
687 STO 05
688 RDN
689 LBL 14
690 RCL 00
691 ST* 06
692 ST* 15
693 *
694 +
695 STO 14
696  E5
697 ST/ 10
698 9
699 STO 08
700 RCL 12
701 RCL 06
702 +
703  E3
704 STO 06
705 ST/ 03
706 ST/ 04
707 ST/ 05
708 ST/ 09
709 ST/ 11
710 ST/ 14
711 /
712 RCL 13
713 RCL 15
714 +
715 RCL 06
716 /
717 STO 13
718 -
719 ENTER
720 ENTER
721 LBL 11
722 SIN
723 RCL 10
724 R-D
725 *
726 +
727 DSE 08
728 GTO 11
729 STO 15          
730 2
731 /
732 1
733 RCL 10
734 +
735 1
736 LASTX
737 -
738 /
739 SQRT
740 P-R
741 LASTX
742 /
743 R-P
744 RDN
745 ST+ X
746 1
747 RCL 15
748 COS
749 RCL 10
750 *
751 -
752 RCL 09
753 *
754 RCL 05
755 +
756 STO 08
757 CLX
758 RCL 14
759 -
760 RCL 13
761 +
762 COS
763 RCL 11
764 LASTX
765 SIN
766 P-R
767 X<>Y
768 ASIN
769 RCL 04
770 +
771 STO 07
772 X<> Z
773 R-P
774 CLX
775 RCL 14
776 +
777 RCL 03
778 +
779 STO 06
780 RCL 08
781 XEQ 10
782 RCL 02
783 ST+ Z
784 CLX
785 RCL 01
786 +
787 XEQ 12
788 STO 05
789 RDN
790 STO 03
791 X<>Y
792 STO 04
793 LBL 00
794 RCL 00
795 77
796 /
797 549.4
798 SQRT
799 -
800 RCL 04
801 RCL 03
802 XEQ 13
803 STO 09
804 X<>Y
805 STO 10
806 RCL 17
807 HR
808 90
809 STO 11
810 -
811 RCL 10
812 LASTX
813 RCL 09
814 +
815 RCL 19
816 -
817 XEQ 13
818 RCL 11
819 +
820 CHS
821 STO 11
822 X<>Y
823 ENTER
824 COS
825 RCL 05
826 409
827 *
828 /
829 -
830 STO 12          
831 RCL 11
832 RTN
833 LBL 13
834 1
835 XEQ 10
836 RDN
837 R-P
838 X<> Z
839 ST- Y
840 X<> Z
841 P-R
842 R^
843 XEQ 12
844 RDN
845 RTN
846 LBL 10
847 X<>Y
848 RDN
849 P-R
850 R^
851 X<>Y
852 P-R
853 RTN
854 LBL 12
855 R-P
856 X<>Y
857 RDN
858 R-P
859 R^
860 X<>Y
861 END

 
    ( 1391 bytes / SIZE 020 )

 
       STACK                    INPUTS          OUTPUTS
           Y               YYYY.MNDD       Azimuth ( deg )
           X              HH.MNSS (UT)        height  ( deg )

Example:
    Position of the Sun, the Moon, Mercury, Venus, .... , Neptune on  2023/08/16  ,  7h41m  UT  at the US Naval Observatory at Washington ( D.C. )

-With TT-UT = 69.3 seconds

  •       Longitude = 77°03'56" W = -77.0356   STO 16
  •       Latitude  =  38°55'17" N = +38.5517   STO 17
  •       DELTA T = TT - UT = 69.3                STO 18


  2023.0816  ENTER^
        7.41      XEQ "EPH"   >>>>   Az =   41°067    position of the Sun
                                          X<>Y    h  =  -26°951

  R/S   or  XEQ 03   >>>>   Az =   37°807   position of the Moon
                               X<>Y    h  =  -24°181

  R/S   or  XEQ 01   >>>>   Az =   20°163    position of Mercury
                               X<>Y    h  =  -47°676

  R/S   or  XEQ 02   >>>>   Az =   51°270    position of Venus
                               X<>Y    h  =  -28°125

  R/S   or  XEQ 04   >>>>   Az =   12°990    position of Mars
                               X<>Y    h  =  -46°744

  R/S   or  XEQ 05   >>>>   Az =  -247°397   position of Jupiter
                               X<>Y    h  =     47°468

  R/S   or  XEQ 06   >>>>   Az =   -149°324    position of Saturn
                               X<>Y    h  =     34°319

  R/S   or  XEQ 07   >>>>   Az =  -257°609   position of Uranus
                               X<>Y    h  =     43°652

  R/S   or  XEQ 08   >>>>   Az =  -172°801    position of Neptune
                               X<>Y    h  =     48°561

-The local sidereal time = R19 = 8642°63325 = 2°63325 = 0h17555 = 0h10m32s0

Note:

-If you want the position of Pluto, replace line 639 ( GTO 14 ) with:


 639 XEQ 14
 640 RTN
 641 LBL 09
 642 39489
 643 STO 09
 644 24900
 645 STO 10
 646 17140
 647 STO 11
 648 224075
 649 STO 13
 650 238927
 651 STO 12
 652 146567
 653 STO 06
 654 36260
 655 -
 656 1397
 657 STO 15
 658 GTO 13
 

     b) Heliocentric & Geocentric Coordinates
 
 

Data Registers:           •  R00 = t = time in century since 2000/01/01 0h TT              ( Register R00 is to be initialized before executing "EPH" )

                                         R01 = XSun       R03 = geocentric longitude   ( deg )        R06 = heliocentric longitude  ( deg )
                                         R02 = YSun       R04 = geocentric latitude      ( deg )        R07 = heliocentric latitude     ( deg )
                                                                   R05 = distance Earth-Planet  ( AU )       R08 = distance Sun-Planet    ( AU )

                                                                (  R05 =  parallax in decimal degrees for the Moon )

Flags: /
Subroutines: /
 
 
 

 01 LBL "EPH"
 02 1
 03 STO 09
 04 1671
 05 STO 10          
 06 48
 07 +
 08 STO 15 
 09 36000770 
 10 STO 06
 11 80026
 12 CHS
 13 STO 12
 14 77063
 15 CHS
 16 STO 13
 17 CLST
 18 STO 01
 19 STO 02
 20 STO 11
 21 XEQ 13
 22 RCL 05
 23 P-R
 24 STO 01
 25 X<>Y
 26 STO 02
 27 RCL 05
 28 RCL 04
 29 RCL 03
 30 RTN
 31 LBL 03
 32 RCL 00
 33 3599905
 34 %
 35 2.96
 36 -
 37 STO 12
 38 RCL 00
 39 44526711
 40 %
 41 68.25
 42 -
 43 STO 13
 44 ST+ X
 45 STO 14
 46 RCL 00
 47 47719887
 48 %
 49 128.43
 50 +
 51 STO 07
 52 ST+ X
 53 STO 08
 54 RCL 00
 55 48320202
 56 %
 57 86.66
 58 +
 59 STO 09
 60 ST+ X
 61 STO 06
 62 6036
 63 RCL 14
 64 RCL 07
 65 -
 66 STO 03
 67 COS
 68 58
 69 *
 70 -
 71 RCL 14
 72 COS
 73 46
 74 *
 75 -
 76 RCL 08
 77 COS
 78 9
 79 *
 80 -
 81 RCL 14
 82 RCL 08
 83 -
 84 STO 15
 85 COS
 86 RCL 07
 87 COS
 88 82
 89 *
 90 -
 91 4
 92 *
 93 +
 94 1
 95 %
 96 1/X
 97 ASIN
 98 STO 05
 99 RCL 07
100 RCL 09
101 +
102 SIN
103 281
104 *
105 RCL 07
106 RCL 09
107 -
108 SIN
109 278
110 *
111 +
112 RCL 14
113 RCL 09
114 -
115 SIN
116 173
117 *
118 +
119 RCL 03         
120 RCL 09 
121 +
122 SIN
123 55
124 *
125 +
126 RCL 03
127 RCL 09
128 -
129 SIN
130 46
131 *
132 +
133 RCL 09
134 RCL 14
135 +
136 SIN
137 33
138 *
139 +
140 RCL 08
141 RCL 09
142 +
143 SIN
144 17
145 *
146 +
147 RCL 09
148 SIN
149 5128
150 *
151 +
152 STO 04
153 RCL 07
154 SIN
155 6289
156 *
157 RCL 14
158 SIN
159 658
160 *
161 +
162 RCL 08
163 SIN
164 214
165 *
166 +
167 RCL 06
168 SIN
169 114
170 *
171 -
172 RCL 15
173 SIN
174 59
175 *
176 +
177 RCL 03
178 RCL 12
179 -
180 SIN
181 57
182 *
183 +
184 RCL 07
185 RCL 14
186 +
187 STO 10
188 SIN
189 53
190 *
191 +
192 RCL 14
193 RCL 12
194 -
195 STO 11
196 SIN
197 46
198 *
199 +
200 RCL 12
201 RCL 07
202 -
203 SIN
204 41
205 *
206 -
207 RCL 03
208 SIN
209 1274
210 *
211 +
212 RCL 12
213 SIN
214 37
215 *
216 RCL 13
217 SIN
218 7
219 *
220 +
221 RCL 07
222 RCL 12
223 +
224 SIN
225 6
226 *
227 +
228 RCL 14         
229 RCL 06 
230 -
231 SIN
232 3
233 *
234 -
235 5
236 *
237 -
238 481267881
239 RCL 00
240 *
241 211728
242 +
243 +
244  E3
245 ST/ 04
246 /
247 360
248 MOD
249 STO 03
250 RCL 05
251 RCL 04
252 RCL 03
253 RTN
254 LBL 01
255 .3871
256 STO 09
257 20563
258 STO 10
259 7005
260 STO 11
261 1556
262 STO 15
263 77456
264 STO 13
265 250205
266 STO 12
267 149474072
268 STO 06
269 48331
270 1186
271 XEQ 13
272 RTN
273 LBL 02
274 .7233
275 STO 09
276 677
277 STO 10
278 3395
279 STO 11
280 1402
281 STO 15
282 131564
283 STO 13
284 181179
285 STO 12
286 58519213
287 STO 06
288 76680
289 901
290 XEQ 13
291 RTN
292 LBL 04
293 XEQ 12
294 RCL 15
295 10
296 *
297 18
298 -
299 COS
300 16
301 *
302 STO 03
303 CLX
304 STO 04
305 STO 05
306 1.524
307 STO 09
308 9340
309 STO 10
310 1850
311 STO 11
312 9
313 -
314 STO 15
315 4829
316 CHS
317 STO 12
318 19141696
319 STO 06
320 23940
321 CHS
322 STO 13
323 49558
324 772
325 XEQ 14
326 RTN
327 LBL 05
328 XEQ 12
329 RCL 08
330 73
331 +
332 COS
333 RCL 10
334 RCL 07
335 -
336 41
337 +
338 SIN
339 -
340 509
341 SQRT
342 *
343 RCL 09         
344 75
345 -
346 SIN
347 37
348 *
349 +
350 RCL 06
351 RCL 11
352 -
353 61
354 -
355 SIN
356 42
357 *
358 +
359 RCL 10
360 33
361 -
362 SIN
363 56
364 *
365 +
366 RCL 11
367 7
368 -
369 SIN
370 329
371 *
372 -
373 STO 03
374 CLX
375 STO 04
376 STO 05
377 5.203
378 STO 09
379 1303
380 STO 11
381 4849
382 STO 10
383 1613
384 STO 15
385 34310
386 STO 12
387 3036303
388 STO 06
389 14331
390 STO 13
391 100464
392 1021
393 XEQ 14
394 RTN
395 LBL 06
396 XEQ 12
397 RCL 07
398 RCL 11
399 +
400 50
401 -
402 SIN
403 45
404 *
405 RCL 09
406 14
407 +
408 COS
409 118
410 *
411 +
412 RCL 07
413 RCL 11
414 -
415 30
416 +
417 COS
418 228
419 *
420 +
421 RCL 11
422 7
423 -
424 SIN
425 810
426 *
427 +
428 STO 03
429 RCL 09
430 ST+ X
431 STO 13
432 33
433 +
434 COS
435 20
436 *
437 RCL 07
438 RCL 11
439 +
440 20
441 +
442 COS
443 18
444 *
445 -
446 STO 04
447 RCL 13
448 60
449 -
450 COS
451 19
452 *
453 STO 05 
454 9.543
455 STO 09         
456 5553
457 RCL 00
458 35
459 *
460 -
461 STO 10
462 2489
463 STO 11
464 1964
465 STO 15
466 50061
467 STO 12
468 1223511
469 STO 06
470 93057
471 STO 13
472 113666
473 877
474 XEQ 14
475 RTN
476 LBL 07
477 XEQ 12
478 RCL 06
479 RCL 12
480 -
481 10
482 -
483 COS
484 RCL 12
485 RCL 04
486 -
487 COS
488 -
489 15
490 *
491 RCL 05
492 RCL 12
493 +
494 11
495 -
496 COS
497 RCL 12
498 RCL 03
499 -
500 51
501 -
502 COS
503 +
504 40
505 *
506 +
507 RCL 03
508 73
509 +
510 SIN
511 RCL 04
512 39
513 +
514 SIN
515 +
516 35
517 *
518 -
519 RCL 14
520 ST+ X
521 19
522 +
523 STO 11
524 SIN
525 209
526 *
527 -
528 RCL 05
529 62
530 -
531 SIN
532 858
533 *
534 +
535 STO 03
536 CLX
537 STO 04
538 RCL 11
539 COS
540 34
541 *
542 STO 05
543 19.192
544 STO 09
545 45955
546 CHS
547 STO 12
548 429864
549 STO 06
550 4630
551 STO 10
552 773
553 STO 11
554 1486
555 STO 15
556 172993
557 STO 13
558 74005
559 521
560 XEQ 14
561 RTN
562 LBL 08
563 XEQ 12
564 RCL 04         
565 50
566 -
567 COS
568 24
569 *
570 RCL 14 
571 RCL 05
572 -
573 11
574 -
575 COS
576 22
577 *
578 +
579 RCL 14
580 7
581 +
582 SIN
583 71
584 *
585 +
586 RCL 05
587 28
588 +
589 COS
590 584
591 *
592 +
593 STO 03
594 CLX
595 STO 04
596 RCL 14
597 COS
598 17
599 *
600 CHS
601 STO 05
602 30.07
603 STO 09
604 899
605 STO 10
606 1770
607 RCL 00
608 9
609 *
610 -
611 STO 11
612 1426
613 STO 15
614 55654
615 CHS
616 STO 12
617 219883
618 STO 06
619 48124
620 STO 13
621 131784
622 1102
623 GTO 14
624 LBL 12
625 102
626 RCL 00
627 2.06
628 *
629 STO 15
630 *
631 STO 14
632 208
633 LASTX
634 *
635 STO 12
636 19
637 RCL 15
638 *
639 STO 11
640 593
641 LASTX
642 *
643 STO 07
644 LASTX
645 880
646 *
647 STO 08
648 +
649 STO 06
650 LASTX
651 RCL 07
652 -
653 STO 09
654 +
655 STO 10
656 4
657 RCL 15
658 *
659 STO 05
660 ST+ X
661 STO 04
662 LASTX
663 31
664 *
665 STO 03
666 RTN
667 LBL 13
668 0
669 STO 03
670 STO 04
671 STO 05
672 RDN
673 LBL 14
674 RCL 00
675 ST* 06
676 ST* 15
677 *
678 +
679 STO 14         
680  E5
681 ST/ 10
682 9
683 STO 08 
684 RCL 12
685 RCL 06
686 +
687  E3
688 STO 06
689 ST/ 03
690 ST/ 04
691 ST/ 05
692 ST/ 11
693 ST/ 14
694 /
695 RCL 13
696 RCL 15
697 +
698 RCL 06
699 /
700 STO 13
701 -
702 ENTER
703 ENTER
704 LBL 11
705 SIN
706 RCL 10
707 R-D
708 *
709 +
710 DSE 08
711 GTO 11
712 STO 15
713 2
714 /
715 1
716 RCL 10
717 +
718 1
719 LASTX
720 -
721 /
722 SQRT
723 P-R
724 LASTX
725 /
726 R-P
727 RDN
728 ST+ X
729 1
730 RCL 15
731 COS
732 RCL 10
733 *
734 -
735 RCL 09
736 *
737 RCL 05
738 +
739 STO 08
740 CLX
741 RCL 14
742 -
743 RCL 13
744 +
745 COS
746 RCL 11
747 LASTX
748 SIN
749 P-R
750 X<>Y
751 ASIN
752 RCL 04
753 +
754 STO 07
755 X<> Z
756 R-P
757 CLX
758 RCL 14
759 +
760 RCL 03
761 +
762 STO 06
763 RCL 08
764 X<>Y
765 RDN
766 P-R
767 R^
768 X<>Y
769 P-R
770 RCL 02
771 ST+ Z
772 CLX
773 RCL 01
774 +
775 R-P
776 X<>Y
777 RDN
778 R-P
779 R^
780 X<>Y
781 STO 05
782 X<> Z
783 STO 04
784 X<>Y
785 STO 03
786 END

 
    ( 1271 bytes / SIZE 016 )
 
 

   STACK    INPUTS                 OUTPUTS
        Z         /      distance to the earth ( AU )*
        Y         /       geocentric latitude ( deg )
        X         /      geocentric longitude ( deg )

    * Z-output = parallax for the Moon ( in degrees )

Example:    Calculate the position of the Sun, the Moon & the major planets on 2020/07/16 at 0h TT

   7502  ENTER^  36525  /   STO 00

   •    the Sun    XEQ "EPH"    >>>>    Long = 113°942             =  R03                     R01 = X = -0.41247
                                              RDN      Lat  =    0                      =  R04         and       R02 = Y = 0.92896
                                              RDN     Dist  =  1.01641 AU       =  R05
 

   •   the Moon  R/S  or   XEQ 03   >>>>    Long = 57°313       =  R03
                                                       RDN      Lat  =  -2.778       =  R04
                                                       RDN   Paral.  =  0°918       =  R05      ( add  HMS  after line 97 if you want the parallax in ° ' " )

   •   Mercury    R/S  or   XEQ 01   >>>>    Long =   96°092              =  R03                     R06 = -31°948 = L
                                                       RDN      Lat  =  -3°790               =  R04         and       R07 =  -6°910 = B
                                                       RDN     Dist  =   0.7253 AU       =  R05                     R08 =  0.3985 AU = R

   •     Venus     R/S  or   XEQ 02   >>>>    Long =   72°336              =  R03                      R06 =  -39°509
                                                       RDN      Lat  =  -4°515               =  R04         and       R07 =  -3°042
                                                       RDN     Dist  =  0.4910 AU         =  R05                     R08 =  0.7281 AU

   •     Mars      R/S  or   XEQ 04   >>>>     Long =  10°297               =  R03                      R06 = -35°263
                                                       RDN      Lat  =   -3°495               =  R04         and       R07 =  -1°843
                                                       RDN     Dist  =  0.7302 AU         =  R05                      R08 =  1.3841 AU

   •    Jupiter     R/S  or   XEQ 05   >>>>     Long =  -67°891            =  R03                      R06 =  -67°529
                                                       RDN      Lat  =    -0.332             =  R04         and       R07 =   -0°266
                                                       RDN     Dist  =   4.141 AU         =  R05                      R08 =   5.157 AU

   •   Saturn      R/S  or   XEQ 06   >>>>    Long =  -61°010              =  R03                      R06 =  -61°523
                                                       RDN      Lat  =  -0°228               =  R04         and        R07 =  -0°205
                                                       RDN     Dist  =  8.985 AU          =  R05                       R08 =  9.998 AU

   •  Uranus     R/S  or   XEQ 07     >>>>    Long =   40°330              =  R03                      R06 =  37°505
                                                       RDN      Lat  =   -0°444              =  R04         and       R07 =   -0°450
                                                       RDN     Dist  =  20.051 AU         =  R05                     R08 =  19.788 AU

   •  Neptune   R/S  or   XEQ 08     >>>>    Long =  -9°164                =  R03                      R06 =  -10°795
                                                       RDN      Lat  =  -1°075                =  R04         and       R07 =  -1°054
                                                       RDN     Dist  =  29.353 AU         =  R05                      R08 =  29.920 AU
 

Notes:

-These programs may be used with an HP41CV without any module.
-It's easy to point a telescope to the Moon (!) so if you don't want to calculate its position, delete lines 31 to 253

-The precision remains low - especially for the Moon - and it decreases 1 century before or after J2000.
 

     c) Heliocentric Coordinates Only
 

-This version calculates and stores the heliocentric ecliptic coordinates - geocentric for the Sun & the Moon.
-All the distances are expressed in astronomical units,all the angles in decimal degrees.
 

Data Registers:           •  R00 = t = time in century since 2000/01/01 0h TT              ( Register R00 is to be initialized before executing "EPH" )

                                         R01 = RSun       R03 = geocentric longitude   ( deg )
                                         R02 = LSun       R04 = geocentric latitude      ( deg )
                                                                   R05 = parallax of the Moon  ( deg )

                                         R16 = LMer      R19 = LVen      R22 = LMar      R25 = LJup      R28 = LSat      R31 = LUra     R34 = LNep
                                         R17 = BMer      R20 = BVen      R23 =BMar      R26 = BJup      R29 = BSat      R32 =BUra      R35 =BNep
                                         R18 = RMer      R21 = RVen      R24 = RMar     R27 = RJup      R30 = RSat      R33 = RUra     R36 = RNep
 

Flags: /
Subroutines: /
 
 

 01 LBL "EPH"
 02 36
 03 STO M
 04 XEQ 12
 05 RCL 04          
 06 50
 07 -
 08 COS
 09 24
 10 *
 11 RCL 14 
 12 RCL 05
 13 -
 14 11
 15 -
 16 COS
 17 22
 18 *
 19 +
 20 RCL 14
 21 7
 22 +
 23 SIN
 24 71
 25 *
 26 +
 27 RCL 05
 28 28
 29 +
 30 COS
 31 584
 32 *
 33 +
 34 STO 03
 35 CLX
 36 STO 04
 37 RCL 14
 38 COS
 39 17
 40 *
 41 CHS
 42 STO 05
 43 30.07
 44 STO 09
 45 899
 46 STO 10
 47 1770
 48 RCL 00
 49 9
 50 *
 51 -
 52 STO 11
 53 1426
 54 STO 15
 55 55654
 56 CHS
 57 STO 12
 58 219883
 59 STO 06
 60 48124
 61 STO 13
 62 131784
 63 1102
 64 XEQ 14
 65 XEQ 12
 66 RCL 06
 67 RCL 12
 68 -
 69 10
 70 -
 71 COS
 72 RCL 12
 73 RCL 04
 74 -
 75 COS
 76 -
 77 15
 78 *
 79 RCL 05
 80 RCL 12
 81 +
 82 11
 83 -
 84 COS
 85 RCL 12
 86 RCL 03
 87 -
 88 51
 89 -
 90 COS
 91 +
 92 40
 93 *
 94 +
 95 RCL 03
 96 73
 97 +
 98 SIN
 99 RCL 04
100 39
101 +
102 SIN
103 +
104 35
105 *
106 -
107 RCL 14
108 ST+ X
109 19
110 +
111 STO 11         
112 SIN
113 209
114 *
115 -
116 RCL 05 
117 62
118 -
119 SIN
120 858
121 *
122 +
123 STO 03
124 CLX
125 STO 04
126 RCL 11
127 COS
128 34
129 *
130 STO 05
131 19.192
132 STO 09
133 45955
134 CHS
135 STO 12
136 429864
137 STO 06
138 4630
139 STO 10
140 773
141 STO 11
142 1486
143 STO 15
144 172993
145 STO 13
146 74005
147 521
148 XEQ 14
149 XEQ 12
150 RCL 07
151 RCL 11
152 +
153 50
154 -
155 SIN
156 45
157 *
158 RCL 09
159 14
160 +
161 COS
162 118
163 *
164 +
165 RCL 07
166 RCL 11
167 -
168 30
169 +
170 COS
171 228
172 *
173 +
174 RCL 11
175 7
176 -
177 SIN
178 810
179 *
180 +
181 STO 03
182 RCL 09
183 ST+ X
184 STO 13
185 33
186 +
187 COS
188 20
189 *
190 RCL 07
191 RCL 11
192 +
193 20
194 +
195 COS
196 18
197 *
198 -
199 STO 04
200 RCL 13
201 60
202 -
203 COS
204 19
205 *
206 STO 05
207 9.543
208 STO 09
209 5553
210 RCL 00
211 35
212 *
213 -
214 STO 10
215 2489
216 STO 11
217 1964
218 STO 15         
219 50061
220 STO 12
221 1223511
222 STO 06 
223 93057
224 STO 13
225 113666
226 877
227 XEQ 14
228 XEQ 12
229 RCL 08
230 73
231 +
232 COS
233 RCL 10
234 RCL 07
235 -
236 41
237 +
238 SIN
239 -
240 509
241 SQRT
242 *
243 RCL 09
244 75
245 -
246 SIN
247 37
248 *
249 +
250 RCL 06
251 RCL 11
252 -
253 61
254 -
255 SIN
256 42
257 *
258 +
259 RCL 10
260 33
261 -
262 SIN
263 56
264 *
265 +
266 RCL 11
267 7
268 -
269 SIN
270 329
271 *
272 -
273 STO 03
274 CLX
275 STO 04
276 STO 05
277 5.203
278 STO 09
279 1303
280 STO 11
281 4849
282 STO 10
283 1613
284 STO 15
285 34310
286 STO 12
287 3036303
288 STO 06
289 14331
290 STO 13
291 100464
292 1021
293 XEQ 14
294 XEQ 12
295 RCL 15
296 10
297 *
298 18
299 -
300 COS
301 16
302 *
303 STO 03
304 CLX
305 STO 04
306 STO 05
307 1.524
308 STO 09
309 9340
310 STO 10
311 1850
312 STO 11
313 9
314 -
315 STO 15
316 4829
317 CHS
318 STO 12
319 19141696
320 STO 06
321 23940
322 CHS
323 STO 13         
324 49558
325 772
326 XEQ 14
327 .7233
328 STO 09 
329 677
330 STO 10
331 3395
332 STO 11
333 1402
334 STO 15
335 131564
336 STO 13
337 181179
338 STO 12
339 58519213
340 STO 06
341 76680
342 901
343 XEQ 13
344 .3871
345 STO 09
346 20563
347 STO 10
348 7005
349 STO 11
350 1556
351 STO 15
352 77456
353 STO 13
354 250205
355 STO 12
356 149474072
357 STO 06
358 48331
359 1186
360 XEQ 13
361 1
362 STO 09
363 1671
364 STO 10
365 48
366 +
367 STO 15
368 36000770
369 STO 06
370 80026
371 CHS
372 STO 12
373 77063
374 CHS
375 STO 13
376 CLST
377 STO 11
378 XEQ 13
379 RCL 13
380 STO 02
381 RCL 15
382 STO 01
383 RCL 00
384 3599905
385 %
386 2.96
387 -
388 STO 12
389 RCL 00
390 44526711
391 %
392 68.25
393 -
394 STO 13
395 ST+ X
396 STO 14
397 RCL 00
398 47719887
399 %
400 128.43
401 +
402 STO 07
403 ST+ X
404 STO 08
405 RCL 00
406 48320202
407 %
408 86.66
409 +
410 STO 09
411 ST+ X
412 STO 06
413 6036
414 RCL 14
415 RCL 07
416 -
417 STO 03
418 COS
419 58
420 *
421 -
422 RCL 14
423 COS
424 46
425 *
426 -
427 RCL 08   
428 COS
429 9
430 *
431 -
432 RCL 14         
433 RCL 08 
434 -
435 STO 15
436 COS
437 RCL 07
438 COS
439 82
440 *
441 -
442 4
443 *
444 +
445 1
446 %
447 1/X
448 ASIN
449 STO 05
450 RCL 07
451 RCL 09
452 +
453 SIN
454 281
455 *
456 RCL 07
457 RCL 09
458 -
459 SIN
460 278
461 *
462 +
463 RCL 14
464 RCL 09
465 -
466 SIN
467 173
468 *
469 +
470 RCL 03
471 RCL 09
472 +
473 SIN
474 55
475 *
476 +
477 RCL 03
478 RCL 09
479 -
480 SIN
481 46
482 *
483 +
484 RCL 09
485 RCL 14
486 +
487 SIN
488 33
489 *
490 +
491 RCL 08
492 RCL 09
493 +
494 SIN
495 17
496 *
497 +
498 RCL 09
499 SIN
500 5128
501 *
502 +
503 STO 04
504 RCL 07
505 SIN
506 6289
507 *
508 RCL 14
509 SIN
510 658
511 *
512 +
513 RCL 08
514 SIN
515 214
516 *
517 +
518 RCL 06
519 SIN
520 114
521 *
522 -
523 RCL 15
524 SIN
525 59
526 *
527 +
528 RCL 03
529 RCL 12
530 -
531 SIN
532 57
533 *
534 +
535 RCL 07
536 RCL 14
537 +
538 STO 10         
539 SIN
540 53
541 *
542 +
543 RCL 14 
544 RCL 12
545 -
546 STO 11
547 SIN
548 46
549 *
550 +
551 RCL 12
552 RCL 07
553 -
554 SIN
555 41
556 *
557 -
558 RCL 03
559 SIN
560 1274
561 *
562 +
563 RCL 12
564 SIN
565 37
566 *
567 RCL 13
568 SIN
569 7
570 *
571 +
572 RCL 07
573 RCL 12
574 +
575 SIN
576 6
577 *
578 +
579 RCL 14
580 RCL 06
581 -
582 SIN
583 3
584 *
585 -
586 5
587 *
588 -
589 481267881
590 RCL 00
591 *
592 211728
593 +
594 +
595  E3
596 ST/ 04
597 /
598 360
599 MOD
600 STO 03
601 RTN
602 LBL 12
603 102
604 RCL 00
605 2.06
606 *
607 STO 15
608 *
609 STO 14
610 208
611 LASTX
612 *
613 STO 12
614 19
615 RCL 15
616 *
617 STO 11
618 593
619 LASTX
620 *
621 STO 07
622 LASTX
623 880
624 *
625 STO 08
626 +
627 STO 06
628 LASTX
629 RCL 07
630 -
631 STO 09
632 +
633 STO 10
634 4
635 RCL 15
636 *
637 STO 05
638 ST+ X
639 STO 04 
640 LASTX
641 31
642 *
643 STO 03
644 RTN
645 LBL 13
646 0
647 STO 03          
648 STO 04
649 STO 05 
650 RDN
651 LBL 14
652 RCL 00
653 ST* 06
654 ST* 15
655 *
656 +
657 STO 14
658  E5
659 ST/ 10
660 9
661 STO 08
662 RCL 12
663 RCL 06
664 +
665  E3
666 STO 06
667 ST/ 03
668 ST/ 04
669 ST/ 05
670 ST/ 11
671 ST/ 14
672 /
673 RCL 13
674 RCL 15
675 +
676 RCL 06
677 /
678 STO 13
679 -
680 ENTER
681 ENTER
682 LBL 11
683 SIN
684 RCL 10
685 R-D
686 *
687 +
688 DSE 08
689 GTO 11
690 STO 15
691 2
692 /
693 1
694 RCL 10
695 +
696 1
697 LASTX
698 -
699 /
700 SQRT
701 P-R
702 LASTX
703 /
704 R-P
705 RDN
706 ST+ X
707 1
708 RCL 15
709 COS
710 RCL 10
711 *
712 -
713 RCL 09
714 *
715 RCL 05
716 +
717 STO IND M
718 DSE M
719 CLX
720 RCL 14
721 -
722 RCL 13
723 +
724 COS
725 RCL 11
726 LASTX
727 SIN
728 P-R
729 X<>Y
730 ASIN
731 RCL 04
732 +
733 STO IND M
734 DSE M
735 X<> Z
736 R-P
737 CLX
738 RCL 14
739 +
740 RCL 03
741 +
742 STO IND M
743 DSE M
744 END

 
      ( 1236 bytes / SIZE 037 )
 
 

     STACK    INPUT        OUTPUT
         X         /      LMoon ( deg )

 
Example:   Calculate the geocentric coordinates of the Sun and the Moon & the heliocentric coordinates of the major planets on 2020/07/16 at 0h TT

   7502  ENTER^  36525  /   STO 00    XEQ "EPH"    >>>>    LMoon = 57°313  =  R03                            ---Execution time = 3mn12s---

   and we have in registers R01  R02  R03  R04  R05  &  R16 to R36

            R01 = RSun = 1.01641      R03 = LMoon = 57.313
            R02 = LSun  = 113.942     R04 = bMoon = -2.778
                                                     R05 = parallax of the Moon = 0.918   ( add HMS after line 448 if you want the parallax in ° ' " )
 

            R16 = LMer = -31.948   R19 = LVen = -39.509  R22 = LMar  = -35.263 R25 = LJup = -67.529 R28 = LSat =  -61.523
            R17 = BMer = -6.910    R20 = BVen =  -3.042   R23 =BMar  =  -1.843  R26 = BJup = -0.266    R29 = BSat =  -0.205
            R18 = RMer = 0.3985    R21 = RVen =   0.7281  R24 = RMar =  1.384  R27 = RJup =  5.157     R30 = RSat =   9.998

            R31 = LUra = 37.505   R34 = LNep  = -10.795
            R32 =BUra =  -0.450   R35 =BNep  =   -1.054
            R33 = RUra =  19.788  R36 = RNep =  29.920

Notes:

-The results in registers R16 to R36 are the same as in registers R06-R07-R08 in the version of paragraph 2°)a)

-Synthetic register M is used
-When the program stops, M = 15
-If line 01 is replaced by  LBL 10  ,  6 bytes are saved.

-If you have a TIME module, add  HR  24  /  X<>Y  1.012  DDAYS  -  36525  /  STO 00  after line 01  ( -> 754 lines / 1256 bytes )
 and place the date in Y-register & the time in X-register before executiong "EPH"

-If you want to calculate the position of Pluto, replace lines 01-02-03 by
 
 

 01 LBL "EPH"
 02 39
 03 STO M
 04 39.489
 05 STO 09
 06 24900
 07 STO 10
 08 17140
 09 STO 11
 10 224075
 11 STO 13
 12 238927
 13 STO 12
 14 146567
 15 STO 06
 16 110307
 17 1397
 18 STO 15
 19 XEQ 13

 
 55 extra-bytes & SIZE 040

-You will get the heliocentric ecliptic coordinates of Pluto in registers R37-R38-R39.
-In the example above, it yields:

            R37 = LPlu = -66.259
            R38 =BPlu =   -0.970
            R39 = RPlu =  34.073 

3°)  2 More Complete Program but even less accurate  [ 1900 , 2100 ]


-This program computes the Azimuthal coordinates but the constants are used after rounding them to 0°1
-So, the precision is not very good, but after replacing  LBL "EPH"  by  LBL 10  ,  you can execute it in X-memory... provided you have less than 15 key-assignments !

-All the angles are calculated in decimal degrees, the distances in Astronomical units.
-The distance Earth-Moon is stored in R05 ... as if it were a constant:  384400 / 149597871 ~ 1/389

-In fact, lines 55-56-57 could be deleted.


Data Registers:           •  R00 = t = time in century since 2000/01/01 0h TT              ( Register R00 is to be initialized before executing "EPH" )

                                         R01 = XSun       R03 = geocentric longitude   ( deg )        R06 = heliocentric longitude  ( deg )     R09 = right-ascension ( deg )     R15 = local sidereal time ( deg )
                                         R02 = YSun       R04 = geocentric latitude      ( deg )        R07 = heliocentric latitude     ( deg )     R10 = declination ( deg )
                                                                   R05 = distance Earth-Planet  ( AU )       R08 = distance Sun-Planet    ( AU )     R11 thru R14: temp

                                       •  R16 = Longitude ( ° ' " )  positive East
                                       •  R17 = Latitude ( ° ' " )  positive North
                                       •  R18 = Delta T = TT - UT  expressed in century (!) 

Flags: /
Subroutine:   "J1"  ( cf "Julian & Gregorian Calendars for the HP-41" )
 
 
 

 01 LBL "EPH"
 02 DEG
 03 HR
 04 X<>Y
 05 XEQ "J1"
 06 24
 07 *
 08 +
 09 8766 E2
 10 /
 11 STO 00
 12 360007.7
 13 STO 06
 14 *
 15 10
 16 /
 17 99.968
 18 +
 19 X<>Y
 20 15
 21 *
 22 +
 23 RCL 16
 24 HR
 25 +
 26 STO 15
 27 RCL 18
 28 ST+ 00
 29 1
 30 STO 09
 31 17
 32 STO 05
 33 STO 10
 34 800
 35 CHS
 36 STO 12
 37 29
 38 +
 39 STO 13
 40 CLST
 41 STO 01
 42 STO 02
 43 STO 11
 44 XEQ 13
 45 RCL 03
 46 RCL 05
 47 P-R
 48 STO 01
 49 X<>Y
 50 STO 02
 51 R^
 52 R^
 53 RTN
 54 LBL 03
 55 389
 56 1/X
 57 STO 05
 58 RCL 00
 59 477199
 60 *
 61 128
 62 +
 63 STO 07
 64 RCL 00
 65 483202
 66 *
 67 87
 68 +
 69 STO 09          
 70 +
 71 SIN
 72 RCL 07
 73 RCL 09
 74 -
 75 SIN
 76 +
 77 3
 78 *
 79 RCL 00
 80 890534
 81 *
 82 136
 83 -
 84 STO 14
 85 RCL 09
 86 -
 87 SIN
 88 ST+ X
 89 +
 90 RCL 09
 91 SIN
 92 51
 93 *
 94 +
 95 STO 04
 96 RCL 07
 97 SIN
 98 63
 99 *
100 RCL 14
101 SIN
102 7
103 *
104 +
105 RCL 07
106 ST+ X
107 SIN
108 ST+ X
109 +
110 RCL 09
111 ST+ X
112 SIN
113 -
114 RCL 14
115 RCL 07
116 -
117 SIN
118 13
119 *
120 +
121 4812679
122 RCL 00
123 *
124 2117
125 +
126 +
127 10
128 ST/ 04
129 /
130 STO 03
131 XEQ 00
132 X<>Y
133 ENTER
134 COS
135 60
136 /
137 ASIN
138 -
139 X<>Y
140 RTN
141 LBL 01
142 .387
143 STO 09          
144 206
145 STO 10
146 70
147 STO 11
148 16
149 STO 05
150 775
151 STO 13
152 2502
153 STO 12
154 1494741
155 STO 06
156 483
157 12
158 XEQ 13
159 RTN
160 LBL 02
161 .723
162 STO 09
163 7
164 STO 10
165 34
166 STO 11
167 14
168 STO 05
169 1316
170 STO 13
171 1812
172 STO 12
173 585192
174 STO 06
175 767
176 9
177 XEQ 13
178 RTN
179 LBL 04
180 1.524
181 STO 09
182 93
183 STO 10
184 18
185 STO 05
186 STO 11
187 48
188 CHS
189 STO 12
190 191417
191 STO 06
192 239
193 CHS
194 STO 13
195 496
196 8
197 XEQ 13
198 RTN
199 LBL 05
200 XEQ 12
201 PI
202 *
203 CHS
204 STO 03
205 5.203
206 STO 09
207 13
208 STO 11
209 48
210 STO 10
211 16
212 STO 05
213 343
214 STO 12
215 30363
216 STO 06          
217 143
218 STO 13
219 1005
220 10
221 XEQ 14
222 RTN
223 LBL 06
224 XEQ 12
225 8
226 *
227 RCL 04
228 287
229 *
230 STO 09
231 14
232 +
233 COS
234 +
235 RCL 09
236 ST+ X
237 30
238 +
239 COS
240 ST+ X
241 +
242 STO 03
243 9.543
244 STO 09
245 56
246 STO 10
247 25
248 STO 11
249 20
250 STO 05
251 501
252 STO 12
253 12235
254 STO 06
255 931
256 STO 13
257 1137
258 9
259 XEQ 14
260 RTN
261 LBL 07
262 XEQ 12
263 RCL 05
264 62
265 -
266 SIN
267 9
268 *
269 RCL 04
270 204
271 *
272 19
273 +
274 SIN
275 ST+ X
276 -
277 STO 03
278 19.19
279 STO 09
280 460
281 CHS
282 STO 12
283 4299
284 STO 06
285 46
286 STO 10
287 8
288 STO 11          
289 15
290 STO 05
291 1730
292 STO 13
293 740
294 5
295 XEQ 14
296 RTN
297 LBL 08
298 XEQ 12
299 RCL 05
300 28
301 +
302 COS
303 6
304 *
305 STO 03
306 30.07
307 STO 09
308 9
309 STO 10
310 18
311 STO 11
312 14
313 STO 05
314 557
315 CHS
316 STO 12
317 2199
318 STO 06
319 481
320 STO 13
321 1318
322 11
323 XEQ 14
324 RTN
325 LBL 09
326 39.49
327 STO 09
328 249
329 STO 10
330 171
331 STO 11
332 2241
333 STO 13
334 2389
335 STO 12
336 1466
337 STO 06
338 363
339 -
340 14
341 STO 05
342 GTO 13
343 LBL 12
344 RCL 00
345 2.06
346 *
347 STO 04
348 4
349 *
350 STO 05
351 RCL 04
352 19
353 *
354 7
355 -
356 SIN
357 RTN
358 LBL 13
359 0
360 STO 03          
361 RDN
362 LBL 14
363 RCL 00
364 ST* 05
365 ST* 06
366 *
367 +
368 STO 14
369  E3
370 ST/ 10
371 6
372 STO 08
373 RCL 06
374 RCL 12
375 +
376 10
377 STO 06
378 ST/ 03
379 ST/ 11
380 ST/ 14
381 /
382 RCL 05
383 RCL 13
384 +
385 RCL 06
386 /
387 STO 13
388 -
389 ENTER
390 ENTER
391 LBL 11
392 SIN
393 RCL 10
394 R-D
395 *
396 +
397 DSE 08
398 GTO 11
399 STO 05
400 2
401 /
402 TAN
403 1
404 RCL 10
405 +
406 1
407 LASTX
408 -
409 /
410 SQRT
411 *
412 ATAN
413 ST+ X
414 1
415 RCL 05
416 COS
417 RCL 10
418 *
419 -
420 RCL 09
421 *
422 STO 08
423 CLX
424 RCL 14
425 -
426 RCL 13
427 +
428 COS
429 RCL 11
430 LASTX
431 SIN
432 P-R
433 X<>Y
434 ASIN
435 STO 07          
436 X<> Z
437 R-P
438 CLX
439 RCL 14
440 +
441 RCL 03
442 +
443 STO 06
444 RCL 08
445 XEQ 10
446 RCL 02
447 ST+ Z
448 CLX
449 RCL 01
450 +
451 XEQ 12
452 STO 05
453 RDN
454 STO 03
455 X<>Y
456 STO 04
457 LBL 00
458 RCL 00
459 77
460 /
461 549.4
462 SQRT
463 -
464 RCL 04
465 RCL 03
466 XEQ 13
467 STO 09
468 X<>Y
469 STO 10
470 RCL 17
471 HR
472 90
473 STO 11
474 -
475 RCL 10
476 LASTX
477 RCL 09
478 +
479 RCL 15
480 -
481 XEQ 13
482 RCL 11
483 +
484 CHS
485 RTN
486 LBL 13
487 1
488 XEQ 10
489 RDN
490 R-P
491 X<> Z
492 ST- Y
493 X<> Z
494 P-R
495 R^
496 XEQ 12
497 RDN
498 RTN
499 LBL 10
500 X<>Y
501 RDN
502 P-R
503 R^
504 X<>Y
505 P-R
506 RTN
507 LBL 12          
508 R-P
509 X<>Y
510 RDN
511 R-P
512 R^
513 X<>Y
514 END

 
    ( 823 bytes / SIZE 019 )
 
 

      STACK                    INPUTS          OUTPUTS
           Y               YYYY.MNDD       Azimuth ( deg )
           X              HH.MNSS (UT)        height  ( deg )


Example:
    Position of the Sun, the Moon, Mercury, Venus, .... , Pluto on  2021/07/07  ,  7h41m  UT  at the US Naval Observatory at Washington ( D.C. )

-With TT-UT = 69 seconds = 69 / 3155760000    ~  22 E-9 century

  •       Longitude = 77°03'56" W = -77.0356   STO 16
  •       Latitude  =  38°55'17" N = +38.5517   STO 17
  •       DELTA T = TT - UT =   22 E-9           STO 18


  2021.0707  ENTER^
        7.41      XEQ "EPH"   >>>>   Az =   36°05    position of the Sun
                                          X<>Y    h  =  -19°49

  R/S   or  XEQ 03   >>>>   Az =   59.°98    position of the Moon
                               X<>Y    h  =     -0°97

  R/S   or  XEQ 01   >>>>   Az =   54°75    position of Mercury
                               X<>Y    h  =   -8°27

  R/S   or  XEQ 02   >>>>   Az =     9°40    position of Venus
                               X<>Y    h  =  -31°83

  R/S   or  XEQ 04   >>>>   Az =     5°63    position of Mars
                               X<>Y    h  =  -33°71

  R/S   or  XEQ 05   >>>>   Az =   -193°06    position of Jupiter
                               X<>Y    h  =      38°33

  R/S   or  XEQ 06   >>>>   Az =   -169°86    position of Saturn
                               X<>Y    h  =     32°57

  R/S   or  XEQ 07   >>>>   Az =   84°87    position of Uranus
                               X<>Y    h  =   18.97

  R/S   or  XEQ 08   >>>>   Az =  -220°43    position of Neptune
                               X<>Y    h  =     38.90

  R/S   or  XEQ 09   >>>>   Az =  -154°06    position of Pluto
                               X<>Y    h  =     24°06

Notes:

-The azimuths ( reckoned clockwise positive from North ) & heights are not stored.
-You could add  X<>Y  STO 12  X<>Y  STO 11  after line  484

-The correction for parallax is only taken into account for the Moon.

-We can modify this program to get only the azimuths & heights.
-Here is such a version:



 01 LBL "EPH"
 02 DEG
 03 HR
 04 X<>Y
 05 XEQ "J1"
 06 24
 07 *
 08 +
 09 8766 E2
 10 /
 11 STO 00
 12 360007.7
 13 STO 06
 14 *
 15 10
 16 /
 17 99.968
 18 +
 19 X<>Y
 20 15
 21 *
 22 +
 23 RCL 16
 24 HR
 25 +
 26 STO 15
 27 RCL 18
 28 ST+ 00
 29 20.039
 30 STO 19
 31 RCL 00
 32 77
 33 /
 34 549.4
 35 SQRT
 36 -
 37 STO 14
 38 1
 39 STO 09
 40 17
 41 STO 05
 42 STO 10
 43 800
 44 CHS
 45 STO 12
 46 29
 47 +
 48 STO 13
 49 CLST
 50 STO 01
 51 STO 02
 52 STO 11
 53 XEQ 13
 54 RCL 06
 55 RCL 08
 56 P-R
 57 STO 01
 58 X<>Y
 59 STO 02
 60 RCL 00
 61 477199
 62 *
 63 128
 64 +
 65 STO 07          
 66 RCL 00
 67 483202
 68 *
 69 87
 70 +
 71 STO 09
 72 +
 73 SIN
 74 RCL 07
 75 RCL 09
 76 -
 77 SIN
 78 +
 79 3
 80 *
 81 RCL 00
 82 890534
 83 *
 84 136
 85 -
 86 STO 13
 87 RCL 09
 88 -
 89 SIN
 90 ST+ X
 91 +
 92 RCL 09
 93 SIN
 94 51
 95 *
 96 +
 97 STO 03
 98 RCL 07
 99 SIN
100 63
101 *
102 RCL 13
103 SIN
104 7
105 *
106 +
107 RCL 07
108 ST+ X
109 SIN
110 ST+ X
111 +
112 RCL 09
113 ST+ X
114 SIN
115 -
116 RCL 13
117 RCL 07
118 -
119 SIN
120 13
121 *
122 +
123 4812679
124 RCL 00
125 *
126 2117
127 +
128 +
129 10
130 ST/ 03
131 /
132 RCL 03
133 X<>Y
134 389
135 1/X
136 XEQ 10          
137 XEQ 00
138 ENTER
139 COS
140 60
141 /
142 ASIN
143 -
144 STO 23
145 .387
146 STO 09
147 206
148 STO 10
149 70
150 STO 11
151 16
152 STO 05
153 775
154 STO 13
155 2502
156 STO 12
157 1494741
158 STO 06
159 483
160 12
161 XEQ 13
162 .723
163 STO 09
164 7
165 STO 10
166 34
167 STO 11
168 14
169 STO 05
170 1316
171 STO 13
172 1812
173 STO 12
174 585192
175 STO 06
176 767
177 9
178 XEQ 13
179 1.524
180 STO 09
181 93
182 STO 10
183 18
184 STO 05
185 STO 11
186 48
187 CHS
188 STO 12
189 191417
190 STO 06
191 239
192 CHS
193 STO 13
194 496
195 8
196 XEQ 13
197 XEQ 12
198 PI
199 *
200 CHS
201 STO 03
202 5.203
203 STO 09
204 13
205 STO 11
206 48
207 STO 10          
208 16
209 STO 05
210 343
211 STO 12
212 30363
213 STO 06
214 143
215 STO 13
216 1005
217 10
218 XEQ 14
219 XEQ 12
220 8
221 *
222 RCL 03
223 287
224 *
225 STO 09
226 14
227 +
228 COS
229 +
230 RCL 09
231 ST+ X
232 30
233 +
234 COS
235 ST+ X
236 +
237 STO 03
238 9.543
239 STO 09
240 56
241 STO 10
242 25
243 STO 11
244 20
245 STO 05
246 501
247 STO 12
248 12235
249 STO 06
250 931
251 STO 13
252 1137
253 9
254 XEQ 14
255 XEQ 12
256 RCL 05
257 62
258 -
259 SIN
260 9
261 *
262 RCL 03
263 204
264 *
265 19
266 +
267 SIN
268 ST+ X
269 -
270 STO 03
271 19.19
272 STO 09
273 460
274 CHS
275 STO 12
276 4299
277 STO 06
278 46
279 STO 10          
280 8
281 STO 11
282 15
283 STO 05
284 1730
285 STO 13
286 740
287 5
288 XEQ 14
289 XEQ 12
290 RCL 05
291 28
292 +
293 COS
294 6
295 *
296 STO 03
297 30.07
298 STO 09
299 9
300 STO 10
301 18
302 STO 11
303 14
304 STO 05
305 557
306 CHS
307 STO 12
308 2199
309 STO 06
310 481
311 STO 13
312 1318
313 11
314 XEQ 14
315 39.49
316 STO 09
317 249
318 STO 10
319 171
320 STO 11
321 2241
322 STO 13
323 2389
324 STO 12
325 1466
326 STO 06
327 363
328 -
329 14
330 STO 05
331 GTO 13
332 LBL 12
333 RCL 00
334 2.06
335 *
336 STO 03
337 4
338 *
339 STO 05
340 RCL 03
341 19
342 *
343 7
344 -
345 SIN
346 RTN
347 LBL 13
348 0
349 STO 03          
350 RDN
351 LBL 14
352 RCL 00
353 ST* 05
354 ST* 06
355 *
356 +
357 STO 08
358  E3
359 ST/ 10
360 6
361 STO 04
362 RCL 06
363 RCL 12
364 +
365 10
366 STO 06
367 ST/ 03
368 ST/ 11
369 ST/ 08
370 /
371 RCL 05
372 RCL 13
373 +
374 RCL 06
375 /
376 STO 13
377 -
378 ENTER
379 ENTER
380 LBL 11
381 SIN
382 RCL 10
383 R-D
384 *
385 +
386 DSE 04
387 GTO 11
388 STO 05
389 2
390 /
391 TAN
392 1
393 RCL 10
394 +
395 1
396 LASTX
397 -
398 /
399 SQRT
400 *
401 ATAN
402 ST+ X
403 1
404 RCL 05
405 COS
406 RCL 10
407 *
408 -
409 RCL 09
410 *
411 X<> 08
412 STO 06
413 -
414 RCL 13
415 +
416 COS
417 RCL 11          
418 LASTX
419 SIN
420 P-R
421 X<>Y
422 ASIN
423 STO 07
424 X<> Z
425 R-P
426 CLX
427 RCL 06
428 +
429 RCL 03
430 +
431 STO 06
432 RCL 08
433 XEQ 10
434 RCL 02
435 ST+ Z
436 CLX
437 RCL 01
438 +
439 LBL 00
440 RCL 14
441 RDN
442 XEQ 13
443 RCL 17
444 HR
445 90
446 STO 11
447 -
448 R^
449 LASTX
450 R^
451 +
452 RCL 15
453 -
454 RCL 08
455 XEQ 10
456 XEQ 13
457 RCL 11
458 +
459 CHS
460 STO IND 19
461 ISG 19
462 X<>Y
463 STO IND 19
464 ISG 19
465 RTN
466 RCL 19
467 20
468 -
469 RTN
470 LBL 13
471 RDN
472 R-P
473 X<> Z
474 ST- Y
475 X<> Z
476 P-R
477 R^
478 XEQ 12
479 STO 08
480 RDN
481 RTN
482 LBL 10
483 X<>Y
484 RDN
485 P-R
486 R^
487 X<>Y
488 P-R
489 RTN
490 LBL 12          
491 R-P
492 X<>Y
493 RDN
494 R-P
495 R^
496 X<>Y
497 END

 
    ( 820 bytes / SIZE 040 )
 
 

      STACK                    INPUTS          OUTPUTS
           Y               YYYY.MNDD                  /
           X              HH.MNSS (UT)            20.039


-Thus, we obtain the azimuths & heights of the Sun, the Moon and the planets in registers:

  R20-R21 ( Sun )  R22-R23 ( Moon )  R24-R25 ( Mercury )  ......  R38-R39 ( Pluto )

-Execution time = 3mn41s



4°)  Simple Programs   [ 1900 , 2100 ]


     a)  Program#1  ( 2193 bytes )


-This version employs more accurate data than the previous one.
-It calls "J1" listed in "Julian & Gregorian Calendars for the HP41"
-All the calculated angles are expressed in decimal degrees.


Registers
 

 R00 = Time from 2000/01/01 0h TT ( unit = 100 Julian years )            ( Registers R16-R17-R18 are to be initialized before executing "EPH" )

 R01 = X   Rectangular
 R02 = Y   coordinates of the Sun,

 R03 = Geocentric longitude ( deg )
 R04 = Geocentric latitude ( deg )
 R05 = Distance Earth-Planet ( AU )

 R06 = Right-ascension ( deg )
 R07 = Declination ( deg )

 R08 = Heliocentric longitude ( deg )
 R09 = Heliocentric latitude ( deg )
 R10 = Radius vector ( AU )

 R11 = Azimuth ( deg )  ( reckoned clockwise from South )
 R12 = height ( deg )
 R13 = height corrected for refraction ( deg )

 R14 & R15: temp                            

•  R16 = Longitude of the observer ( ° ' " )  positive East
•  R17 = Latitude of the observer ( ° ' " )
•  R18 = DeltaT = TT - UT ( seconds )

  R19 = local true sidereal time ( deg )

Flags: /
Subroutine:   "J" or "J1"  ( cf "Julian & Gregorian Calendars for the HP-41" )

-With an HP41CX or a TIME module, lines 07-08 may be replaced by  1.012  DDAYS  -


 01 LBL "EPH"
 02 HR
 03 STO 15
 04 24
 05 /
 06 X<>Y
 07 XEQ "J"
 08 +
 09 36525
 10 /
 11 STO 00
 12 35999.373
 13 STO 06
 14 1.397
 15 +
 16 *
 17 99.9678
 18 +
 19 RCL 15
 20 15
 21 *
 22 +
 23 RCL 16
 24 HR
 25 +
 26 STO 19
 27 RCL 18
 28 315576 E4
 29 /
 30 ST+ 00
 31  E3
 32 STO 09
 33 1671
 34 STO 10
 35 48
 36 +
 37 STO 15
 38 4
 39 CHS
 40 STO 14
 41 80026
 42 CHS
 43 STO 12
 44 2963
 45 +
 46 STO 13
 47 RCL 00
 48 ST* 06
 49 445267
 50 *
 51 68
 52 -
 53 SIN
 54 RCL 00
 55 20
 56 *
 57 18
 58 -
 59 COS
 60 -
 61 RCL 00
 62 32964
 63 *
 64 22
 65 -
 66 COS
 67 -
 68 ST+ X
 69 STO 03
 70 CLST
 71 STO 01
 72 STO 02
 73 STO 04
 74 STO 05
 75 STO 11
 76 XEQ 14
 77 RCL 03
 78 RCL 05
 79 P-R
 80 STO 01
 81 X<>Y
 82 STO 02
 83 RCL 13
 84 RCL 12
 85 RCL 11
 86 RTN
 87 LBL 03
 88 RCL 00
 89 RCL 00
 90 3599905
 91 %
 92 2.96
 93 -
 94 STO 12
 95 STO 11
 96 CLX
 97 44526711
 98 %
 99 68.25
100 -
101 STO 13
102 ST+ X
103 STO 14
104 STO 03
105 STO 10
106 ST- 11
107 CLX
108 47719887
109 +
110 %
111 128.43
112 +
113 STO 07
114 ST- 03
115 ST+ 10
116 ST+ X
117 STO 08
118 CLX
119 48320202
120 %
121 86.66
122 +
123 STO 09
124 ST+ X
125 STO 06
126 2574
127 RCL 07
128 COS
129 28
130 *
131 RCL 03
132 COS
133 5
134 *
135 +
136 RCL 14
137 COS
138 4
139 *
140 +
141 5
142 *
143 -
144  E6
145 /
146 STO 05
147 RCL 07
148 RCL 09
149 +
150 SIN
151 281
152 *
153 RCL 07
154 RCL 09
155 -
156 SIN
157 278
158 *
159 +
160 RCL 14
161 RCL 09
162 -
163 SIN
164 173
165 *
166 +
167 RCL 03
168 RCL 09
169 +
170 SIN
171 55
172 *
173 +
174 RCL 03
175 RCL 09
176 -
177 SIN
178 46
179 *
180 +
181 RCL 09
182 RCL 14
183 +
184 SIN
185 33
186 *
187 +
188 RCL 08
189 RCL 09
190 +
191 SIN
192 17
193 *
194 +
195 RCL 10
196 RCL 09
197 -
198 SIN
199 RCL 08
200 RCL 09
201 -
202 SIN
203 +
204 9
205 *
206 +
207 RCL 09          
208 RCL 11
209 +
210 SIN
211 RCL 09
212 SIN
213 641
214 *
215 -
216 8
217 *
218 -
219 RCL 14
220 RCL 08
221 -
222 RCL 09
223 -
224 SIN
225 RCL 09
226 RCL 10
227 +
228 SIN
229 +
230 4
231 *
232 +
233 RCL 12
234 RCL 14
235 +
236 RCL 09
237 -
238 SIN
239 3
240 *
241 -
242 STO 04
243 RCL 07
244 SIN
245 6289
246 *
247 RCL 14
248 SIN
249 658
250 *
251 +
252 RCL 08
253 SIN
254 214
255 *
256 +
257 RCL 06
258 SIN
259 114
260 *
261 -
262 RCL 14
263 RCL 08
264 -
265 SIN
266 59
267 *
268 +
269 RCL 03
270 RCL 12
271 -
272 SIN
273 57
274 *
275 +
276 RCL 10
277 SIN
278 53
279 *
280 +
281 RCL 11
282 SIN
283 46
284 *
285 -
286 RCL 12
287 RCL 07
288 -
289 SIN
290 41
291 *
292 -
293 RCL 03
294 SIN
295 98
296 *
297 RCL 06
298 RCL 07
299 +
300 SIN
301 -
302 13
303 *
304 +
305 RCL 07
306 RCL 06
307 -
308 SIN
309 RCL 14
310 ST+ X
311 RCL 07
312 -
313 SIN
314 +
315 11
316 *
317 +
318 RCL 03
319 ST+ X
320 SIN
321 9
322 *
323 +
324 RCL 03
325 RCL 12
326 +
327 SIN
328 8
329 *
330 -
331 RCL 12
332 RCL 14
333 +
334 SIN
335 7
336 *
337 -
338 RCL 12
339 SIN
340 37
341 *
342 RCL 13
343 SIN
344 7
345 *
346 +
347 RCL 07
348 RCL 12
349 +
350 SIN
351 6
352 *
353 +
354 RCL 14
355 RCL 06
356 -
357 SIN
358 3
359 *
360 -
361 RCL 07
362 RCL 08
363 +
364 SIN
365 ST+ X
366 -
367 RCL 13
368 RCL 07
369 -
370 SIN
371 +
372 RCL 12
373 RCL 13
374 +
375 SIN
376 -
377 5
378 *
379 -
380 RCL 10
381 RCL 12
382 -
383 SIN
384 RCL 08
385 RCL 14
386 +
387 SIN
388 +
389 RCL 14
390 ST+ X
391 SIN
392 +
393 RCL 03
394 RCL 08
395 -
396 SIN
397 +
398 RCL 00
399 132
400 *
401 60
402 -
403 SIN
404 -
405 4
406 *
407 +
408 RCL 12
409 RCL 08
410 -
411 SIN
412 RCL 03
413 RCL 06
414 +
415 SIN
416 +
417 3
418 *
419 -
420 481267881
421 RCL 00          
422 ST+ X
423 -
424 RCL 00
425 *
426 211728
427 +
428 +
429  E3
430 ST/ 04
431 /
432 360
433 MOD
434 STO 03
435 XEQ 00
436 RTN
437 LBL 01
438 387.1
439 STO 09
440 20563
441 STO 10
442 7005
443 RCL 00
444 2
445 STO 14
446 *
447 +
448 STO 11
449 1556
450 STO 15
451 77456
452 STO 13
453 250205
454 STO 12
455 149472.675
456 RCL 00
457 *
458 STO 06
459 48331
460 1186
461 XEQ 13
462 RTN
463 LBL 02
464 723.33
465 STO 09
466 677
467 STO 10
468 5
469 CHS
470 STO 14
471 3395
472 RCL 00
473 +
474 STO 11
475 1402
476 STO 15
477 131564
478 STO 13
479 181179
480 STO 12
481 58517.816
482 RCL 00
483 *
484 STO 06
485 76680
486 901
487 XEQ 13
488 RTN
489 LBL 04
490 RCL 00
491 20
492 *
493 18
494 -
495 COS
496 16
497 *
498 16105
499 RCL 00
500 *
501 48
502 +
503 COS
504 13070
505 RCL 00
506 *
507 12
508 -
509 COS
510 -
511 44
512 SQRT
513 *
514 +
515 RCL 00
516 2281
517 *
518 21
519 +
520 COS
521 RCL 00
522 32211
523 *
524 11
525 +
526 COS
527 -
528 4
529 *
530 +
531 3
532 -
533 STO 03
534 CLX
535 STO 04
536 STO 05
537 1523.7
538 STO 09
539 9340
540 STO 10
541 1850
542 STO 11
543 9
544 STO 14
545 -
546 STO 15
547 4829
548 CHS
549 STO 12
550 19140.299
551 RCL 00
552 *
553 STO 06
554 23940
555 CHS
556 STO 13
557 49558
558 772
559 XEQ 14
560 RTN
561 LBL 05
562 XEQ 12
563 RCL 11
564 15
565 +
566 COS
567 13
568 *
569 RCL 00
570 *
571 RCL 11
572 ST+ X
573 75
574 -
575 COS
576 RCL 06
577 RCL 09
578 +
579 RCL 10
580 +
581 60
582 +
583 COS
584 -
585 RCL 06
586 ST+ X
587 RCL 09
588 +
589 79
590 +
591 COS
592 -
593 RCL 09
594 RCL 07
595 -
596 76
597 -
598 COS
599 +
600 RCL 11
601 RCL 03
602 -
603 SIN
604 +
605 PI
606 *
607 +
608 RCL 07
609 COS
610 RCL 08
611 RCL 10
612 +
613 21
614 +
615 SIN
616 +
617 4
618 *
619 +
620 RCL 06
621 RCL 10
622 +
623 28
624 +
625 COS
626 RCL 10
627 RCL 07          
628 -
629 25
630 +
631 COS
632 +
633 5
634 *
635 -
636 RCL 11
637 RCL 06
638 -
639 STO 15
640 78
641 +
642 COS
643 16
644 *
645 -
646 RCL 08
647 73
648 +
649 COS
650 RCL 10
651 49
652 -
653 COS
654 -
655 509
656 SQRT
657 *
658 +
659 RCL 09
660 16
661 +
662 COS
663 37
664 *
665 -
666 RCL 06
667 RCL 11
668 +
669 29
670 +
671 STO 12
672 COS
673 42
674 *
675 -
676 RCL 08
677 ST+ X
678 57
679 +
680 COS
681 56
682 *
683 -
684 RCL 11
685 7.3
686 +
687 SIN
688 329
689 *
690 +
691 STO 03
692 RCL 15
693 18
694 -
695 COS
696 4
697 *
698 RCL 12
699 2
700 -
701 COS
702 5
703 *
704 -
705 STO 04
706 CLX
707 STO 05
708 5203
709 STO 09
710 1303
711 RCL 00
712 5
713 *
714 -
715 STO 11
716 4849
717 STO 10
718 16
719 STO 14
720 1613
721 STO 15
722 34310
723 STO 12
724 14331
725 STO 13
726 86133
727 +
728 1021
729 XEQ 14
730 RTN
731 LBL 06
732 XEQ 12
733 RCL 09
734 ST+ X
735 STO 14
736 50
737 -
738 COS
739 6
740 *
741 CHS
742 RCL 11
743 15
744 +
745 COS
746 32
747 *
748 -
749 RCL 00
750 *
751 RCL 06
752 14
753 +
754 COS
755 RCL 11
756 ST+ X
757 STO 15
758 RCL 03
759 -
760 61
761 -
762 COS
763 -
764 RCL 07
765 RCL 12
766 -
767 ST+ X
768 79
769 -
770 COS
771 -
772 RCL 11
773 RCL 07
774 ST+ X
775 -
776 COS
777 -
778 RCL 07
779 RCL 15
780 +
781 36
782 +
783 COS
784 +
785 RCL 07
786 59
787 +
788 COS
789 -
790 3
791 *
792 +
793 RCL 03
794 RCL 07
795 +
796 COS
797 6
798 *
799 -
800 RCL 03
801 17
802 +
803 COS
804 7
805 *
806 +
807 RCL 11
808 RCL 03
809 -
810 SIN
811 RCL 15
812 15
813 +
814 SIN
815 +
816 8
817 *
818 -
819 RCL 08
820 ST+ X
821 54
822 +
823 COS
824 RCL 08
825 29
826 -
827 COS
828 +
829 RCL 10
830 25
831 +
832 COS
833 +
834 9
835 *
836 +
837 RCL 09
838 RCL 07
839 -
840 STO 13          
841 ST+ 13
842 SIN
843 14
844 *
845 -
846 RCL 13
847 40
848 -
849 COS
850 45
851 *
852 -
853 RCL 09
854 14
855 +
856 COS
857 118
858 *
859 +
860 RCL 14
861 30
862 +
863 COS
864 228
865 *
866 +
867 RCL 11
868 7.2
869 +
870 SIN
871 810
872 *
873 -
874 STO 03
875 RCL 10
876 28
877 -
878 COS
879 6
880 *
881 RCL 11
882 SIN
883 4
884 *
885 -
886 RCL 14
887 33
888 +
889 COS
890 20
891 ST- 08
892 ST- 13
893 *
894 +
895 RCL 13
896 COS
897 18
898 *
899 -
900 STO 04
901 RCL 09
902 17
903 +
904 SIN
905 5
906 *
907 RCL 08
908 COS
909 8
910 *
911 +
912 RCL 14
913 60
914 -
915 COS
916 19
917 *
918 +
919 STO 05
920 RCL 07
921 STO 06
922 9543
923 STO 09
924 5553
925 STO 10
926 35
927 CHS
928 STO 14
929 2489
930 RCL 00
931 4
932 *
933 -
934 STO 11
935 1964
936 STO 15
937 50061
938 STO 12
939 93057
940 STO 13
941 20609
942 +
943 877
944 XEQ 14
945 RTN
946 LBL 07
947 XEQ 12
948 RCL 14
949 RCL 15
950 +
951 60
952 -
953 COS
954 4
955 *
956 RCL 07
957 RCL 12
958 -
959 28
960 +
961 COS
962 RCL 15
963 RCL 13
964 -
965 12
966 -
967 COS
968 -
969 6
970 *
971 +
972 RCL 11
973 RCL 03
974 -
975 SIN
976 7
977 *
978 +
979 RCL 14
980 9
981 +
982 SIN
983 10
984 *
985 -
986 RCL 12
987 RCL 15
988 +
989 70
990 +
991 COS
992 12
993 *
994 -
995 RCL 06
996 RCL 12
997 -
998 10
999 -
1000 COS
1001 RCL 04
1002 RCL 12
1003 +
1004 COS
1005 -
1006 15
1007 *
1008 +
1009 RCL 03
1010 17
1011 +
1012 COS
1013 RCL 04
1014 51
1015 ST- 03
1016 +
1017 COS
1018 +
1019 35
1020 *
1021 -
1022 RCL 13
1023 ST+ X
1024 STO 04
1025 11
1026 -
1027 COS
1028 RCL 03
1029 RCL 12
1030 +
1031 COS
1032 +
1033 40
1034 *
1035 +
1036 RCL 15
1037 71
1038 -
1039 COS
1040 209
1041 *
1042 -
1043 RCL 05
1044 27.8
1045 -
1046 COS
1047 858
1048 *
1049 -
1050 STO 03
1051 RCL 15        
1052 33
1053 +
1054 COS
1055 RCL 04
1056 SIN
1057 -
1058 6
1059 *
1060 STO 04
1061 RCL 15
1062 19
1063 +
1064 COS
1065 34
1066 *
1067 STO 05
1068 RCL 12
1069 STO 06
1070 19192
1071 STO 09
1072 45955
1073 CHS
1074 STO 12
1075 4630
1076 STO 10
1077 3
1078 CHS
1079 STO 14
1080 773
1081 RCL 00
1082 +
1083 STO 11
1084 1486
1085 STO 15
1086 172993
1087 STO 13
1088 74005
1089 521
1090 XEQ 14
1091 RTN
1092 LBL 08
1093 XEQ 12
1094 RCL 06
1095 RCL 13
1096 -
1097 COS
1098 9
1099 *
1100 RCL 15
1101 66
1102 -
1103 COS
1104 ST+ X
1105 -
1106 RCL 07
1107 RCL 13
1108 -
1109 16
1110 +
1111 COS
1112 RCL 05
1113 RCL 13
1114 -
1115 STO 06
1116 13
1117 -
1118 SIN
1119 -
1120 5
1121 *
1122 +
1123 RCL 15
1124 RCL 13
1125 -
1126 11
1127 -
1128 COS
1129 22
1130 *
1131 +
1132 RCL 04
1133 50
1134 +
1135 COS
1136 24
1137 *
1138 +
1139 RCL 14
1140 7
1141 +
1142 SIN
1143 71
1144 *
1145 +
1146 RCL 05
1147 27.8
1148 -
1149 COS
1150 584
1151 *
1152 +
1153 STO 03
1154 RCL 14
1155 54
1156 +
1157 SIN
1158 RCL 06
1159 21
1160 -
1161 COS
1162 +
1163 CHS
1164 9
1165 *
1166 STO 04
1167 RCL 14
1168 COS
1169 17
1170 *
1171 CHS
1172 STO 05
1173 RCL 13
1174 STO 06
1175 30070
1176 STO 09
1177 899
1178 STO 10
1179 CLX
1180 STO 14
1181 1770
1182 RCL 00
1183 9
1184 *
1185 -
1186 STO 11
1187 1426
1188 STO 15
1189 55654
1190 CHS
1191 STO 12
1192 48124
1193 STO 13
1194 83660
1195 +
1196 1102
1197 XEQ 14
1198 RTN
1199 LBL 09
1200 RCL 00
1201 2890
1202 *
1203 65
1204 +
1205 COS
1206 7
1207 *
1208 RCL 00
1209 1077
1210 *
1211 76
1212 +
1213 COS
1214 4
1215 *
1216 +
1217 STO 03
1218 RCL 00
1219 9
1220 *
1221 4
1222 -
1223 STO 04
1224 RCL 00
1225 ST+ X
1226 STO 05
1227 39489
1228 STO 09
1229 24900
1230 STO 10
1231 CLX
1232 STO 14
1233 17140
1234 STO 11
1235 224075
1236 STO 13
1237 238927
1238 STO 12
1239 145.17
1240 RCL 00
1241 *
1242 STO 06
1243 110307
1244 1397
1245 STO 15
1246 GTO 14
1247 LBL 12
1248 3034.906
1249 RCL 00
1250 *
1251 STO 06
1252 1222.114
1253 LASTX
1254 *
1255 STO 07
1256 -
1257 STO 08
1258 LASTX
1259 -
1260 STO 09
1261 RCL 08
1262 +
1263 STO 10
1264 RCL 07        
1265 ST+ X
1266 -
1267 STO 11
1268 428.467
1269 RCL 00
1270 *
1271 STO 12
1272 218.486
1273 LASTX
1274 *
1275 STO 13
1276 -
1277 STO 14
1278 ST+ X
1279 STO 15
1280 RCL 12
1281 -
1282 STO 05
1283 ST+ X
1284 STO 04
1285 RCL 07
1286 RCL 12
1287 3
1288 *
1289 -
1290 STO 03
1291 RTN
1292 LBL 13
1293 0
1294 STO 03
1295 STO 04
1296 STO 05
1297 RDN
1298 LBL 14
1299 RCL 00
1300 ST* 14
1301 ST* 15
1302 *
1303 +
1304 X<> 14
1305 ST+ 10
1306  E5
1307 ST/ 10
1308 9
1309 STO 08
1310 RCL 06
1311 RCL 12
1312 RCL 13
1313 RCL 15
1314 +
1315  E3
1316 ST/ 03
1317 ST/ 04
1318 ST/ 05
1319 ST/ 09
1320 ST/ 11
1321 ST/ 14
1322 ST/ Z
1323 /
1324 STO 13
1325 -
1326 +
1327 RCL 00
1328 1.397
1329 *
1330 +
1331 360
1332 MOD
1333 ENTER
1334 ENTER
1335 LBL 11
1336 SIN
1337 RCL 10
1338 R-D
1339 *
1340 +
1341 DSE 08
1342 GTO 11
1343 STO 15
1344 2
1345 /
1346 TAN
1347 RCL 10
1348 1
1349 ST+ Y
1350 RCL 10
1351 -
1352 /
1353 SQRT
1354 *
1355 ATAN
1356 ST+ X
1357 1
1358 RCL 15
1359 COS
1360 RCL 10
1361 *
1362 -
1363 RCL 09
1364 *
1365 RCL 05
1366 +
1367 STO 10
1368 CLX
1369 RCL 14
1370 -
1371 RCL 13
1372 +
1373 COS
1374 RCL 11
1375 LASTX
1376 SIN
1377 P-R
1378 X<>Y
1379 ASIN
1380 RCL 04
1381 +
1382 STO 09
1383 X<> Z
1384 R-P
1385 CLX
1386 RCL 14
1387 +
1388 RCL 03
1389 +
1390 STO 08
1391 RCL 10
1392 XEQ 10
1393 RCL 02
1394 ST+ Z
1395 CLX
1396 RCL 01
1397 +
1398 XEQ 12
1399 STO 05
1400 RDN
1401 STO 03
1402 X<>Y
1403 STO 04
1404 LBL 00
1405 RCL 00
1406 77
1407 /
1408 549.4
1409 SQRT
1410 -
1411 RCL 04
1412 RCL 03
1413 XEQ 13
1414 STO 06
1415 X<>Y
1416 STO 07
1417 RCL 17
1418 HR
1419 90
1420 STO 11
1421 -
1422 RCL 07
1423 LASTX
1424 RCL 06
1425 +
1426 RCL 19
1427 -
1428 XEQ 13
1429 ST- 11
1430 X<>Y
1431 ENTER
1432 COS
1433 RCL 05
1434 409
1435 *
1436 /
1437 -
1438 STO 12
1439 19.272
1440 RCL 12
1441 6.942
1442 +
1443 /
1444 +
1445 5.459
1446 X<>Y
1447 /
1448 +
1449 TAN
1450 1/X
1451 62.6
1452 /
1453 +
1454 STO 13
1455 X<>Y
1456 RCL 11        
1457 RTN
1458 LBL 13
1459 1
1460 XEQ 10
1461 RDN
1462 R-P
1463 X<> Z
1464 ST- Y
1465 X<> Z
1466 P-R
1467 R^
1468 XEQ 12
1469 RDN
1470 RTN
1471 LBL 10
1472 X<>Y
1473 RDN
1474 P-R
1475 R^
1476 X<>Y
1477 P-R
1478 RTN
1479 LBL 12
1480 R-P
1481 X<>Y
1482 RDN
1483 R-P
1484 R^
1485 X<>Y
1486 END
 
 
    ( 2193 bytes / SIZE 020 )
 

    STACK         INPUT                      OUTPUTS
        Z              /             h0 = apparent altitude  ( deg )
        Y    YYYY.MNDD             h  = true altitude  ( deg )
        X     hh.mnss (UT)             Az = Azimuth  ( deg )
 

   YYYY.MNDD   ENTER^
        hh.mnss          XEQ "EPH"   returns the azimuthal coordinates of the Sun.

-Then  R/S  or  XEQ 03   gives the coordinates of the Moon
-Then  R/S  or  XEQ 01   ------------------------  Mercury
     ............................................................................
-Then  R/S  or  XEQ 09   ------------------------- Pluto.


Notes:

-Approximate correction for aberration may be computed:

  1°)  Replace line 77 ( RCL 03 )  with  RCL 20
  2°)  Replace lines 1401 to 1403 with:

  1401 STO 03
  1402 STO 20
  1403 X<>Y
  1404 STO 04
  1405 RCL 10
  1406 ENTER
  1407 SQRT
  1408 *
  1409 1/X
  1410 RCL 10
  1411 X^2
  1412 1
  1413 -
  1414 RCL 05
  1415 X^2
  1416 ST+ Y
  1417 ST+ X
  1418 /
  1419 ST* Y
  1420 -
  1421 RCL 05
  1422 176
  1423 /
  1424 ST* Y
  1425 +
  1426 ST- 03

->  ( 1509 lines / 2225 bytes / SIZE 021 )


-This program may be stored in an HEPAX or NoVRAM module.
-Otherwise, several lines must be deleted to be executed in main memory.

-Another alternative is to store a part of this program in extended memory...



     b)  Program#2  ( 2028 bytes )


-Here is a simplified version.
-Refraction is not computed
-Parallax is only taken into account for the Moon ( and not stored in any register )



Registers
 

 R00 = Time from 2000/01/01 0h TT ( unit = 100 Julian years )                         ( Registers R16-R17-R18 are to be initialized before executing "EPH" )

 R01 = X   Rectangular
 R02 = Y   coordinates of the Sun,

 R03 = Geocentric longitude ( deg )
 R04 = Geocentric latitude ( deg )
 R05 = Distance Earth-Planet ( AU )  ( except for the Moon )

 R06 = Right-ascension ( deg )
 R07 = Declination ( deg )

 R08 = Heliocentric longitude ( deg )
 R09 = Heliocentric latitude ( deg )
 R10 = Radius vector ( AU )

 R11 = Azimuth ( deg )  ( reckoned clockwise from South )
 R12 = height ( deg )

 R13-R14-R15: temp                            

•  R16 = Longitude of the observer ( ° ' " )  positive East
•  R17 = Latitude of the observer ( ° ' " )
•  R18 = DeltaT = TT - UT ( seconds )

  R19 = local true sidereal time ( deg )

Flags: /
Subroutine:   "J" or "J1"  ( cf "Julian & Gregorian Calendars for the HP-41" )

-With an HP41CX or a TIME module, lines 07-08 may be replaced by  1.012  DDAYS  -


 01 LBL "EPH"
 02 HR
 03 STO 15
 04 24
 05 /
 06 X<>Y
 07 XEQ "J"
 08 +
 09 36525
 10 /
 11 STO 00
 12 35999.373
 13 STO 06
 14 1.397
 15 +
 16 *
 17 99.9678
 18 +
 19 RCL 15
 20 15
 21 *
 22 +
 23 RCL 16
 24 HR
 25 +
 26 STO 19
 27 RCL 18
 28 315576 E4
 29 /
 30 ST+ 00
 31  E3
 32 STO 09
 33 1671
 34 STO 10
 35 48
 36 +
 37 STO 15
 38 4
 39 CHS
 40 STO 14
 41 80026
 42 CHS
 43 STO 12
 44 2963
 45 +
 46 STO 13
 47 RCL 00
 48 ST* 06
 49 445267
 50 *
 51 68
 52 -
 53 SIN
 54 RCL 00
 55 20
 56 *
 57 18
 58 -
 59 COS
 60 -
 61 RCL 00
 62 32964
 63 *
 64 22
 65 -
 66 COS
 67 -
 68 ST+ X
 69 STO 03
 70 CLST
 71 STO 01
 72 STO 02
 73 STO 04
 74 STO 05
 75 STO 11
 76 XEQ 14
 77 RCL 03
 78 RCL 05
 79 P-R
 80 STO 01
 81 X<>Y
 82 STO 02
 83 RCL 12
 84 RCL 11
 85 RTN
 86 LBL 03
 87 RCL 00
 88 RCL 00
 89 3599905
 90 %
 91 2.96
 92 -
 93 STO 12
 94 STO 11
 95 CLX
 96 44526711
 97 %
 98 68.25
 99 -
100 STO 13
101 ST+ X
102 STO 14
103 STO 03
104 STO 10
105 ST- 11
106 CLX
107 47719887
108 +
109 %
110 128.43
111 +
112 STO 07
113 ST- 03
114 ST+ 10
115 ST+ X
116 STO 08
117 CLX
118 48320202
119 %
120 86.66
121 +
122 STO 09
123 ST+ X
124 STO 06
125 60
126 RCL 07
127 COS
128 PI
129 *
130 -
131 1/X
132 ASIN
133 STO 05
134 RCL 07
135 RCL 09
136 +
137 SIN
138 281
139 *
140 RCL 07
141 RCL 09
142 -
143 SIN
144 278
145 *
146 +
147 RCL 14
148 RCL 09
149 -
150 SIN
151 173
152 *
153 +
154 RCL 03
155 RCL 09
156 +
157 SIN
158 55
159 *
160 +
161 RCL 03
162 RCL 09
163 -
164 SIN
165 46
166 *
167 +
168 RCL 09
169 RCL 14
170 +
171 SIN
172 33
173 *
174 +
175 RCL 08
176 RCL 09
177 +
178 SIN
179 17
180 *
181 +
182 RCL 10
183 RCL 09
184 -
185 SIN
186 RCL 08          
187 RCL 09
188 -
189 SIN
190 +
191 9
192 *
193 +
194 RCL 09
195 RCL 11
196 +
197 SIN
198 RCL 09
199 SIN
200 641
201 *
202 -
203 8
204 *
205 -
206 STO 04
207 RCL 07
208 SIN
209 6289
210 *
211 RCL 14
212 SIN
213 658
214 *
215 +
216 RCL 08
217 SIN
218 214
219 *
220 +
221 RCL 06
222 SIN
223 114
224 *
225 -
226 RCL 14
227 RCL 08
228 -
229 SIN
230 59
231 *
232 +
233 RCL 03
234 RCL 12
235 -
236 SIN
237 57
238 *
239 +
240 RCL 10
241 SIN
242 53
243 *
244 +
245 RCL 11
246 SIN
247 46
248 *
249 -
250 RCL 12
251 RCL 07
252 -
253 SIN
254 41
255 *
256 -
257 RCL 03
258 SIN
259 98
260 *
261 RCL 06
262 RCL 07
263 +
264 SIN
265 -
266 13
267 *
268 +
269 RCL 07
270 RCL 06
271 -
272 SIN
273 RCL 14
274 ST+ X
275 RCL 07
276 -
277 SIN
278 +
279 11
280 *
281 +
282 RCL 03
283 ST+ X
284 SIN
285 9
286 *
287 +
288 RCL 03
289 RCL 12
290 +
291 SIN
292 8
293 *
294 -
295 RCL 12
296 RCL 14
297 +
298 SIN
299 7
300 *
301 -
302 RCL 12
303 SIN
304 37
305 *
306 RCL 13
307 SIN
308 7
309 *
310 +
311 RCL 07
312 RCL 12
313 +
314 SIN
315 6
316 *
317 +
318 RCL 14
319 RCL 06
320 -
321 SIN
322 3
323 *
324 -
325 RCL 07
326 RCL 08
327 +
328 SIN
329 ST+ X
330 -
331 RCL 13
332 RCL 07
333 -
334 SIN
335 +
336 RCL 12
337 RCL 13
338 +
339 SIN
340 -
341 5
342 *
343 -
344 481267881
345 RCL 00
346 ST+ X
347 -
348 RCL 00
349 *
350 211728
351 +
352 +
353  E3
354 ST/ 04
355 /
356 360
357 MOD
358 STO 03
359 XEQ 00
360 X<>Y
361 ENTER
362 COS
363 RCL 05
364 *
365 -
366 X<>Y
367 RTN
368 LBL 01
369 387.1
370 STO 09
371 20563
372 STO 10
373 7005
374 RCL 00
375 2
376 STO 14
377 *
378 +
379 STO 11          
380 1556
381 STO 15
382 77456
383 STO 13
384 250205
385 STO 12
386 149472.675
387 RCL 00
388 *
389 STO 06
390 48331
391 1186
392 XEQ 13
393 RTN
394 LBL 02
395 723.33
396 STO 09
397 677
398 STO 10
399 5
400 CHS
401 STO 14
402 3395
403 RCL 00
404 +
405 STO 11
406 1402
407 STO 15
408 131564
409 STO 13
410 181179
411 STO 12
412 58517.816
413 RCL 00
414 *
415 STO 06
416 76680
417 901
418 XEQ 13
419 RTN
420 LBL 04
421 RCL 00
422 20
423 *
424 18
425 -
426 COS
427 16
428 *
429 16105
430 RCL 00
431 *
432 48
433 +
434 COS
435 13070
436 RCL 00
437 *
438 12
439 -
440 COS
441 -
442 44
443 SQRT
444 *
445 +
446 RCL 00
447 2281
448 *
449 21
450 +
451 COS
452 RCL 00
453 32211
454 *
455 11
456 +
457 COS
458 -
459 4
460 *
461 +
462 3
463 -
464 STO 03
465 CLX
466 STO 04
467 STO 05
468 1523.7
469 STO 09
470 9340
471 STO 10
472 1850
473 STO 11
474 9
475 STO 14
476 -
477 STO 15
478 4829
479 CHS
480 STO 12
481 19140.299
482 RCL 00
483 *
484 STO 06
485 23940
486 CHS
487 STO 13
488 49558
489 772
490 XEQ 14
491 RTN
492 LBL 05
493 XEQ 12
494 RCL 11
495 15
496 +
497 COS
498 13
499 *
500 RCL 00
501 *
502 RCL 11
503 ST+ X
504 75
505 -
506 COS
507 RCL 06
508 RCL 09
509 +
510 RCL 10
511 +
512 60
513 +
514 COS
515 -
516 RCL 06
517 ST+ X
518 RCL 09
519 +
520 79
521 +
522 COS
523 -
524 PI
525 *
526 +
527 RCL 07
528 COS
529 RCL 08
530 RCL 10
531 +
532 21
533 +
534 SIN
535 +
536 4
537 *
538 +
539 RCL 06
540 RCL 10
541 +
542 28
543 +
544 COS
545 RCL 10
546 RCL 07
547 -
548 25
549 +
550 COS
551 +
552 5
553 *
554 -
555 RCL 11
556 RCL 06
557 -
558 78
559 +
560 COS
561 16
562 *
563 -
564 RCL 08
565 73
566 +
567 COS
568 RCL 10          
569 49
570 -
571 COS
572 -
573 509
574 SQRT
575 *
576 +
577 RCL 09
578 16
579 +
580 COS
581 37
582 *
583 -
584 RCL 06
585 RCL 11
586 +
587 29
588 +
589 STO 12
590 COS
591 42
592 *
593 -
594 RCL 08
595 ST+ X
596 57
597 +
598 COS
599 56
600 *
601 -
602 RCL 11
603 7.3
604 +
605 SIN
606 329
607 *
608 +
609 STO 03
610 RCL 12
611 COS
612 5
613 *
614 CHS
615 STO 04
616 CLX
617 STO 05
618 5203
619 STO 09
620 1303
621 RCL 00
622 5
623 *
624 -
625 STO 11
626 4849
627 STO 10
628 16
629 STO 14
630 1613
631 STO 15
632 34310
633 STO 12
634 14331
635 STO 13
636 86133
637 +
638 1021
639 XEQ 14
640 RTN
641 LBL 06
642 XEQ 12
643 RCL 09
644 ST+ X
645 STO 14
646 50
647 -
648 COS
649 6
650 *
651 CHS
652 RCL 11
653 15
654 +
655 COS
656 32
657 *
658 -
659 RCL 00
660 *
661 RCL 06
662 14
663 +
664 COS
665 RCL 11
666 ST+ X
667 STO 15
668 RCL 03
669 -
670 61
671 -
672 COS
673 -
674 RCL 07
675 RCL 12
676 -
677 ST+ X
678 79
679 -
680 COS
681 -
682 RCL 07
683 59
684 +
685 COS
686 -
687 PI
688 *
689 +
690 RCL 03
691 RCL 07
692 +
693 COS
694 6
695 *
696 -
697 RCL 03
698 17
699 +
700 COS
701 7
702 *
703 +
704 RCL 11
705 RCL 03
706 -
707 SIN
708 RCL 15
709 15
710 +
711 SIN
712 +
713 8
714 *
715 -
716 RCL 08
717 ST+ X
718 54
719 +
720 COS
721 RCL 08
722 29
723 -
724 COS
725 +
726 RCL 10
727 25
728 +
729 COS
730 +
731 9
732 *
733 +
734 RCL 09
735 RCL 07
736 -
737 STO 13
738 ST+ 13
739 SIN
740 14
741 *
742 -
743 RCL 13
744 40
745 -
746 COS
747 45
748 *
749 -
750 RCL 09
751 14
752 +
753 COS
754 118
755 *
756 +
757 RCL 14
758 30
759 +
760 COS
761 228
762 *
763 +
764 RCL 11          
765 7.2
766 +
767 SIN
768 810
769 *
770 -
771 STO 03
772 RCL 10
773 28
774 -
775 COS
776 6
777 *
778 RCL 11
779 SIN
780 4
781 *
782 -
783 RCL 14
784 33
785 +
786 COS
787 20
788 ST- 08
789 ST- 13
790 *
791 +
792 RCL 13
793 COS
794 18
795 *
796 -
797 STO 04
798 RCL 09
799 17
800 +
801 SIN
802 5
803 *
804 RCL 08
805 COS
806 8
807 *
808 +
809 RCL 14
810 60
811 -
812 COS
813 19
814 *
815 +
816 STO 05
817 RCL 07
818 STO 06
819 9543
820 STO 09
821 5553
822 STO 10
823 35
824 CHS
825 STO 14
826 2489
827 RCL 00
828 4
829 *
830 -
831 STO 11
832 1964
833 STO 15
834 50061
835 STO 12
836 93057
837 STO 13
838 20609
839 +
840 877
841 XEQ 14
842 RTN
843 LBL 07
844 XEQ 12
845 RCL 14
846 RCL 15
847 +
848 60
849 -
850 COS
851 4
852 *
853 RCL 07
854 RCL 12
855 -
856 28
857 +
858 COS
859 RCL 15
860 RCL 13
861 -
862 12
863 -
864 COS
865 -
866 6
867 *
868 +
869 RCL 11
870 RCL 03
871 -
872 SIN
873 7
874 *
875 +
876 RCL 14
877 9
878 +
879 SIN
880 10
881 *
882 -
883 RCL 12
884 RCL 15
885 +
886 70
887 +
888 COS
889 12
890 *
891 -
892 RCL 06
893 RCL 12
894 -
895 10
896 -
897 COS
898 RCL 04
899 RCL 12
900 +
901 COS
902 -
903 15
904 *
905 +
906 RCL 03
907 17
908 +
909 COS
910 RCL 04
911 51
912 ST- 03
913 +
914 COS
915 +
916 35
917 *
918 -
919 RCL 13
920 ST+ X
921 STO 04
922 11
923 -
924 COS
925 RCL 03
926 RCL 12
927 +
928 COS
929 +
930 40
931 *
932 +
933 RCL 15
934 71
935 -
936 COS
937 209
938 *
939 -
940 RCL 05
941 27.8
942 -
943 COS
944 858
945 *
946 -
947 STO 03
948 RCL 15
949 33
950 +
951 COS
952 RCL 04
953 SIN
954 -
955 6
956 *
957 STO 04          
958 RCL 15
959 19
960 +
961 COS
962 34
963 *
964 STO 05
965 RCL 12
966 STO 06
967 19192
968 STO 09
969 45955
970 CHS
971 STO 12
972 4630
973 STO 10
974 3
975 CHS
976 STO 14
977 773
978 RCL 00
979 +
980 STO 11
981 1486
982 STO 15
983 172993
984 STO 13
985 74005
986 521
987 XEQ 14
988 RTN
989 LBL 08
990 XEQ 12
991 RCL 06
992 RCL 13
993 -
994 COS
995 9
996 *
997 RCL 07
998 RCL 13
999 -
1000 16
1001 +
1002 COS
1003 RCL 05
1004 RCL 13
1005 -
1006 STO 06
1007 13
1008 -
1009 SIN
1010 -
1011 5
1012 *
1013 +
1014 RCL 15
1015 RCL 13
1016 -
1017 11
1018 -
1019 COS
1020 22
1021 *
1022 +
1023 RCL 04
1024 50
1025 +
1026 COS
1027 24
1028 *
1029 +
1030 RCL 14
1031 7
1032 +
1033 SIN
1034 71
1035 *
1036 +
1037 RCL 05
1038 27.8
1039 -
1040 COS
1041 584
1042 *
1043 +
1044 STO 03
1045 RCL 14
1046 54
1047 +
1048 SIN
1049 RCL 06
1050 21
1051 -
1052 COS
1053 +
1054 CHS
1055 9
1056 *
1057 STO 04
1058 RCL 14
1059 COS
1060 17
1061 *
1062 CHS
1063 STO 05
1064 RCL 13
1065 STO 06
1066 30070
1067 STO 09
1068 899
1069 STO 10
1070 CLX
1071 STO 14
1072 1770
1073 RCL 00
1074 9
1075 *
1076 -
1077 STO 11
1078 1426
1079 STO 15
1080 55654
1081 CHS
1082 STO 12
1083 48124
1084 STO 13
1085 83660
1086 +
1087 1102
1088 XEQ 14
1089 RTN
1090 LBL 09
1091 RCL 00
1092 2890
1093 *
1094 65
1095 +
1096 COS
1097 7
1098 *
1099 RCL 00
1100 1077
1101 *
1102 76
1103 +
1104 COS
1105 4
1106 *
1107 +
1108 STO 03
1109 RCL 00
1110 9
1111 *
1112 4
1113 -
1114 STO 04
1115 RCL 00
1116 ST+ X
1117 STO 05
1118 39489
1119 STO 09
1120 24900
1121 STO 10
1122 CLX
1123 STO 14
1124 17140
1125 STO 11
1126 224075
1127 STO 13
1128 238927
1129 STO 12
1130 145.17
1131 RCL 00
1132 *
1133 STO 06
1134 110307
1135 1397
1136 STO 15
1137 GTO 14
1138 LBL 12
1139 3034.906
1140 RCL 00
1141 *
1142 STO 06
1143 1222.114
1144 LASTX
1145 *
1146 STO 07        
1147 -
1148 STO 08
1149 LASTX
1150 -
1151 STO 09
1152 RCL 08
1153 +
1154 STO 10
1155 RCL 07
1156 ST+ X
1157 -
1158 STO 11
1159 428.467
1160 RCL 00
1161 *
1162 STO 12
1163 218.486
1164 LASTX
1165 *
1166 STO 13
1167 -
1168 STO 14
1169 ST+ X
1170 STO 15
1171 RCL 12
1172 -
1173 STO 05
1174 ST+ X
1175 STO 04
1176 RCL 07
1177 RCL 12
1178 3
1179 *
1180 -
1181 STO 03
1182 RTN
1183 LBL 13
1184 0
1185 STO 03
1186 STO 04
1187 STO 05
1188 RDN
1189 LBL 14
1190 RCL 00
1191 ST* 14
1192 ST* 15
1193 *
1194 +
1195 X<> 14
1196 ST+ 10
1197  E5
1198 ST/ 10
1199 9
1200 STO 08
1201 RCL 06
1202 RCL 12
1203 RCL 13
1204 RCL 15
1205 +
1206  E3
1207 ST/ 03
1208 ST/ 04
1209 ST/ 05
1210 ST/ 09
1211 ST/ 11
1212 ST/ 14
1213 ST/ Z
1214 /
1215 STO 13
1216 -
1217 +
1218 RCL 00
1219 1.397
1220 *
1221 +
1222 360
1223 MOD
1224 ENTER
1225 ENTER
1226 LBL 11
1227 SIN
1228 RCL 10
1229 R-D
1230 *
1231 +
1232 DSE 08
1233 GTO 11
1234 STO 15
1235 2
1236 /
1237 TAN
1238 RCL 10
1239 1
1240 ST+ Y
1241 RCL 10
1242 -
1243 /
1244 SQRT
1245 *
1246 ATAN
1247 ST+ X
1248 1
1249 RCL 15
1250 COS
1251 RCL 10
1252 *
1253 -
1254 RCL 09
1255 *
1256 RCL 05
1257 +
1258 STO 10
1259 CLX
1260 RCL 14
1261 -
1262 RCL 13
1263 +
1264 COS
1265 RCL 11
1266 LASTX
1267 SIN
1268 P-R
1269 X<>Y
1270 ASIN
1271 RCL 04
1272 +
1273 STO 09
1274 X<> Z
1275 R-P
1276 CLX
1277 RCL 14
1278 +
1279 RCL 03
1280 +
1281 STO 08
1282 RCL 10
1283 XEQ 10
1284 RCL 02
1285 ST+ Z
1286 CLX
1287 RCL 01
1288 +
1289 XEQ 12
1290 STO 05
1291 RDN
1292 STO 03
1293 X<>Y
1294 STO 04
1295 LBL 00
1296 RCL 00
1297 77
1298 /
1299 549.4
1300 SQRT
1301 -
1302 RCL 04
1303 RCL 03
1304 XEQ 13
1305 STO 06
1306 X<>Y
1307 STO 07
1308 RCL 17
1309 HR
1310 90
1311 STO 11
1312 -
1313 RCL 07
1314 LASTX
1315 RCL 06
1316 +
1317 RCL 19        
1318 -
1319 XEQ 13
1320 ST- 11
1321 X<>Y
1322 STO 12
1323 RCL 11
1324 RTN
1325 LBL 13
1326 1
1327 XEQ 10
1328 RDN
1329 R-P
1330 X<> Z
1331 ST- Y
1332 X<> Z
1333 P-R
1334 R^
1335 XEQ 12
1336 RDN
1337 RTN
1338 LBL 10
1339 X<>Y
1340 RDN
1341 P-R
1342 R^
1343 X<>Y
1344 P-R
1345 RTN
1346 LBL 12
1347 R-P
1348 X<>Y
1349 RDN
1350 R-P
1351 R^
1352 X<>Y
1353 END
 
 
    ( 2028 bytes / SIZE 020 )
 

     STACK           INPUTS                      OUTPUTS
          Y      YYYY.MNDD             h  = true altitude  ( deg )
          X        hh.mnss (UT)             Az = Azimuth  ( deg )
 

   YYYY.MNDD   ENTER^
        hh.mnss          XEQ "EPH"   returns the azimuthal coordinates of the Sun.

-Then  R/S  or  XEQ 03   gives the coordinates of the Moon
-Then  R/S  or  XEQ 01   ------------------------  Mercury
     ............................................................................
-Then  R/S  or  XEQ 09   ------------------------- Pluto.



     c)  Program#3 ( 1803 bytes )


-Here is a small improvement of the program listed in §2°)a)
-With coefficients >= 0°005


Registers
 

 R00 = Time from 2000/01/01 0h TT ( unit = 100 Julian years )            ( Registers R16-R17-R18 are to be initialized before executing "EPH" )

 R01 = X   Rectangular
 R02 = Y   coordinates of the Sun,

 R03 = Geocentric longitude ( deg )
 R04 = Geocentric latitude ( deg )
 R05 = Distance Earth-Planet ( AU )

 R06 = Heliocentric longitude ( deg )
 R07 = Heliocentric latitude ( deg )
 R08 = Radius vector ( AU )

 R09 = Right-ascension ( deg )
 R10 = Declination ( deg )

 R11 = Azimuth ( deg )  ( reckoned clockwise from South )
 R12 = height ( deg )
 R13 = height corrected for refraction ( deg )

 R14 & R15: temp                            

•  R16 = Longitude of the observer ( ° ' " )  positive East
•  R17 = Latitude of the observer ( ° ' " )
•  R18 = DeltaT = TT - UT ( seconds )

  R19 = local true sidereal time ( deg )

Flags: /
Subroutine:   "J" or "J1"  ( cf "Julian & Gregorian Calendars for the HP-41" )

-With an HP41CX or a TIME module, lines 07-08 may be replaced by  1.012  DDAYS  -


 01 LBL "EPH"
 02 DEG
 03 HR
 04 STO 15
 05 24
 06 /
 07 X<>Y
 08 XEQ "J"
 09 +
 10 36525
 11 /
 12 STO 00
 13 36000770
 14 STO 06
 15 *
 16  E3
 17 STO 09
 18 /
 19 99.9678
 20 +
 21 RCL 15
 22 15
 23 *
 24 +
 25 RCL 16
 26 HR
 27 +
 28 STO 19
 29 RCL 18
 30 315576 E4
 31 /
 32 ST+ 00
 33 1671
 34 STO 10
 35 48
 36 +
 37 STO 15
 38 80026
 39 CHS
 40 STO 12
 41 77063
 42 CHS
 43 STO 13
 44 CLST
 45 STO 01
 46 STO 02
 47 STO 11
 48 XEQ 13
 49 RCL 03
 50 RCL 05
 51 P-R
 52 STO 01
 53 X<>Y
 54 STO 02
 55 RCL 13
 56 RCL 12
 57 RCL 11
 58 RTN
 59 LBL 03
 60 RCL 00
 61 3599905
 62 %
 63 2.96
 64 -
 65 STO 12
 66 RCL 00
 67 44526711
 68 %
 69 68.25
 70 -
 71 STO 13
 72 ST+ X
 73 STO 03
 74 STO 14
 75 RCL 00
 76 47719887
 77 %
 78 128.43
 79 +
 80 STO 07
 81 ST- 03
 82 ST+ X
 83 STO 08
 84 RCL 00
 85 48320202
 86 %
 87 86.66
 88 +
 89 STO 09
 90 ST+ X
 91 STO 06
 92 2574
 93 RCL 07
 94 COS
 95 28
 96 *
 97 RCL 03
 98 COS
 99 5
100 *
101 +
102 RCL 14
103 COS
104 4
105 *
106 +
107 5
108 *
109 -
110  E6
111 /
112 STO 05
113 RCL 07
114 RCL 09
115 +
116 SIN
117 281
118 *
119 RCL 07
120 RCL 09
121 -
122 STO 04
123 SIN
124 278
125 *
126 +
127 RCL 14
128 RCL 09
129 -
130 SIN
131 173
132 *
133 +
134 RCL 03
135 RCL 09
136 +
137 SIN
138 55
139 *
140 +
141 RCL 03
142 RCL 09
143 -
144 SIN
145 46
146 *
147 +
148 RCL 09
149 RCL 14
150 +
151 SIN
152 33
153 *
154 +
155 RCL 08
156 RCL 09          
157 +
158 SIN
159 17
160 *
161 +
162 RCL 04
163 RCL 14
164 +
165 SIN
166 RCL 08
167 RCL 09
168 -
169 SIN
170 +
171 9
172 *
173 +
174 RCL 09
175 SIN
176 5128
177 *
178 +
179 STO 04
180 RCL 07
181 SIN
182 6289
183 *
184 RCL 14
185 SIN
186 658
187 *
188 +
189 RCL 08
190 SIN
191 214
192 *
193 +
194 RCL 06
195 SIN
196 114
197 *
198 -
199 RCL 14
200 RCL 08
201 -
202 SIN
203 59
204 *
205 +
206 RCL 03
207 RCL 12
208 -
209 SIN
210 57
211 *
212 +
213 RCL 07
214 RCL 14
215 +
216 STO 10
217 SIN
218 53
219 *
220 +
221 RCL 14
222 RCL 12
223 -
224 STO 11
225 SIN
226 46
227 *
228 +
229 RCL 12
230 RCL 07
231 -
232 SIN
233 41
234 *
235 -
236 RCL 03
237 SIN
238 98
239 *
240 RCL 06
241 RCL 07
242 +
243 SIN
244 -
245 13
246 *
247 +
248 RCL 07
249 RCL 06
250 -
251 SIN
252 RCL 14
253 ST+ X
254 RCL 07
255 -
256 SIN
257 +
258 11
259 *
260 +
261 RCL 12
262 SIN
263 37
264 *
265 RCL 13
266 SIN
267 7
268 *
269 +
270 RCL 07
271 RCL 12
272 +
273 SIN
274 6
275 *
276 +
277 RCL 14
278 RCL 06
279 -
280 SIN
281 3
282 *
283 -
284 RCL 07
285 RCL 08
286 +
287 SIN
288 ST+ X
289 -
290 5
291 *
292 -
293 RCL 03
294 ST+ X
295 SIN
296 9
297 *
298 +
299 RCL 03
300 RCL 12
301 +
302 SIN
303 8
304 *
305 -
306 RCL 12
307 RCL 14
308 +
309 SIN
310 7
311 *
312 -
313 RCL 12
314 RCL 13
315 +
316 SIN
317 RCL 13          
318 RCL 07
319 -
320 SIN
321 -
322 5
323 *
324 +
325 481267881
326 RCL 00
327 *
328 211728
329 +
330 +
331  E3
332 ST/ 04
333 /
334 360
335 MOD
336 STO 03
337 XEQ 00
338 RTN
339 LBL 01
340 387.1
341 STO 09
342 20563
343 STO 10
344 7005
345 STO 11
346 1556
347 STO 15
348 77456
349 STO 13
350 250205
351 STO 12
352 149474072
353 STO 06
354 48331
355 1186
356 XEQ 13
357 RTN
358 LBL 02
359 723.3
360 STO 09
361 677
362 STO 10
363 3395
364 STO 11
365 1402
366 STO 15
367 131564
368 STO 13
369 181179
370 STO 12
371 58519213
372 STO 06
373 76680
374 901
375 XEQ 13
376 RTN
377 LBL 04
378 XEQ 12
379 RCL 15
380 10
381 *
382 18
383 -
384 COS
385 16
386 *
387 RCL 09
388 22
389 *
390 RCL 03
391 +
392 ST+ 06
393 12
394 -
395 COS
396 6
397 *
398 -
399 RCL 06
400 49
401 +
402 COS
403 7
404 *
405 +
406 STO 03
407 CLX
408 STO 04
409 STO 05
410 1523.7
411 STO 09
412 9340
413 STO 10
414 1850
415 STO 11
416 9
417 -
418 STO 15
419 4829
420 CHS
421 STO 12
422 19141696
423 STO 06
424 23940
425 CHS
426 STO 13
427 49558
428 772
429 XEQ 14
430 RTN
431 LBL 05
432 XEQ 12
433 RCL 08
434 73
435 +
436 COS
437 RCL 10
438 RCL 07
439 -
440 41
441 +
442 SIN
443 -
444 509
445 SQRT
446 *
447 RCL 06
448 RCL 11
449 +
450 12
451 +
452 SIN
453 16
454 *
455 -
456 RCL 08
457 3
458 *
459 28
460 +
461 COS
462 RCL 09
463 ST+ X
464 25
465 +
466 COS
467 +
468 5
469 *
470 -
471 RCL 09
472 75
473 -
474 SIN
475 37
476 *
477 +
478 RCL 06
479 RCL 11
480 -
481 61
482 -
483 SIN
484 42
485 *
486 +
487 RCL 10          
488 33
489 -
490 SIN
491 56
492 *
493 +
494 RCL 11
495 7
496 -
497 SIN
498 329
499 *
500 -
501 STO 03
502 CLX
503 STO 04
504 STO 05
505 5203
506 STO 09
507 1303
508 STO 11
509 4849
510 STO 10
511 1613
512 STO 15
513 34310
514 STO 12
515 3036303
516 STO 06
517 14331
518 STO 13
519 86133
520 +
521 1021
522 XEQ 14
523 RTN
524 LBL 06
525 XEQ 12
526 RCL 08
527 30
528 -
529 COS
530 RCL 10
531 54
532 +
533 COS
534 +
535 RCL 06
536 RCL 09
537 RCL 11
538 +
539 STO 13
540 -
541 25
542 +
543 COS
544 +
545 9
546 *
547 RCL 03
548 21
549 -
550 COS
551 RCL 11
552 ST+ X
553 75
554 +
555 COS
556 -
557 RCL 04
558 RCL 05
559 +
560 SIN
561 -
562 8
563 *
564 +
565 RCL 07
566 RCL 03
567 -
568 COS
569 RCL 08
570 RCL 04
571 -
572 RCL 14
573 -
574 79
575 -
576 COS
577 +
578 6
579 *
580 -
581 RCL 13
582 SIN
583 14
584 *
585 +
586 RCL 11
587 32
588 -
589 COS
590 10
591 *
592 RCL 00
593 *
594 -
595 RCL 07
596 RCL 11
597 +
598 STO 04
599 50
600 -
601 SIN
602 45
603 *
604 +
605 RCL 09
606 14
607 +
608 COS
609 118
610 *
611 +
612 RCL 07
613 RCL 11
614 -
615 30
616 +
617 COS
618 228
619 *
620 +
621 RCL 11
622 7
623 -
624 SIN
625 810
626 *
627 +
628 STO 03
629 RCL 09
630 ST+ X
631 STO 13
632 33
633 +
634 COS
635 20
636 ST+ 04
637 *
638 RCL 04
639 COS
640 18
641 *
642 -
643 STO 04
644 RCL 13
645 60
646 -
647 COS
648 19
649 *
650 STO 05
651 9543
652 STO 09
653 5553
654 RCL 00
655 35
656 *
657 -
658 STO 10          
659 2489
660 STO 11
661 1964
662 STO 15
663 50061
664 STO 12
665 1223511
666 STO 06
667 93057
668 STO 13
669 20609
670 +
671 877
672 XEQ 14
673 RTN
674 LBL 07
675 XEQ 12
676 RCL 12
677 RCL 14
678 ST+ X
679 +
680 20
681 -
682 SIN
683 12
684 *
685 RCL 04
686 RCL 05
687 +
688 80
689 -
690 COS
691 7
692 *
693 +
694 RCL 07
695 RCL 12
696 -
697 28
698 +
699 COS
700 6
701 *
702 +
703 RCL 14
704 RCL 05
705 -
706 12
707 -
708 COS
709 5
710 *
711 -
712 RCL 14
713 10
714 STO 10
715 +
716 SIN
717 RCL 10
718 *
719 -
720 RCL 06
721 RCL 12
722 -
723 RCL 10
724 -
725 COS
726 RCL 12
727 RCL 04
728 -
729 COS
730 -
731 15
732 *
733 +
734 RCL 05
735 RCL 12
736 +
737 STO 13
738 11
739 -
740 COS
741 RCL 12
742 RCL 03
743 -
744 51
745 -
746 COS
747 +
748 40
749 *
750 +
751 RCL 03
752 73
753 +
754 SIN
755 RCL 04
756 39
757 +
758 SIN
759 +
760 35
761 *
762 -
763 RCL 14
764 ST+ X
765 19
766 +
767 STO 11
768 SIN
769 209
770 *
771 -
772 RCL 05
773 62
774 -
775 SIN
776 858
777 *
778 +
779 STO 03
780 RCL 14
781 ST+ X
782 33
783 +
784 COS
785 RCL 13
786 SIN
787 -
788 6
789 *
790 STO 04
791 RCL 11
792 COS
793 34
794 *
795 STO 05
796 19192
797 STO 09
798 45955
799 CHS
800 STO 12
801 429864
802 STO 06
803 4630
804 STO 10
805 773
806 STO 11
807 1486
808 STO 15
809 172993
810 STO 13
811 74005
812 521
813 XEQ 14
814 RTN
815 LBL 08
816 XEQ 12
817 RCL 04
818 50
819 -
820 COS
821 24
822 *
823 RCL 14
824 RCL 05          
825 -
826 11
827 -
828 COS
829 22
830 *
831 +
832 RCL 06
833 RCL 14
834 ST+ 04
835 -
836 RCL 05
837 -
838 COS
839 9
840 *
841 +
842 RCL 04
843 77
844 -
845 COS
846 RCL 07
847 RCL 05
848 -
849 RCL 14
850 -
851 16
852 +
853 COS
854 +
855 5
856 *
857 +
858 RCL 14
859 7
860 +
861 SIN
862 71
863 *
864 +
865 RCL 05
866 28
867 +
868 COS
869 584
870 *
871 +
872 STO 03
873 RCL 04
874 21
875 +
876 COS
877 RCL 14
878 36
879 -
880 COS
881 +
882 9
883 *
884 CHS
885 STO 04
886 RCL 14
887 COS
888 17
889 *
890 CHS
891 STO 05
892 30070
893 STO 09
894 899
895 STO 10
896 1770
897 RCL 00
898 9
899 *
900 -
901 STO 11
902 1426
903 STO 15
904 55654
905 CHS
906 STO 12
907 219883
908 STO 06
909 48124
910 STO 13
911 83660
912 +
913 1102
914 XEQ 14
915 RTN
916 LBL 09
917 RCL 00
918 2890
919 *
920 65
921 +
922 COS
923 7
924 *
925 STO 03
926 CLX
927 STO 04
928 STO 05
929 39489
930 STO 09
931 24900
932 STO 10
933 17140
934 STO 11
935 224075
936 STO 13
937 238927
938 STO 12
939 146567
940 STO 06
941 36260
942 -
943 1397
944 STO 15
945 GTO 14
946 LBL 12
947 102
948 RCL 00
949 2.06
950 *
951 STO 15
952 *
953 STO 14
954 208
955 LASTX
956 *
957 STO 12
958 19
959 LASTX
960 *
961 STO 11
962 593
963 LASTX
964 *
965 STO 07
966 LASTX
967 880
968 *
969 STO 08
970 +
971 STO 06
972 LASTX
973 RCL 07
974 -
975 STO 09
976 +
977 STO 10
978 4
979 RCL 15
980 *
981 STO 05
982 ST+ X
983 STO 04
984 LASTX
985 31
986 *
987 STO 03
988 RTN
989 LBL 13
990 0
991 STO 03          
992 STO 04
993 STO 05
994 RDN
995 LBL 14
996 RCL 00
997 ST* 06
998 ST* 15
999 *
1000 +
1001 STO 14
1002  E5
1003 ST/ 10
1004 9
1005 STO 08
1006 RCL 12
1007 RCL 06
1008 +
1009  E3
1010 STO 06
1011 ST/ 03
1012 ST/ 04
1013 ST/ 05
1014 ST/ 09
1015 ST/ 11
1016 ST/ 14
1017 /
1018 RCL 13
1019 RCL 15
1020 +
1021 RCL 06
1022 /
1023 STO 13
1024 -
1025 ENTER
1026 ENTER
1027 LBL 11
1028 SIN
1029 RCL 10
1030 R-D
1031 *
1032 +
1033 DSE 08
1034 GTO 11
1035 STO 15
1036 2
1037 /
1038 1
1039 RCL 10
1040 +
1041 1
1042 LASTX
1043 -
1044 /
1045 SQRT
1046 P-R
1047 LASTX
1048 /
1049 R-P
1050 X<>Y
1051 ST+ X
1052 1
1053 RCL 15
1054 COS
1055 RCL 10
1056 *
1057 -
1058 RCL 09
1059 *
1060 RCL 05
1061 +
1062 STO 08
1063 CLX
1064 RCL 14
1065 -
1066 RCL 13
1067 +
1068 COS
1069 RCL 11
1070 LASTX
1071 SIN
1072 P-R
1073 X<>Y
1074 ASIN
1075 RCL 04
1076 +
1077 STO 07
1078 X<> Z
1079 R-P
1080 CLX
1081 RCL 14
1082 +
1083 RCL 03
1084 +
1085 STO 06
1086 RCL 08
1087 XEQ 10
1088 RCL 02
1089 ST+ Z
1090 CLX
1091 RCL 01
1092 +
1093 XEQ 12
1094 STO 05
1095 RDN
1096 STO 03
1097 X<>Y
1098 STO 04
1099 LBL 00
1100 RCL 00
1101 77
1102 /
1103 549.4
1104 SQRT
1105 -
1106 RCL 04
1107 RCL 03
1108 XEQ 13
1109 STO 09
1110 X<>Y
1111 STO 10
1112 RCL 17
1113 HR
1114 90
1115 STO 11
1116 -
1117 RCL 10
1118 LASTX
1119 RCL 09
1120 +
1121 RCL 19
1122 -
1123 XEQ 13
1124 ST- 11
1125 X<>Y
1126 ENTER
1127 COS
1128 RCL 05
1129 409
1130 *
1131 /
1132 -
1133 STO 12
1134 19.272
1135 RCL 12
1136 6.942
1137 +
1138 /
1139 +
1140 5.459
1141 X<>Y
1142 /
1143 +
1144 TAN
1145 1/X
1146 62.6
1147 /
1148 +
1149 STO 13
1150 X<>Y
1151 RCL 11
1152 RTN
1153 LBL 13
1154 1
1155 XEQ 10
1156 RDN
1157 R-P
1158 X<> Z
1159 ST- Y
1160 X<> Z
1161 P-R
1162 R^
1163 XEQ 12
1164 RDN
1165 RTN
1166 LBL 10        
1167 X<>Y
1168 RDN
1169 P-R
1170 R^
1171 X<>Y
1172 P-R
1173 RTN
1174 LBL 12
1175 R-P
1176 X<>Y
1177 RDN
1178 R-P
1179 R^
1180 X<>Y
1181 END
 
 
    ( 1803 bytes / SIZE 020 )
 

    STACK           INPUT                       OUTPUTS
         Z                /             h0 = apparent altitude  ( deg )
         Y      YYYY.MNDD                h  = true altitude  ( deg )
         X       hh.mnss (UT)                 Az = Azimuth  ( deg )
 

   YYYY.MNDD   ENTER^
        hh.mnss          XEQ "EPH"   returns the azimuthal coordinates of the Sun.

-Then  R/S  or  XEQ 03   gives the coordinates of the Moon
-Then  R/S  or  XEQ 01   ------------------------  Mercury
     ............................................................................
-Then  R/S  or  XEQ 09   ------------------------- Pluto.


     d)  Program#4 ( 1622 bytes )


-Here is a small improvement of the program listed in §2°)a)
-With coefficients >= 0°009


Registers
 

 R00 = Time from 2000/01/01 0h TT ( unit = 100 Julian years )            ( Registers R16-R17-R18 are to be initialized before executing "EPH" )

 R01 = X   Rectangular
 R02 = Y   coordinates of the Sun,

 R03 = Geocentric longitude ( deg )
 R04 = Geocentric latitude ( deg )
 R05 = Distance Earth-Planet ( AU )

 R06 = Heliocentric longitude ( deg )
 R07 = Heliocentric latitude ( deg )
 R08 = Radius vector ( AU )

 R09 = Right-ascension ( deg )
 R10 = Declination ( deg )

 R11 = Azimuth ( deg )  ( reckoned clockwise from South )
 R12 = height ( deg )
 R13 = height corrected for refraction ( deg )

 R14 & R15: temp                            

•  R16 = Longitude of the observer ( ° ' " )  positive East
•  R17 = Latitude of the observer ( ° ' " )
•  R18 = DeltaT = TT - UT ( seconds )

  R19 = local true sidereal time ( deg )

Flags: /
Subroutine:   "J" or "J1"  ( cf "Julian & Gregorian Calendars for the HP-41" )

-With an HP41CX or a TIME module, lines 07-08 may be replaced by  1.012  DDAYS  -


 01 LBL "EPH"
 02 DEG
 03 HR
 04 STO 15
 05 24
 06 /
 07 X<>Y
 08 XEQ "J"
 09 +
 10 36525
 11 /
 12 STO 00
 13 36000770
 14 STO 06
 15 *
 16  E3
 17 STO 09
 18 /
 19 99.9678
 20 +
 21 RCL 15
 22 15
 23 *
 24 +
 25 RCL 16
 26 HR
 27 +
 28 STO 19
 29 RCL 18
 30 315576 E4
 31 /
 32 ST+ 00
 33 1671
 34 STO 10
 35 48
 36 +
 37 STO 15
 38 80026
 39 CHS
 40 STO 12
 41 77063
 42 CHS
 43 STO 13
 44 CLST
 45 STO 01
 46 STO 02
 47 STO 11
 48 XEQ 13
 49 RCL 03
 50 RCL 05
 51 P-R
 52 STO 01
 53 X<>Y
 54 STO 02
 55 RCL 13
 56 RCL 12
 57 RCL 11
 58 RTN
 59 LBL 03
 60 RCL 00
 61 3599905
 62 %
 63 2.96
 64 -
 65 STO 12
 66 RCL 00
 67 44526711
 68 %
 69 68.25
 70 -
 71 STO 13
 72 ST+ X
 73 STO 03
 74 STO 14
 75 RCL 00
 76 47719887
 77 %
 78 128.43
 79 +
 80 STO 07
 81 ST- 03
 82 ST+ X
 83 STO 08
 84 RCL 00
 85 48320202
 86 %
 87 86.66
 88 +
 89 STO 09
 90 ST+ X
 91 STO 06
 92 2574
 93 RCL 07
 94 COS
 95 28
 96 *
 97 RCL 03
 98 COS
 99 5
100 *
101 +
102 RCL 14
103 COS
104 4
105 *
106 +
107 5
108 *
109 -
110  E6
111 /
112 STO 05
113 RCL 07
114 RCL 09
115 +
116 SIN
117 281
118 *
119 RCL 07
120 RCL 09
121 -
122 STO 04
123 SIN
124 278
125 *
126 +
127 RCL 14
128 RCL 09
129 -
130 SIN
131 173
132 *
133 +
134 RCL 03
135 RCL 09          
136 +
137 SIN
138 55
139 *
140 +
141 RCL 03
142 RCL 09
143 -
144 SIN
145 46
146 *
147 +
148 RCL 09
149 RCL 14
150 +
151 SIN
152 33
153 *
154 +
155 RCL 08
156 RCL 09
157 +
158 SIN
159 17
160 *
161 +
162 RCL 04
163 RCL 14
164 +
165 SIN
166 RCL 08
167 RCL 09
168 -
169 SIN
170 +
171 9
172 *
173 +
174 RCL 09
175 SIN
176 5128
177 *
178 +
179 STO 04
180 RCL 07
181 SIN
182 6289
183 *
184 RCL 14
185 SIN
186 658
187 *
188 +
189 RCL 08
190 SIN
191 214
192 *
193 +
194 RCL 06
195 SIN
196 114
197 *
198 -
199 RCL 14
200 RCL 08
201 -
202 SIN
203 59
204 *
205 +
206 RCL 03
207 RCL 12
208 -
209 SIN
210 57
211 *
212 +
213 RCL 07
214 RCL 14
215 +
216 STO 10
217 SIN
218 53
219 *
220 +
221 RCL 14
222 RCL 12
223 -
224 STO 11
225 SIN
226 46
227 *
228 +
229 RCL 12
230 RCL 07
231 -
232 SIN
233 41
234 *
235 -
236 RCL 03
237 SIN
238 98
239 *
240 RCL 06
241 RCL 07
242 +
243 SIN
244 -
245 13
246 *
247 +
248 RCL 07
249 RCL 06
250 -
251 SIN
252 RCL 14
253 ST+ X
254 RCL 07
255 -
256 SIN
257 +
258 11
259 *
260 +
261 RCL 12
262 SIN
263 37
264 *
265 RCL 13
266 SIN
267 7
268 *
269 +
270 RCL 07
271 RCL 12
272 +
273 SIN
274 6
275 *
276 +
277 RCL 14
278 RCL 06          
279 -
280 SIN
281 3
282 *
283 -
284 RCL 07
285 RCL 08
286 +
287 SIN
288 ST+ X
289 -
290 5
291 *
292 -
293 RCL 03
294 ST+ X
295 SIN
296 9
297 *
298 +
299 481267881
300 RCL 00
301 *
302 211728
303 +
304 +
305  E3
306 ST/ 04
307 /
308 360
309 MOD
310 STO 03
311 XEQ 00
312 RTN
313 LBL 01
314 387.1
315 STO 09
316 20563
317 STO 10
318 7005
319 STO 11
320 1556
321 STO 15
322 77456
323 STO 13
324 250205
325 STO 12
326 149474072
327 STO 06
328 48331
329 1186
330 XEQ 13
331 RTN
332 LBL 02
333 723.3
334 STO 09
335 677
336 STO 10
337 3395
338 STO 11
339 1402
340 STO 15
341 131564
342 STO 13
343 181179
344 STO 12
345 58519213
346 STO 06
347 76680
348 901
349 XEQ 13
350 RTN
351 LBL 04
352 XEQ 12
353 RCL 15
354 10
355 *
356 18
357 -
358 COS
359 16
360 *
361 STO 03
362 CLX
363 STO 04
364 STO 05
365 1523.7
366 STO 09
367 9340
368 STO 10
369 1850
370 STO 11
371 9
372 -
373 STO 15
374 4829
375 CHS
376 STO 12
377 19141696
378 STO 06
379 23940
380 CHS
381 STO 13
382 49558
383 772
384 XEQ 14
385 RTN
386 LBL 05
387 XEQ 12
388 RCL 08
389 73
390 +
391 COS
392 RCL 10
393 RCL 07
394 -
395 41
396 +
397 SIN
398 -
399 509
400 SQRT
401 *
402 RCL 06
403 RCL 11
404 +
405 12
406 +
407 SIN
408 16
409 *
410 -
411 RCL 09
412 75
413 -
414 SIN
415 37
416 *
417 +
418 RCL 06
419 RCL 11
420 -
421 61
422 -
423 SIN
424 42
425 *
426 +
427 RCL 10          
428 33
429 -
430 SIN
431 56
432 *
433 +
434 RCL 11
435 7
436 -
437 SIN
438 329
439 *
440 -
441 STO 03
442 CLX
443 STO 04
444 STO 05
445 5203
446 STO 09
447 1303
448 STO 11
449 4849
450 STO 10
451 1613
452 STO 15
453 34310
454 STO 12
455 3036303
456 STO 06
457 14331
458 STO 13
459 86133
460 +
461 1021
462 XEQ 14
463 RTN
464 LBL 06
465 XEQ 12
466 RCL 08
467 30
468 -
469 COS
470 RCL 10
471 54
472 +
473 COS
474 +
475 RCL 06
476 RCL 09
477 RCL 11
478 +
479 STO 13
480 -
481 25
482 +
483 COS
484 +
485 9
486 *
487 RCL 13
488 SIN
489 14
490 *
491 +
492 RCL 11
493 32
494 -
495 COS
496 10
497 *
498 RCL 00
499 *
500 -
501 RCL 07
502 RCL 11
503 +
504 STO 04
505 50
506 -
507 SIN
508 45
509 *
510 +
511 RCL 09
512 14
513 +
514 COS
515 118
516 *
517 +
518 RCL 07
519 RCL 11
520 -
521 30
522 +
523 COS
524 228
525 *
526 +
527 RCL 11
528 7
529 -
530 SIN
531 810
532 *
533 +
534 STO 03
535 RCL 09
536 ST+ X
537 STO 13
538 33
539 +
540 COS
541 20
542 ST+ 04
543 *
544 RCL 04
545 COS
546 18
547 *
548 -
549 STO 04
550 RCL 13
551 60
552 -
553 COS
554 19
555 *
556 STO 05
557 9543
558 STO 09
559 5553
560 RCL 00
561 35
562 *
563 -
564 STO 10
565 2489
566 STO 11
567 1964
568 STO 15
569 50061
570 STO 12
571 1223511
572 STO 06          
573 93057
574 STO 13
575 20609
576 +
577 877
578 XEQ 14
579 RTN
580 LBL 07
581 XEQ 12
582 RCL 12
583 RCL 14
584 ST+ X
585 +
586 20
587 -
588 SIN
589 12
590 *
591 RCL 14
592 10
593 STO 10
594 +
595 SIN
596 RCL 10
597 *
598 -
599 RCL 06
600 RCL 12
601 -
602 RCL 10
603 -
604 COS
605 RCL 12
606 RCL 04
607 -
608 COS
609 -
610 15
611 *
612 +
613 RCL 05
614 RCL 12
615 +
616 11
617 -
618 COS
619 RCL 12
620 RCL 03
621 -
622 51
623 -
624 COS
625 +
626 40
627 *
628 +
629 RCL 03
630 73
631 +
632 SIN
633 RCL 04
634 39
635 +
636 SIN
637 +
638 35
639 *
640 -
641 RCL 14
642 ST+ X
643 19
644 +
645 STO 11
646 SIN
647 209
648 *
649 -
650 RCL 05
651 62
652 -
653 SIN
654 858
655 *
656 +
657 STO 03
658 CLX
659 STO 04
660 RCL 11
661 COS
662 34
663 *
664 STO 05
665 19192
666 STO 09
667 45955
668 CHS
669 STO 12
670 429864
671 STO 06
672 4630
673 STO 10
674 773
675 STO 11
676 1486
677 STO 15
678 172993
679 STO 13
680 74005
681 521
682 XEQ 14
683 RTN
684 LBL 08
685 XEQ 12
686 RCL 04
687 50
688 -
689 COS
690 24
691 *
692 RCL 14
693 RCL 05
694 -
695 11
696 -
697 COS
698 22
699 *
700 +
701 RCL 06
702 RCL 14
703 -
704 RCL 05
705 -
706 COS
707 9
708 *
709 +
710 RCL 14          
711 ST+ 04
712 7
713 +
714 SIN
715 71
716 *
717 +
718 RCL 05
719 28
720 +
721 COS
722 584
723 *
724 +
725 STO 03
726 RCL 04
727 21
728 +
729 COS
730 RCL 14
731 36
732 -
733 COS
734 +
735 9
736 *
737 CHS
738 STO 04
739 RCL 14
740 COS
741 17
742 *
743 CHS
744 STO 05
745 30070
746 STO 09
747 899
748 STO 10
749 1770
750 RCL 00
751 9
752 *
753 -
754 STO 11
755 1426
756 STO 15
757 55654
758 CHS
759 STO 12
760 219883
761 STO 06
762 48124
763 STO 13
764 83660
765 +
766 1102
767 XEQ 14
768 RTN
769 LBL 09
770 39489
771 STO 09
772 24900
773 STO 10
774 17140
775 STO 11
776 224075
777 STO 13
778 238927
779 STO 12
780 146567
781 STO 06
782 36260
783 -
784 1397
785 STO 15
786 GTO 13
787 LBL 12
788 102
789 RCL 00
790 2.06
791 *
792 STO 15
793 *
794 STO 14
795 208
796 LASTX
797 *
798 STO 12
799 19
800 LASTX
801 *
802 STO 11
803 593
804 LASTX
805 *
806 STO 07
807 LASTX
808 880
809 *
810 STO 08
811 +
812 STO 06
813 LASTX
814 RCL 07
815 -
816 STO 09
817 +
818 STO 10
819 4
820 RCL 15
821 *
822 STO 05
823 ST+ X
824 STO 04
825 LASTX
826 31
827 *
828 STO 03
829 RTN
830 LBL 13
831 0
832 STO 03
833 STO 04
834 STO 05
835 RDN
836 LBL 14
837 RCL 00
838 ST* 06
839 ST* 15
840 *
841 +
842 STO 14
843  E5
844 ST/ 10
845 9
846 STO 08
847 RCL 12
848 RCL 06
849 +
850  E3
851 STO 06
852 ST/ 03
853 ST/ 04
854 ST/ 05
855 ST/ 09
856 ST/ 11
857 ST/ 14
858 /
859 RCL 13
860 RCL 15
861 +
862 RCL 06          
863 /
864 STO 13
865 -
866 ENTER
867 ENTER
868 LBL 11
869 SIN
870 RCL 10
871 R-D
872 *
873 +
874 DSE 08
875 GTO 11
876 STO 15
877 2
878 /
879 1
880 RCL 10
881 +
882 1
883 LASTX
884 -
885 /
886 SQRT
887 P-R
888 LASTX
889 /
890 R-P
891 X<>Y
892 ST+ X
893 1
894 RCL 15
895 COS
896 RCL 10
897 *
898 -
899 RCL 09
900 *
901 RCL 05
902 +
903 STO 08
904 CLX
905 RCL 14
906 -
907 RCL 13
908 +
909 COS
910 RCL 11
911 LASTX
912 SIN
913 P-R
914 X<>Y
915 ASIN
916 RCL 04
917 +
918 STO 07
919 X<> Z
920 R-P
921 CLX
922 RCL 14
923 +
924 RCL 03
925 +
926 STO 06
927 RCL 08
928 XEQ 10
929 RCL 02
930 ST+ Z
931 CLX
932 RCL 01
933 +
934 XEQ 12
935 STO 05
936 RDN
937 STO 03
938 X<>Y
939 STO 04
940 LBL 00
941 RCL 00
942 77
943 /
944 549.4
945 SQRT
946 -
947 RCL 04
948 RCL 03
949 XEQ 13
950 STO 09
951 X<>Y
952 STO 10
953 RCL 17
954 HR
955 90
956 STO 11
957 -
958 RCL 10
959 LASTX
960 RCL 09
961 +
962 RCL 19
963 -
964 XEQ 13
965 ST- 11
966 X<>Y
967 ENTER
968 COS
969 RCL 05
970 409
971 *
972 /
973 -
974 STO 12
975 19.272
976 RCL 12          
977 6.942
978 +
979 /
980 +
981 5.459
982 X<>Y
983 /
984 +
985 TAN
986 1/X
987 62.6
988 /
989 +
990 STO 13
991 X<>Y
992 RCL 11
993 RTN
994 LBL 13
995 1
996 XEQ 10
997 RDN
998 R-P
999 X<> Z
1000 ST- Y
1001 X<> Z
1002 P-R
1003 R^
1004 XEQ 12
1005 RDN
1006 RTN
1007 LBL 10
1008 X<>Y
1009 RDN
1010 P-R
1011 R^
1012 X<>Y
1013 P-R
1014 RTN
1015 LBL 12
1016 R-P
1017 X<>Y
1018 RDN
1019 R-P
1020 R^
1021 X<>Y
1022 END
 
 
    ( 1622 bytes / SIZE 020 )
 

    STACK           INPUT                       OUTPUTS
         Z                /             h0 = apparent altitude  ( deg )
         Y      YYYY.MNDD                h  = true altitude  ( deg )
         X       hh.mnss (UT)                 Az = Azimuth  ( deg )
 

   YYYY.MNDD   ENTER^
        hh.mnss          XEQ "EPH"   returns the azimuthal coordinates of the Sun.

-Then  R/S  or  XEQ 03   gives the coordinates of the Moon
-Then  R/S  or  XEQ 01   ------------------------  Mercury
     ............................................................................
-Then  R/S  or  XEQ 09   ------------------------- Pluto.



References:

[1]   http://ssd.jpl.nasa.gov/txt/aprx_pos_planets.pdf
[2]  Jean Meeus - "Astronomical Algorithms" - Willmann-Bell  -  ISBN 0-943396-61-1
[3]  VSOP87D Series  ftp://ftp.imcce.fr/pub/ephem/planets/vsop87/
[4]  VSOP09 & TOP2010 Series  http://www.imcce.fr/~jlsimon