Equation of time

Contributed programs for the DM41 go here.
Post Reply
Hennes
Posts: 1
Joined: Mon Aug 23, 2021 1:12 pm

Equation of time

Post by Hennes »

For astronomic calculations I needed the difference between the local time and the solar time, called the Equation of time. So I wrote a program that computes the difference in minutes only by recalling the current date from the calculator. I'll try to extend this to a library to compute the ephemerides of the planets.

Function name: "ZGL" (from the german "Zeitgleichung")
Registers used: 20-28
Result: Reg 28 and X

Code: Select all

LBL "ZGL"
1.012000
DATE
DDAYS
STO 20
.000042
*
36525
/
CHS
.016709
+
STO 21
RCL 20
46.82
*
3600
/
36525
/
CHS
23
+
26
ENTER
60
/
+
21
ENTER
3600
/
+
STO 22
RCL 20
1.7192
*
36525
/
282.94
+
STO 23
RCL 20
36000.769
*
36525
/
280.4656
+
STO 24
RCL 23
-
STO 25
DEG
RCL 21
2
*
RCL 21
3
Y^X
4
/
-
RCL 25
SIN
*
STO 26
5
ENTER
4
/
RCL 21
X^2
*
RCL 25
2
*
SIN
*
ST+ 26
13
ENTER
12
/
RCL 21
3
Y^X
*
RCL 25
3
*
SIN
*
ST+ 26
180
ST* 26
PI
ST/ 26
RCL 24
RCL 26
+
STO 27
RCL 24
TAN
RCL 27
TAN
RCL 22
COS
*
-
1
ENTER
RCL 24
TAN
RCL 27
TAN
*
RCL 22
COS
*
+
/
ATAN
STO 28
4
ST* 28
RCL 28
END
Regards
Ralf
Post Reply