The Museum of HP Calculators
HP Articles Forum
[Return to the Index ]
[ Previous | Next ]
Computing Sunrise/Sunset with the HP 35s
Posted by Justin Sloan (Honolulu) on 29 Apr 2013, 12:30 a.m.
This is a port of a program originally written for the HP-67 calculator and published as part of HP's Standard Pac. It can calculate the approximate sunrise and sunset time in GMT given a date and any position on earth in lat/lon. One of the goals of the port was to eliminate the need to use multiple labels, to essentially use branching instead of subroutines. I would love to hear your thoughts or suggestion for improvement.
- Day = Register A
- Month = Register B
- Latitude = Register C
- Longitude = Register D
In addition, Register E is used during the program execution. Enter positive values for both the northing and easting.
As an example, to calculate the approximate Sunset on 14 June in Honolulu, Hawai'i, you would press the following keys: 14, STO A, 6, STO B, 21.30, STO C, 157.85, STO D, GTO S001, R/S, 1, R/S.
The answer should be 5.12, meaning 0512hrs (5:12am) GMT. This would be 1912hrs (7:12pm) local HST, since HST is -10 from GMT.
- S001 LBL S
- S002 FIX 2
- S003 CF 2
- S004 0=SUNRISE,1=SUNSET
- S005 x>0?
- S006 SF 2
- S007 30.3
- S008 RCL B
- S009 1
- S010 -
- S011 x
- S012 RCL A
- S013 +
- S014 1
- S015 -
- S016 0.998
- S017 x
- S018 STO E
- S019 87
- S020 +
- S021 COS
- S022 0.123
- S023 x
- S024 RCL E
- S025 ENTER
- S026 +
- S027 20
- S028 +
- S029 SIN
- S030 6
- S031 /
- S032 -
- S033 CHS
- S034 RCL E
- S035 10
- S036 +
- S037 COS
- S038 23.5
- S039 x
- S040 TAN
- S041 RCL C
- S042 HMS>
- S043 TAN
- S044 x
- S045 ACOS
- S046 FS? 2
- S047 GTO S064
- S048 CHS
- S049 RCL D
- S050 HMS>
- S051 +
- S052 15
- S053 /
- S054 +
- S055 12
- S056 +
- S057 ENTER
- S058 CLx
- S059 x>y?
- S060 24
- S061 +
- S062 >HMS
- S063 RTN
- S064 RCL D
- S065 HMS>
- S066 +
- S067 15
- S068 /
- S069 +
- S070 12
- S071 +
- S072 24
- S073 x>y?
- S074 GTO S078
- S075 -
- S076 >HMS
- S077 STOP
- S078 ENTER
- S079 -
- S080 GTO S075
[ Return to the Message Index ]
Go back to the main exhibit hall