SaturnLs: a command line tool to convert Saturn solar longitude, Ls, and date.
Measurements or observations of Titan's atmosphere are usually reported in terms of time and date on the Earth-based Gregorian calendar, but it's easier to understand Titan's climate and seasonal cycles using a calendar system based on Saturn's position in its orbit. I wrote SaturnLs to provide a way to easily convert from Earth date to solar longitude and back using a simple command line tool. The script uses ephemeris downloaded from JPL's Horizons tool and is used as follows:
> saturnLs 2012-08-03 # convert date to Ls
Ls(2012-08-03) = SY 9, 35.8979°
> saturnLs 26.3 # convert Ls to date
Date(SY 9, 26.3°) = 2011-10-09 20:43:29.169254400
> saturnLs -s 2012-08-03 35.9 # simple output
9 35.8979
2012-08-03 01:28:42.530291200
> saturnLs 2012-08-03 35.9 # convert multiple dates
Ls(2012-08-03) = SY 9, 35.8979°
Date(SY 9, 35.9°) = 2012-08-03 01:28:42.530291200
> saturnLs -S 8 35.9 # specify Saturn year
Date(SY 8, 35.9°) = 1983-02-22 17:23:45.891884032
> saturnLs -j 63.2 # return Julian date
Date(SY 9, 63.2°) = 2457015.818940