Saturday, September 12, 2015

Ephemeris emails

Along with the headless mode, you can now send ephemeris emails to whoever you want.
The email you'd receive would look like this:

Ephemeris for 12 Sep 2015

At N  37°46.00' / W 122°31.00'
Sun Rise:12 Sep 2015 06:52
Sun Set :12 Sep 2015 19:20
Moon Phase: 28 day(s).

Tide at Ocean Beach:
LW Sat Sep 12 04:52:00 PDT 2015 : +0.40 feet
HW Sat Sep 12 11:34:00 PDT 2015 : +5.27 feet
LW Sat Sep 12 17:09:00 PDT 2015 : +1.45 feet
HW Sat Sep 12 23:14:00 PDT 2015 : +5.47 feet

For this, you need to set some preferences:
  • The position is used for the sun rise and set
  • The tide station must be spelled exactly as in the tide application (in the Navigation Console)
  • You can send to several recepients, separated with a semi-column
  • The timezone is used to display the sun ephemeris
  • The email provider refers to the file, see below, this file must be in the all-scripts directory.
The email provider mentionned in the preferences can be in this example yahoo, google, or oracle.
When all this is set, you have to modify the command line that starts the Weather Wizard in headless mode:
set JAVA_OPTIONS=%JAVA_OPTIONS% -Dheadless=true
This will generate the email displayed above every day at 5am local time.
PS: The code is in github, see below for details.