Skip to main content

JPL HORIZONS System client

Project description

horizons

A python client for the JPL HORIZONS System.

This is an ugly regex fueled API. JPL has a much cleaner SSD/CNEOS API Service that overlaps with HORIZONS in some places. HORIZONS' orbital element data on "Major Bodies" (i.e. planets, moons, and some others) are not available yet in this other collection of APIs. This project only aims to cover those features.

Only getting position and velocity vectors of major bodies is supported. This project could be extended to pull from other features of HORIZONS, like retrieving orbital elements.

Usage

from horizons import Horizons

with Horizons() as h:
    bodies = h.get_major_bodies() # equivalent to 'MB' in HORIZONS
    print(bodies)
    # [
    #   ...,
    #   horizons.BodyResult(
    #     id='301',
    #     name='Moon',
    #     designation='',
    #     other='Luna'
    #   ),
    #   ...
    # ]

    moon_vectors = h.get_vectors('301', center='399')
    print(moon_vectors)
    # horizons.VectorsResult(
    #   epoch_jd_tdb=2458642.5,
    #   calendar_date_tdb='A.D. 2019-Jun-08 00:00:00.0000',
    #   pos_km=(
    #     -268370.0664760619,
    #     252047.1714898835,
    #     16377.37006983293
    #   ),
    #   vel_kmps=(
    #     -0.7239795957732902,
    #     -0.7759062564667508,
    #     0.08457449888090685
    #   )
    # )

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

horizons-0.2.2.tar.gz (5.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

horizons-0.2.2-py3-none-any.whl (7.7 kB view details)

Uploaded Python 3

File details

Details for the file horizons-0.2.2.tar.gz.

File metadata

  • Download URL: horizons-0.2.2.tar.gz
  • Upload date:
  • Size: 5.9 kB
  • Tags: Source
  • Uploaded using 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.1

File hashes

Hashes for horizons-0.2.2.tar.gz
Algorithm Hash digest
SHA256 e8f57981ad6fc68aa55e192e49141092a8284b2ff41dc54a7a1b93785d13f316
MD5 6d5bdf004105c142b77684522f9a06b2
BLAKE2b-256 73dff1d615f6d6049b594b5048ef13a31e16f847b021f6b419745a2b18ee9eb7

See more details on using hashes here.

File details

Details for the file horizons-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: horizons-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 7.7 kB
  • Tags: Python 3
  • Uploaded using 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.1

File hashes

Hashes for horizons-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 9aab770f5bcd226ea35a644038f2a9b3d5646f6bc88427f5d46a80f280330f17
MD5 c651ccf69fc2f0be6e328f8c2836cb5d
BLAKE2b-256 d43ce50ddb15e9ab6d865583a75112e18e1b1e805a55018aca45320b4e21768f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page