Post Reply 
(41) Sunrise, Sunset, and Twilight from HP User Library 00508C
04-01-2018, 04:36 PM (This post was last modified: 04-01-2018 08:51 PM by KF6GPE.)
Post: #1
(41) Sunrise, Sunset, and Twilight from HP User Library 00508C
I haven't found this in .raw files anywhere else, so I'm offering it here.

This is an adaptation of David B. Wescott's Sunrise, Sunset, Twilight from 1900, published as HP User Library 00508C at hp41 . org.

The program requires 45 data registers, and there are a number of constants originally supplied on magnetic cards. I wrote a short program INITSUN that initializes the relevant data registers first (as if you'd loaded the data cards):

Code:
LBL "INITSUN"
9.936741207E-5
STO 26
4.908229466
STO 27
0.03000526417
STO 28
7.902463002E-6
STO 29
5.817764173E-8
STO 30
4.881627934
STO 31
628.331951
STO 32
5.279620987E-6
STO 33
0.4093197551
STO 34
-2.271109689E-4
STO 35
-2.860400719E-8
STO 36
8.775127628E-9
STO 37
0.01675104
STO 38
-418E-7
STO 39
-126E-9
STO 40
694023
STO 41
365.25
STO 42
37.106
STO 43
122.0879
STO 44
RTN
END

To use enter USER mode and:
1. Run INITSUN (loads registers with constants, only do once).
2. Run SUN
3. Optional: Enter Lat (+ N, - S), Lon (+ W, - E) and press B
4. Select precision desired by pressing E
5. Select double precision if latitude > 60 by pressing D
6a. Input date of desired times YYYY.MMDD; for standard times and press A.
6b. Input date of desired times YY.MMDDl; for Daylight Savings Time and press C
Optional: Review times by pressing A or C
For a new case: run at step 3.

You can delete INITSUN or copy it off to extended memory and remove it, as long as you preserve the contents of registers 22-42. Registers 43 and 44 are the default latitude and longitude; you might want to enter your latitude and longitude instead, letting you skip step (3).

(Edit) Posted SwissMicros DM41 dump files for INITSUN and SUN as a separate zip.


Attached File(s)
.zip  sun-dm41.zip (Size: 1.53 KB / Downloads: 31)
.zip  sun.zip (Size: 4.61 KB / Downloads: 38)
Find all posts by this user
Quote this message in a reply
04-01-2018, 06:48 PM
Post: #2
RE: (41) Sunrise, Sunset, and Twilight from HP User Library 00508C
(04-01-2018 06:26 PM)SlideRule Wrote:  The posted url User Library 00508C
http://www.%2A%2A%2A%2A%2A/LibView.cfm?Command=View&ItemID=766
doesn't seem to connect to a web page.

SlideRule

It's a page on TOS; this site (MoHPC) edits out any text or url references to that site name automatically; it's likely the OP didn't know that. If one substitutes the actual domain name for the asterisks, the link works.

--Bob Prosperi
Find all posts by this user
Quote this message in a reply
04-01-2018, 08:49 PM
Post: #3
RE: (41) Sunrise, Sunset, and Twilight from HP User Library 00508C
Whoops! Thanks. Will go back and edit. Good catch. I was unaware of that.
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 1 Guest(s)