hp41programs

Astronomical Ephemeris 4 Astronomical Ephemeris (IV) for the HP41
 

Overview
 

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

    a)  Heliocentric & Geocentric Coordinates
    b)  Heliocentric Coordinates only

3°)  2 More Complete Programs but even less accurate  [ 1900 , 2100 ]
4°)  A Single Program ( 2228 bytes )


-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) 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.
 

     b) 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°)  A Single Program ( 2228 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 ( hh.mnss )

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


Note:

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

   lines 1468 to 1483 to delete the refraction formula
   lines 1234 to 1282 to delete the Pluto coordinates ...

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






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