-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathREADME
110 lines (73 loc) · 3.96 KB
/
README
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
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
You may contribute to the project by many different ways, starting from refining and correcting its documentation,
especially if you are a native English speaker, and ending with improving the code base. Any kind of testing and
suggestions are welcome.
You may follow the standard Github procedures or, in case you are not comfortable with them, just send your suggestions
to the author by email "krushi at cpan.org".
LICENSE AND COPYRIGHT
Copyright (C) 2010-2022 Sergey Krushinsky
This program is free software; you can redistribute it and/or modify it
under the terms of the the Artistic License (1.0). You may obtain a
copy of the full license at:
https://dev.perl.org/licenses/artistic.html
Aggregation of this Package with a commercial distribution is always
permitted provided that the use of this Package is embedded; that is,
when no overt attempt is made to make this Package's interfaces visible
to the end user of the commercial distribution. Such use shall not be
construed as a distribution of this Package.
The name of the Copyright Holder may not be used to endorse or promote
products derived from this software without specific prior written
permission.
THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED
WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF
MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.