Post Reply 
(34S) - Sunrise/Sunset
02-13-2015, 02:19 PM
Post: #15
RE: WP 34S - Sunrise/Sunset
(02-13-2015 06:52 AM)Dieter Wrote:  May I suggest a few more improvements?

Of course, I have already made a lot of improvements based on your methods.

(02-13-2015 06:52 AM)Dieter Wrote:  The program in its current version uses lots of registers. Some for constants that are better entered directly (e.g. 90, 15, 18, 360), cf. my version. Some more registers are used for intermediate results that are not recalled later. Without these, the register count could drop to ~10 (instead of >20 now).

I went through and eliminated several stored constants by using inline integers. I now use 16 registers. 360 is outside the range of inline integers, but its entry could still be shortened by one step via #036 SDL 001. I still store it the first time it is entered because it is used two more times, so storage and later recall saves a step. 90 and 15 can of course be entered via inline integer, but I store it because when it is used later, RCL arithmetic is used to shave some steps. (In my usage, it saves one step in each case.) But it may be possible to eliminate others by re-use or using the stack, I will look into that.

(02-13-2015 06:52 AM)Dieter Wrote:  Regarding the DST code: my suggestion implements the rules within the EU since 1996 (in earlier years different rules applied, e.g. DST ending in September). This is fine for EU citizens, but users in different places of the world should implement their own DST routine. For "worldwide use" I'd suggest removing the DST part and simply have the user set Flag A if he wants to see DST results (+1 hour). Alternatively the program could always return UTC results. Which would please our UK members and annoy those in Australia/NZ. #-)

Your DST routine was easy to modify (assuming I did it correctly) to implement the DST rules followed in the US (and Canada, I believe, that being that DST starts 2nd Sunday in March, ends 1st Sunday in November). I like having it automatically handled in the program, but a manual mode may be more appropriate for some users, in which case your suggestion to remove the DST code and simply set or not set Flag A is excellent. Flag A lights the big “=” annunciator in the display, so that provides a nice visual indication.

(02-13-2015 06:52 AM)Dieter Wrote:  Finally: like many other HPs, the 34s features direct h.ms arithmetics, so when computing the day length there is no need to convert to decimal hours, subtract and convert back to h.ms again: simply use H.MS– instead. ;-)

Yet another example of my failing to utilize the full capabilities of the wp34s as I attempted to port over versions written for less capable calculators.

Thanks for your review and comments.

Jeff

Dave - My mind is going - I can feel it.
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
(34S) - Sunrise/Sunset - Jeff O. - 01-28-2015, 08:08 PM
RE: WP 34S - Sunrise/Sunset - Kiwi Geoff - 02-09-2015, 10:06 AM
RE: WP 34S - Sunrise/Sunset - Jeff O. - 02-11-2015, 03:22 AM
RE: WP 34S - Sunrise/Sunset - Paul Dale - 02-09-2015, 09:13 PM
RE: WP 34S - Sunrise/Sunset - Dieter - 02-10-2015, 10:31 PM
RE: WP 34S - Sunrise/Sunset - Thomas_Sch - 02-11-2015, 07:48 AM
RE: WP 34S - Sunrise/Sunset - Dieter - 02-11-2015, 03:06 PM
RE: WP 34S - Sunrise/Sunset - Jeff O. - 02-11-2015, 05:49 PM
RE: WP 34S - Sunrise/Sunset - Dieter - 02-11-2015, 09:46 PM
RE: WP 34S - Sunrise/Sunset - Jeff O. - 02-11-2015, 08:03 PM
RE: WP 34S - Sunrise/Sunset - Paul Dale - 02-11-2015, 09:06 PM
RE: WP 34S - Sunrise/Sunset - Jeff O. - 02-13-2015, 12:19 AM
RE: WP 34S - Sunrise/Sunset - Dieter - 02-13-2015, 06:52 AM
RE: WP 34S - Sunrise/Sunset - Jeff O. - 02-13-2015 02:19 PM
RE: WP 34S - Sunrise/Sunset - Dieter - 02-13-2015, 08:01 PM
RE: WP 34S - Sunrise/Sunset - Dieter - 02-15-2015, 07:57 PM
RE: WP 34S - Sunrise/Sunset - Jeff O. - 02-15-2015, 08:31 PM
RE: WP 34S - Sunrise/Sunset - Kiwi Geoff - 02-22-2015, 11:48 AM
RE: WP 34S - Sunrise/Sunset - Thomas_Sch - 02-11-2015, 06:09 PM
RE: WP 34S - Sunrise/Sunset - Kiwi Geoff - 02-21-2015, 02:17 AM
RE: WP 34S - Sunrise/Sunset - Dieter - 02-21-2015, 07:05 AM



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