Astro-Montenbruck

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

Astro::Montenbruck

Library of astronomical calculations, based on "Astronomy On The Personal
Computer" by O.Montenbruck and T.Phleger, Fourth Edition, Springer-Verlag, 2000.

The main purpose of the library is to calculate positions of the Sun, the Moon,
and the planets with precision that is approximately the same as that found in
astronomical yearbooks. Other modules contain time-related routines, coordinates
conversions, calculation of the ecliptic obliquity and nutation, etc. Over time,
the range of utility functions will grow.

Partially it overlaps some code which already exists in CPAN and elsewhere.
For instance, there is a Perl wrapper for Swiss Ephemeris,
http://www.astrotexte.ch/sources/SwissEph.html. Swiss Ephemeris is fast and
precise C library. Unfortunately, it lacks portability and convenient license.
So, it is not easy for a layman to customize it for her custom application, be
it an online lunar calendar, or tool for amateur sky observations.

The present library is an attempt to find a middle-ground between precision on
the one hand and compact, well organized code on the other. I tried to follow the
best practices of modern Perl programming.

PRECISION

As the book authors state in Introduction to the 4-th edition,
"The errors in the fundamental routines for determining the coordinates of the
Sun, the Moon, and the planets amount to about 1″-3″.


INSTALLATION

To install this module, run the following commands:

	perl Build.PL
	./Build
	./Build installdeps
	./Build test
	./Build install

SUPPORT AND DOCUMENTATION

After installing, you can find documentation for this module with the
perldoc command from the parent directory of the library:

   perldoc Astro::Montenbruck

You can also generate local HTML documentation with

  perl script/createdocs.pl

Documentation files will be installed to docs directory.

USAGE

script/ directory contains examples of the library usage. They will be extended
over time.

* planpos.pl — positions of Sun, Moon and the planets
* riseset.pl — rises and sets of celestial objects 
* phases.pl — lunar phases
* rst_almanac.pl — rises/sets/transits events for a range of dates 
* solequ.pl — solstices and equinoxes
* mercury.pl — very simple demo of calculating Mercury position 
* moon_almanac — rises, sets of the Moon, its positions and lunar phase circumstances for a range of dates

For example, to display current planetary positions, type:

$ perl script/planpos.pl

For list of available options. type:

$ perl script/planpos.pl --help

Most of the scripts have --help option for a short list of options and --man for an extended description.  


HOW TO CONTRIBUTE



( run in 1.651 second using v1.01-cache-2.11-cpan-364913b4093 )