Hello Jeff O,
Thank you for making the WP34s "RS" code available.
I was interested to find out how accurate a few lines of trig on a calculator could be - and was *astonished* how well your program predicts the Sunrise / Sunset.
Here is a graph that shows how well your program works compared to a JPL ephemeris (DE200). Using the default location and UTC offset in your code.
The averaged "sunrise error" is just 1 second over 2015.
This is more than enough accuracy for the purpose - because "optical effects" on the horizon can have a much greater effect on when we 'see' the sunrise.
Here is a sample of the DE200 derived "RS" for April 2015 for those that would like to run your program Jeff, and have an accurate reference to show just how well the WP34s program performs. Using the default location and UTC offset in the code.
Code:
2015-04-01 r 07:09:15.878 Az = 83.874
2015-04-01 t 13:26:02.520 El = 59.503
2015-04-01 s 19:43:23.599 Az = 276.373
2015-04-02 r 07:07:52.315 Az = 83.403
2015-04-02 t 13:25:44.701 El = 59.888
2015-04-02 s 19:44:11.555 Az = 276.845
2015-04-03 r 07:06:29.010 Az = 82.932
2015-04-03 t 13:25:27.009 El = 60.271
2015-04-03 s 19:44:59.498 Az = 277.315
2015-04-04 r 07:05:05.996 Az = 82.464
2015-04-04 t 13:25:09.463 El = 60.653
2015-04-04 s 19:45:47.441 Az = 277.783
2015-04-05 r 07:03:43.302 Az = 81.997
2015-04-05 t 13:24:52.088 El = 61.033
2015-04-05 s 19:46:35.396 Az = 278.249
2015-04-06 r 07:02:20.962 Az = 81.532
2015-04-06 t 13:24:34.904 El = 61.411
2015-04-06 s 19:47:23.375 Az = 278.714
2015-04-07 r 07:00:59.005 Az = 81.070
2015-04-07 t 13:24:17.933 El = 61.787
2015-04-07 s 19:48:11.389 Az = 279.176
2015-04-08 r 06:59:37.464 Az = 80.609
2015-04-08 t 13:24:01.195 El = 62.162
2015-04-08 s 19:48:59.450 Az = 279.636
2015-04-09 r 06:58:16.369 Az = 80.151
2015-04-09 t 13:23:44.712 El = 62.534
2015-04-09 s 19:49:47.565 Az = 280.094
2015-04-10 r 06:56:55.752 Az = 79.695
2015-04-10 t 13:23:28.503 El = 62.904
2015-04-10 s 19:50:35.745 Az = 280.549
2015-04-11 r 06:55:35.644 Az = 79.241
2015-04-11 t 13:23:12.587 El = 63.272
2015-04-11 s 19:51:23.995 Az = 281.002
2015-04-12 r 06:54:16.074 Az = 78.790
2015-04-12 t 13:22:56.983 El = 63.638
2015-04-12 s 19:52:12.321 Az = 281.452
2015-04-13 r 06:52:57.073 Az = 78.342
2015-04-13 t 13:22:41.708 El = 64.001
2015-04-13 s 19:53:00.727 Az = 281.900
2015-04-14 r 06:51:38.669 Az = 77.897
2015-04-14 t 13:22:26.775 El = 64.362
2015-04-14 s 19:53:49.215 Az = 282.344
2015-04-15 r 06:50:20.891 Az = 77.454
2015-04-15 t 13:22:12.201 El = 64.720
2015-04-15 s 19:54:37.783 Az = 282.786
2015-04-16 r 06:49:03.766 Az = 77.014
2015-04-16 t 13:21:57.997 El = 65.076
2015-04-16 s 19:55:26.431 Az = 283.225
2015-04-17 r 06:47:47.318 Az = 76.578
2015-04-17 t 13:21:44.174 El = 65.428
2015-04-17 s 19:56:15.154 Az = 283.660
2015-04-18 r 06:46:31.572 Az = 76.145
2015-04-18 t 13:21:30.742 El = 65.778
2015-04-18 s 19:57:03.946 Az = 284.092
2015-04-19 r 06:45:16.552 Az = 75.715
2015-04-19 t 13:21:17.709 El = 66.125
2015-04-19 s 19:57:52.801 Az = 284.520
2015-04-20 r 06:44:02.282 Az = 75.289
2015-04-20 t 13:21:05.084 El = 66.469
2015-04-20 s 19:58:41.712 Az = 284.945
2015-04-21 r 06:42:48.788 Az = 74.866
2015-04-21 t 13:20:52.876 El = 66.809
2015-04-21 s 19:59:30.672 Az = 285.367
2015-04-22 r 06:41:36.093 Az = 74.447
2015-04-22 t 13:20:41.094 El = 67.146
2015-04-22 s 20:00:19.671 Az = 285.784
2015-04-23 r 06:40:24.225 Az = 74.031
2015-04-23 t 13:20:29.747 El = 67.480
2015-04-23 s 20:01:08.704 Az = 286.198
2015-04-24 r 06:39:13.212 Az = 73.620
2015-04-24 t 13:20:18.847 El = 67.811
2015-04-24 s 20:01:57.764 Az = 286.608
2015-04-25 r 06:38:03.079 Az = 73.213
2015-04-25 t 13:20:08.402 El = 68.138
2015-04-25 s 20:02:46.843 Az = 287.013
2015-04-26 r 06:36:53.856 Az = 72.810
2015-04-26 t 13:19:58.425 El = 68.461
2015-04-26 s 20:03:35.934 Az = 287.414
2015-04-27 r 06:35:45.572 Az = 72.411
2015-04-27 t 13:19:48.925 El = 68.780
2015-04-27 s 20:04:25.031 Az = 287.811
2015-04-28 r 06:34:38.253 Az = 72.017
2015-04-28 t 13:19:39.913 El = 69.096
2015-04-28 s 20:05:14.126 Az = 288.203
2015-04-29 r 06:33:31.931 Az = 71.627
2015-04-29 t 13:19:31.401 El = 69.407
2015-04-29 s 20:06:03.211 Az = 288.591
2015-04-30 r 06:32:26.633 Az = 71.242
2015-04-30 t 13:19:23.398 El = 69.715
2015-04-30 s 20:06:52.277 Az = 288.974
Many thanks for the program Jeff.
Regards, Kiwi Geoff (Christchurch, New Zealand).