Files
astronomy/source/python
Don Cross 284894c7e1 Updated Windows build process.
Fixed C compiler warnings that show up on Windows but not Linux.
Trim trailing whitespace for target code.
Generate Python documentation.
2019-07-09 16:35:15 -04:00
..
2019-05-15 22:09:24 -04:00
2019-07-09 16:35:15 -04:00

## Functions

BodyCode(name) -> astronomy.Body

Finds the Body enumeration value, given the name of a body.

Parameters

name: str The common English name of a supported celestial body.

Returns

Body If name is a valid body name, returns the enumeration value associated with that body. Otherwise, returns Body.Invalid.

Example

astronomy.BodyCode('Mars') <Body.Mars: 3>


GeoMoon(time: astronomy.Time) -> astronomy.Vector

Calculates the geocentric position of the Moon at a given time.

Given a time of observation, calculates the Moon's position as a vector. The vector gives the location of the Moon's center relative to the Earth's center with x-, y-, and z-components measured in astronomical units.

This algorithm is based on Nautical Almanac Office's Improved Lunar Ephemeris of 1954, which in turn derives from E. W. Brown's lunar theories from the early twentieth century. It is adapted from Turbo Pascal code from the book Astronomy on the Personal Computer by Montenbruck and Pfleger.

Parameters

time : Time The date and time for which to calculate the Moon's position.

Returns

Vector The Moon's position as a vector in J2000 Cartesian equatorial coordinates.


unique(enumeration)

Class decorator for enumerations ensuring unique member values.