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°)  Simple Programs
  [ 1900 , 2100 ]

    a) Program#1 ( 2228 bytes )
    b) Program#2 ( 2055 bytes )


Latest Update:   Paragraph 4°)

-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°)  Simple Programs   [ 1900 , 2100 ]


     a)  Program#1  ( 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 ( deg )

-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 09
866 RCL 07
867 -
868 STO 13
869 ST+ 13
870 SIN
871 14
872 *
873 -
874 RCL 13
875 40
876 -
877 COS
878 45
879 *
880 -
881 RCL 09
882 14
883 +
884 COS
885 118
886 *
887 +
888 RCL 14
889 30
890 +
891 COS
892 228
893 *
894 +
895 RCL 11
896 7.2
897 +
898 SIN
899 810
900 *
901 -
902 STO 03
903 RCL 10
904 28
905 -
906 COS
907 6
908 *
909 RCL 11
910 SIN
911 4
912 *
913 -
914 RCL 14
915 33
916 +
917 COS
918 20
919 ST- 08
920 ST- 13
921 *
922 +
923 RCL 13
924 COS
925 18
926 *
927 -
928 STO 04
929 RCL 09
930 17
931 +
932 SIN
933 5
934 *
935 RCL 08
936 COS
937 8
938 *
939 +
940 RCL 14
941 60
942 -
943 COS
944 19
945 *
946 +
947 STO 05
948 9543
949 STO 09
950 RCL 07
951 50.061
952 +
953 STO 12
954 RCL 00
955 5553
956 RCL 00
957 35
958 *
959 -
960 STO 10
961 CLX
962 4
963 *
964 CHS
965 2489
966 +
967 STO 11
968 CLX
969 1964
970 +
971 *
972 93057
973 +
974 STO 13
975 CLX
976 877
977 *
978 113666
979 XEQ 14
980 RTN
981 LBL 07
982 XEQ 12
983 RCL 14
984 RCL 15
985 +
986 60
987 -
988 COS
989 4
990 *
991 RCL 07
992 RCL 12
993 -
994 28
995 +
996 COS
997 RCL 15
998 RCL 13
999 -
1000 12
1001 -
1002 COS
1003 -
1004 6
1005 *
1006 +
1007 RCL 11
1008 RCL 03
1009 -
1010 SIN
1011 7
1012 *
1013 +
1014 RCL 14
1015 9
1016 +
1017 SIN
1018 10
1019 *
1020 -
1021 RCL 12
1022 RCL 15
1023 +
1024 70
1025 +
1026 COS
1027 12
1028 *
1029 -
1030 RCL 06
1031 RCL 12
1032 -
1033 10
1034 -
1035 COS
1036 RCL 04
1037 RCL 12
1038 +
1039 COS
1040 -
1041 15
1042 *
1043 +
1044 RCL 03
1045 17
1046 +
1047 COS
1048 RCL 04
1049 51
1050 ST- 03
1051 +
1052 COS
1053 +
1054 35
1055 *
1056 -
1057 RCL 13
1058 ST+ X
1059 STO 04
1060 11
1061 -
1062 COS
1063 RCL 03
1064 RCL 12        
1065 +
1066 COS
1067 +
1068 40
1069 *
1070 +
1071 RCL 15
1072 71
1073 -
1074 COS
1075 209
1076 *
1077 -
1078 RCL 05
1079 27.8
1080 -
1081 COS
1082 858
1083 *
1084 -
1085 STO 03
1086 RCL 15
1087 33
1088 +
1089 COS
1090 RCL 04
1091 SIN
1092 -
1093 6
1094 *
1095 STO 04
1096 RCL 15
1097 19
1098 +
1099 COS
1100 34
1101 *
1102 STO 05
1103 19192
1104 STO 09
1105 773
1106 STO 11
1107 45.955
1108 ST- 12
1109 RCL 00
1110 4630
1111 RCL 00
1112 3
1113 *
1114 -
1115 STO 10
1116 CLX
1117 1486
1118 *
1119 172993
1120 +
1121 STO 13
1122 CLX
1123 521
1124 +
1125 *
1126 74005
1127 XEQ 14
1128 RTN
1129 LBL 08
1130 XEQ 12
1131 RCL 06
1132 RCL 13
1133 -
1134 COS
1135 9
1136 *
1137 RCL 15
1138 66
1139 -
1140 COS
1141 ST+ X
1142 -
1143 RCL 07
1144 RCL 13
1145 -
1146 16
1147 +
1148 COS
1149 RCL 05
1150 RCL 13
1151 -
1152 STO 06
1153 13
1154 -
1155 SIN
1156 -
1157 5
1158 *
1159 +
1160 RCL 15
1161 RCL 13
1162 -
1163 11
1164 -
1165 COS
1166 22
1167 *
1168 +
1169 RCL 04
1170 50
1171 +
1172 COS
1173 24
1174 *
1175 +
1176 RCL 14
1177 7
1178 +
1179 SIN
1180 71
1181 *
1182 +
1183 RCL 05
1184 27.8
1185 -
1186 COS
1187 584
1188 *
1189 +
1190 STO 03
1191 RCL 14
1192 54
1193 +
1194 SIN
1195 RCL 06
1196 21
1197 -
1198 COS
1199 +
1200 CHS
1201 9
1202 *
1203 STO 04
1204 RCL 14
1205 COS
1206 17
1207 *
1208 CHS
1209 STO 05
1210 30070
1211 STO 09
1212 RCL 13
1213 55.654
1214 -
1215 STO 12
1216 899
1217 STO 10
1218 RCL 00
1219 1770
1220 RCL 00
1221 9
1222 *
1223 -
1224 STO 11
1225 CLX
1226 1426
1227 *
1228 48124
1229 +
1230 STO 13
1231 CLX
1232 1102
1233 *
1234 131784
1235 XEQ 14
1236 RTN
1237 LBL 09
1238 RCL 00
1239 2890
1240 *
1241 65
1242 +
1243 COS
1244 7
1245 *
1246 RCL 00
1247 1077
1248 *
1249 76
1250 +
1251 COS
1252 4
1253 *
1254 +
1255 STO 03
1256 RCL 00
1257 9
1258 *
1259 4
1260 -
1261 STO 04
1262 RCL 00
1263 ST+ X
1264 STO 05
1265 39489
1266 STO 09
1267 24900
1268 STO 10
1269 17140
1270 STO 11
1271 RCL 00
1272 145.17
1273 *
1274 238.927
1275 +
1276 STO 12
1277 RCL 00        
1278 1397
1279 *
1280 135925
1281 -
1282 STO 13
1283 246232
1284 GTO 14
1285 LBL 12
1286 3034.906
1287 RCL 00
1288 *
1289 STO 06
1290 1222.114
1291 LASTX
1292 *
1293 STO 07
1294 -
1295 STO 08
1296 LASTX
1297 -
1298 STO 09
1299 RCL 08
1300 +
1301 STO 10
1302 RCL 07
1303 ST+ X
1304 -
1305 STO 11
1306 428.467
1307 RCL 00
1308 *
1309 STO 12
1310 218.486
1311 LASTX
1312 *
1313 STO 13
1314 -
1315 STO 14
1316 ST+ X
1317 STO 15
1318 RCL 12
1319 -
1320 STO 05
1321 ST+ X
1322 STO 04
1323 RCL 07
1324 RCL 12
1325 3
1326 *
1327 -
1328 STO 03
1329 RTN
1330 LBL 13
1331 0
1332 STO 03
1333 STO 04
1334 STO 05
1335 RDN
1336 LBL 14
1337 +
1338  E3
1339 ST/ 03
1340 ST/ 04
1341 ST/ 05
1342 ST/ 09
1343 ST/ 11
1344 ST/ 13
1345 /
1346 STO 14
1347  E5
1348 ST/ 10
1349 9
1350 X<> 12
1351 RCL 13
1352 -
1353 RCL 00
1354 1.397
1355 *
1356 +
1357 360
1358 MOD
1359 ENTER
1360 ENTER
1361 LBL 11
1362 SIN
1363 RCL 10
1364 R-D
1365 *
1366 +
1367 DSE 12
1368 GTO 11
1369 STO 15
1370 2
1371 /
1372 TAN
1373 1
1374 RCL 10
1375 +
1376 1
1377 LASTX
1378 -
1379 /
1380 SQRT
1381 *
1382 ATAN
1383 ST+ X
1384 1
1385 RCL 15
1386 COS
1387 RCL 10
1388 *
1389 -
1390 RCL 09
1391 *
1392 RCL 05
1393 +
1394 STO 10
1395 CLX
1396 RCL 14
1397 -
1398 RCL 13
1399 +
1400 COS
1401 RCL 11
1402 LASTX
1403 SIN
1404 P-R
1405 X<>Y
1406 ASIN
1407 RCL 04
1408 +
1409 STO 09
1410 X<> Z
1411 R-P
1412 CLX
1413 RCL 14
1414 +
1415 RCL 03
1416 +
1417 STO 08
1418 RCL 10
1419 XEQ 10
1420 RCL 02
1421 ST+ Z
1422 CLX
1423 RCL 01
1424 +
1425 XEQ 12
1426 STO 05
1427 RDN
1428 STO 03
1429 X<>Y
1430 STO 04
1431 LBL 00
1432 RCL 00
1433 77
1434 /
1435 549.4
1436 SQRT
1437 -
1438 RCL 04
1439 RCL 03
1440 XEQ 13
1441 STO 06
1442 X<>Y
1443 STO 07
1444 RCL 17
1445 HR
1446 90
1447 STO 11
1448 -
1449 RCL 07
1450 LASTX
1451 RCL 06
1452 +
1453 RCL 19
1454 -
1455 XEQ 13
1456 ST- 11
1457 X<>Y
1458 ENTER
1459 COS
1460 RCL 05
1461 409
1462 *
1463 /
1464 -
1465 STO 12
1466 19.272
1467 RCL 12
1468 6.942
1469 +
1470 /
1471 +
1472 5.459
1473 X<>Y
1474 /
1475 +
1476 TAN
1477 1/X
1478 62.6
1479 /
1480 +
1481 STO 13        
1482 X<>Y
1483 RCL 11
1484 RTN
1485 LBL 13
1486 1
1487 XEQ 10
1488 RDN
1489 R-P
1490 X<> Z
1491 ST- Y
1492 X<> Z
1493 P-R
1494 R^
1495 XEQ 12
1496 RDN
1497 RTN
1498 LBL 10
1499 X<>Y
1500 RDN
1501 P-R
1502 R^
1503 X<>Y
1504 P-R
1505 RTN
1506 LBL 12
1507 R-P
1508 X<>Y
1509 RDN
1510 R-P
1511 R^
1512 X<>Y
1513 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...



     b)  Program#2  ( 2055 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 )

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






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