The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.

TITLE

almanac - Generate almanac data for a given location

SYNOPSIS

 almanac                        # The White House by default
 almanac sun venus mars         # Only these bodies
 almanac -latitude 52.07 -longitude 4.29 -height 4   # The Hague
 almanac -help
 almanac -version

OPTIONS

-date=date_string

This option specifies the date as a string that can be parsed by Date::Manip. If Date::Manip can not be loaded an error occurs. If this option is specified, -tomorrow is ignored.

-format=strftime_format

This option specifies the strftime format used to display dates and times.

The default is -format '%d-%b-%Y %H:%M:%S %Z'.

-gmt

If asserted, this Boolean option attempts to display the time in GMT. All that it really does is

 local $ENV{TZ} = 'GMT';

which may or may not have the desired effect.

The default is -nogmt.

-help

This option displays the documentation for this script. The script then exits.

-latitude

This option specifies the latitude of the observer north of the Equator, in degrees.

The default is latitude 38.898748.

-longitude

This option specifies the longitude of the observer east of Greenwich, in degrees. West longitudes are negative.

The default is longitude -77.037684

-tomorrow

This Boolean option causes the date to be tomorrow rather than today. It is ignored if -date is specified.

The default is -notomorrow.

-version

This option displays the version of this script. The script then exits.

DETAILS

This Perl script displays today's solar and planetary almanac for the position given on the command line, in latitude north of the Equator, longitude east of the prime meridian, and meters above sea level. If no position is given on the command line, the contents of environment variable ALMANAC_POSITION are broken on spaces and used as the posiiton. If this environment variable is not found, the position of the White House in Washington DC USA is used.

You can look a day ahead by specifying -tomorrow.

Note that unless -gmt is asserted, displayed times are local to the system executing the script, not to the location specified by the -latitude and -longitude options.

ENVIRONMENT

The operation of this script is affected by the following environment variables:

VSOP87D_ALMANAC_OPTIONS

This environment variable contains option names and values. These are parsed out using Text::QuoteWords::shellwords().

Option names must be specified in full, without leading dashes.

Option values must be separate tokens, and may not be specified with name=value syntax.

Boolean options must be specified with a value of 1 (true) or 0 (false).

For example, the value

 format '%Y-%m-%d %H:%M:%S' gmt 1

is equivalent to specifying

 -format '%Y-%m-%d %H:%M:%S' -gmt

on the command line.

AUTHOR

Thomas R. Wyant, III wyant at cpan dot org

COPYRIGHT AND LICENSE

Copyright (C) 2012-2019 by Thomas R. Wyant, III

This program is free software; you can redistribute it and/or modify it under the same terms as Perl 5.10.0. For more details, see the full text of the licenses in the directory LICENSES.

This program is distributed in the hope that it will be useful, but without any warranty; without even the implied warranty of merchantability or fitness for a particular purpose.