|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Interface Summary | |
---|---|
AstroConstants | Definitions of useful global constants related to astronomical calculations. |
Class Summary | |
---|---|
Body | A celestial body in astronomical calculations; this class calculates and caches all parameters relating to a specific body. |
Instant | A representation of a particular moment in time, with methods to convert between the numerous time systems used in astronomy. |
Moon | This class represents the Moon, and provides all known information about it. |
Observation | This class represents a particular set of circumstances for a calculation, for example at a particular location and moment in time. |
Planet | This class represents a planet, and provides all known information about it. |
Sun | This class represents the Sun, and provides all known information about it. |
Util | This class contains an implementation of Meeus' interpolation methods. |
Enum Summary | |
---|---|
Body.Field | This enumeration defines the data fields that are stored for each body. |
Body.Name | This enumeration defines the celestial bodies we know about. |
Observation.OField | This enumeration defines the data fields that are stored for each body. |
Exception Summary | |
---|---|
AstroError | This exception is used to indicate an invalid request from the caller. |
CalcError | This exception represents an error within the Astro package; i.e. |
A library of astronomical calculations, providing positions, rise and set times, magnitudes, and other information for the Sun, Moon and planets. The code is based on "Astronomical Algorithms", by Jean Meeus, ISBN-10: 0-943396-61-1. Implemented directly in Java by Ian Cameron Smith.
The key class is Observation
. It's used like this:
Observation
object using
one of its constructors.Observation
to
configure the position and date/time of the desired data, and any
other factors as desired.Observation.getBody(Body.Name which)
to
get each of the astronomical bodies for which data is required. The
methods Observation.getSun()
,
Observation.getMoon()
and
Observation.getPlanet(Body.Name which)
are
convenience methods which return a Sun
,
Moon
or Planet
object; these are subclasses of Body
.Observation.get(OField key)
to
get computed global data about the observation, such as the current value
for nutation; and/or Body.get(Field key)
to get
computed data on a specific body, such as it's azimuth or magnitude.The Observation
and
Body
computes the requested data on
demand. However, the data is cached, so that if it is referred to from
multiple places (which is often true in the internal calculations), it is
only calculated once. Changing the circumstances of the observation
(position, time, etc.) automatically clears all cached data.
See the On Watch application for an example of how it can be used.
|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |