Skip to main content

Introduction

kepler contains a set of routines for performing astronomical calculations. The library is implemented in ANSI C and the optional pykepler package provides support for Python.

The intent is to supply the basic building blocks necessary for more advanced applications. Consequently, no attempt has been made to develop an user interface or to write programs for various use cases.

Prerequisites

Make sure your Unix installation has the GNU C compiler and build tools installed. The following are the minimum version requirements.

  1. GNU gcc 4.4.1
  2. GNU Make 3.81
  3. Python 2.6.5 (needed only if you use the Python interface)

kepler can also be used with Microsoft Windows provided you have MinGW and MSYS installed. These tools may be downloaded from http://www.mingw.org/.

Installation

Instructions for downloading the source archives and accessing the development repository may be found at https://github.com/Shiva-Iyer/kepler.

Run 'make target={posix|windows}' in the kepler installation directory to compile all the library files and example programs. In order to call kepler's functions from your own applications, you will need to create your own makefile along the lines of the one in the 'examples' subdirectory.

Run 'make target={posix|windows} install' to deploy the shared library that is created in the previous step. On most systems, you will need to run this as root. You will need to do this before you run the example programs or use the pykepler Python package. On Windows, please copy src/libkepler.dll manually to your application or Windows system directory.

Run 'make target={posix|windows} clean' to remove all the files created by running 'make'. This will not remove the shared libraries or symbolic links in /usr/lib.

The 'pykepler' subdirectory contains the sources for the pykepler Python package. This package allows you to call kepler routines from Python.

Documentation

The C library is documented in the file kepler.html under the 'doc' subdirectory.

The 'pydoc' utility or the help() function in the interactive Python interpreter may be used to view the documentation for the Python interface.

Examples

The following sample programs may be found in the 'examples' subdirectory:

  1. kepler_test.c calls most of the functions in kepler and displays the results in a terminal window. To test the routines in mpc_file.c, you must download the MPC Orbit Database files from http://www.cfa.harvard.edu/iau/MPCORB.html.

  2. rise_set.c is a program that accepts command-line arguments and displays the rise, transit and setting times for the Sun, Moon, planets and Pluto.

  3. planpos. py demonstrates the Python wrapper by calling routines in the VSOP, ELP and Pluto modules to display the positions of the Sun, Moon, planets and Pluto at the time specified on the command-line.

  4. flightseg. py displays the great circle distance and bearing angles for flight segments between the airports specified on the command line. The airport database from http://openflights.org/data.html must be downloaded into the examples folder.

References

kepler is targeted towards users with a sound grasp of positional astronomy. However, it has been thought fit to include references to the relevant astronomical literature in the source code.

No work of this nature would be possible without the following standard works on astronomical algorithms:

  1. Celestial Mechanics - Forest Ray Moulton
  2. Astronomical Algorithms - Jean Meeus
  3. Explanatory supplement to the Astronomical Almanac - P. K. Seidelmann

Release files for pykepler 1.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pykepler 1.0.1
File Size Uploaded
pykepler-1.0.1.tar.gz 1.2 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for pykepler 1.0.1
File Interpreter ABI Platform
pykepler-1.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 2.5 MB

Release files / pykepler-1.0.1.tar.gz

Download URL pykepler-1.0.1.tar.gz
Size 1.2 MB
Tags Source
SHA-256 checksum
How to use checksums
2543e01cbe363b16d6ef83b2fadf1c5d761d08652ea7461ae86c2aa86eb8f8f3
BLAKE2b-256 checksum
How to use checksums
e07e94ff097199ec901cd9241bcc4690f987d66d6164475464a3fedfa587db88
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

Release files / pykepler-1.0.1-py3-none-any.whl

Download URL pykepler-1.0.1-py3-none-any.whl
Size 1.3 MB
Tags Python 3
SHA-256 checksum
How to use checksums
d8be791e1b0e1eb92262f2db544923385e3eecdf660ac1100fa64eca516c343c
BLAKE2b-256 checksum
How to use checksums
86b1a811f2a6abf5d75f9e362a342d16d36924201bcedf26b293075f5a797313
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files

1.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page