Blog

Article Tags

Old Farmer's Almanac Sun/Planetary Rise and Set Times

By William Jeffrey Rankin, Sat Nov 12 2022

A set of scripts written in the Rexx programming language that produce localized sun/planetary rise/set times based upon data in The Old Farmer's Almanac. These have been replaced by the Astronomical Almanac scripts, but are still occasionally useful.

Included are supporting libraries (CORTIME.rex and TIMEADJS.rex) and sample data files. The DAY.txt file contains time adjustments for locality and should be replaced with appropriate values for your location (refer to the Time Corrections section in the almanac).

The scripts have been tested on Cygwin, Linux, Windows 10, and FreeDOS.

Example Usage

srss.rex: Takes a file containing uncorrected sunrise and set values from the Old Farmer's Almanac and a file containing time corrections for locality. Pass 'today' as third argument to show results for current day only. Outputs corrected values.

jeffr@Ganymede: ~/rise-set-times $ regina srss.rex srss-data.txt DAY.txt | tail -n 5
11/26/2022, 7:32 AM, 5:16 PM
11/27/2022, 7:33 AM, 5:15 PM
11/28/2022, 7:34 AM, 5:15 PM
11/29/2022, 7:36 AM, 5:14 PM
11/30/2022, 7:37 AM, 5:14 PM

planets.rex: Takes a file containing uncorrected planet rise and set values and a file containing time corrections for locality. Outputs corrected values.

jeffr@Ganymede: ~/rise-set-times $ regina planets.rex planet-data-2022.txt DAY.txt | tail -n 5
10/11/2022, Saturn, Set, 2:48 AM
10/21/2022, Venus, Set, 6:52 PM
10/21/2022, Mars, Rise, 9:45 PM
10/21/2022, Jupiter, Set, 5:41 AM
10/21/2022, Saturn, Set, 2:08 AM

rscli.rex: A simple command line interface to the CORTIME library. Takes an uncorrected time, AM/PM, a file containing time corrections for locality, and correction column. Outputs corrected time.

jeffr@Ganymede: ~/rise-set-times $ regina rscli.rex 6:32 AM DAY.txt e
7:16 AM

lod.rex: Takes the output of srss.rex and calculates day lengths.

jeffr@Ganymede: ~/rise-set-times $ regina srss.rex srss-data.txt DAY.txt \ | tail -n 5 | regina lod.rex
12/27/2022, 9:06
12/28/2022, 9:06
12/29/2022, 9:07
12/30/2022, 9:08
12/31/2022, 9:08

Download

rise-set-times.tar.gz, 7K

Related Articles