ilbagatto/astropc
Library of core routines for practical astronomy
AstroPC
Library of core routines for practical astronomy.
Features
- Converts between Civil and Julian dates.
- Calculates difference between Universial Coordinated and Terrestrial Dynamic time (Delta-T).
- Calculates Sidereal (Stellar) time.
- Calculates Nutation and Obliquity of the ecliptic.
- Transforming between various types of celestial coordinates.
- Miscallenous mathematical routines usefull for practical astronomy.
- Accurate positions of Sun, Moon and the planets, including Pluto.
- Time of solstices, equinoxes and lunations.
Getting started
Add to pubspec.yaml of your project
dependencies:
...
astropc:
git:
url: https://github.com/ilbagatto/astropc.git
ref: master
...Then run:
$ dart pub updateUsage
See tests/ and examples/ for usage examples.
Running examples
$ dart .\example\julian.dart
$ dart .\example\julian.dart --helpYou may also compile the examples to platform-specific binary, e.g.:
> dart compile exe .\example\julian.dart
> example\julian.exeUnit tests
$ dart test ./testAdditional information
Civil vs. Astronomical year
There is disagreement between astronomers and historians about how to count
the years preceding the year 1. Astronomers generally use zero-based system.
The year before the year +1, is the year zero, and the year preceding the
latter is the year -1. The year which the historians call 585 B.C. is
actually the year -584.
Zero day
Zero day is a special case of date: it indicates 12h UT of previous calendar
date. For instance, 1900 January 0.5 is often used instead of
1899 December 31.5 to designate start of the astronomical epoch.
Gregorian calendar
Civil calendar in most cases means proleptic Gregorian calendar. it is
assumed that Gregorian calendar started at Oct. 4, 1582, when it was first
adopted in several European countries. Many other countries still used the
older Julian calendar. In Soviet Russia, for instance, Gregorian system was
accepted on Jan 26, 1918. See
Wiki article.
Sources
The formulae were adopted from the following sources:
- Peter Duffett-Smith, "Astronomy With Your Personal Computer", Cambridge University Press, 1997
- Jean Meeus, "Astronomical Algorithms", 2d edition, Willmann-Bell, 1998
- J.L.Lawrence, "Celestial Calculations", The MIT Press, 2018
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 other means.
Footnotes