JPL ephemerides for Julia
Clone or download
Type Name Latest commit message Commit time
Failed to load latest commit information.
benchmark Julia 1.0 and AstroBase compatibility Sep 25, 2018
src Julia 1.0 and AstroBase compatibility Sep 25, 2018
test Julia 1.0 and AstroBase compatibility Sep 25, 2018
.gitignore Move ASCII API to legacy package and ready for 0.5 Aug 15, 2016
.travis.yml CI Jun 22, 2017 MIT license. Nov 26, 2013 Fix CI settings Mar 24, 2017
REQUIRE Julia 1.0 and AstroBase compatibility Sep 25, 2018
appveyor.yml CI Jun 22, 2017


Travis Status Build status PkgEval v5

The JPL Development Ephemerides are the results of simulations of the Solar System used for spacecraft navigation and astronomical purposes. They are published as SPK kernel files which contain sets of Chebyshev polynomial coefficients with which the position and velocity of the Solar System's planets can be interpolated with high precision for all dates covered by the ephemeris.

This package provides functionality to read SPK files and compute the position and velocity of the planets directly from Julia.


The package can be installed through Julia's package manager.



using JPLEphemeris

# Load the DE430 SPK kernel
spk = SPK("de430.bsp")

# List the available segments

# 2016-01-01T00:00 in Julian days
jd = Dates.datetime2julian(DateTime(2016,1,1,0,0,0))

# Position of Earth's barycenter w.r.t. the Solar System's barycenter at 2016-01-01T00:00
# [km]
pos = position(spk, "earth barycenter", jd)

# Velocity of Earth w.r.t. Earth's barycentre at 2016-01-01T00:00
# [km/s]
vel = velocity(spk, "earth barycenter", "earth", jd)

# Compute the state vector (position and velocity) of Earth's barycenter (NAIF ID: 3)
# w.r.t. to the Solar System's barycenter (NAIF ID: 0) for a range of Julian days
st = state(spk, 0, 3, jd:jd+100)

# Two-part Julian dates (day number and fraction) can be used for higher precision.
# For example for 2016-01-01T12:00:
st = state(spk, 0, 3, jd, 0.5)


The ASCII API that was originally included with this package has been moved to LegacyEphemeris.jl.


The package's test suite uses test files provided by JPL to confirm that the results are correct.


Most of this is based on the excellent jplehem library by Brandon Rhodes. Please use it if you need similar functionality in Python.