By WJR, Thu June 23 2022
A set of scripts (bash and awk) which produce localized planet rise and set times utilizing output from aa (Stephen L. Moshier's astronomical almanac program).
planet-rs.sh takes standard aa input (refer to my post on aa for an example) and, optionally, time zone and time zone label. In the example below, rise and set times are displayed for Mars, in July for EDT (-4 hours from UT).
jeffr@Europa: ~/planet-rs $ ./planet-rs.sh Mars-2022.txt -4 EDT | grep July rises 2022 July 1 Friday 2h 10m 23.190s EDT sets 2022 July 1 Friday 15h 15m 38.982s EDT rises 2022 July 2 Saturday 2h 08m 14.168s EDT sets 2022 July 2 Saturday 15h 15m 15.134s EDT rises 2022 July 3 Sunday 2h 06m 05.293s EDT sets 2022 July 3 Sunday 15h 14m 50.878s EDT rises 2022 July 4 Monday 2h 03m 56.569s EDT sets 2022 July 4 Monday 15h 14m 26.205s EDT rises 2022 July 5 Tuesday 2h 01m 47.999s EDT sets 2022 July 5 Tuesday 15h 14m 01.107s EDT …
The package below includes a sample aa.ini (edit to reflect desired latitude, longitude, etc.) as well as input files for various planets. The scripts have been tested on Ubuntu Linux and Cygwin.
By WJR, Thu June 16 2022
Stephen L. Moshier's venerable aa program (an astronomical almanac used to calculate planet and star positions), compiled for Cygwin (gcc version 11.3.0). It can be used interactively, or input can be directed from a text file.
aa - Astronomical Almanac, version 5.6 (aa-5.6.tar.gz, 161K)
Used interactively, simply
./aa. Or with input directed from a file,
./aa < Mars-2022-06.txt. Sample input file Mars-2022-06.txt to display data for Mars in June, 2022. The second set of numbers, ending with -1, tells aa to quit.
Longitude, latitude, altitude, and other local parameters are specified in the aa.ini file. Note: this file must reside in the same directory as the aa executable.
-84.17 ;Terrestrial east longitude of observer, degrees 39.95 ;Geodetic latitude, degrees 252.0 ;Height above sea level, meters 10.0 ;Atmospheric temperature, deg C 1000.0 ;Atmospheric pressure, millibars 1 ; 0 - TDT=UT, 1 - input=TDT, 2 - input=UT 0.0 ;Use this deltaT (sec) if nonzero, else compute it.
Refer to the read.me file included with the distribution.