Blog

Article Tags

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

By WJR, 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. 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

Download

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

Related Articles