https://github.com/helgee/legacyephemeris.jl
Legacy ASCII API of JPLEphemeris.jl
https://github.com/helgee/legacyephemeris.jl
Last synced: 5 months ago
JSON representation
Legacy ASCII API of JPLEphemeris.jl
- Host: GitHub
- URL: https://github.com/helgee/legacyephemeris.jl
- Owner: helgee
- License: other
- Created: 2016-08-15T10:55:20.000Z (almost 10 years ago)
- Default Branch: master
- Last Pushed: 2016-08-15T13:39:58.000Z (almost 10 years ago)
- Last Synced: 2025-11-30T03:50:33.439Z (8 months ago)
- Language: Julia
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# LegacyEphemeris
[](https://travis-ci.org/helgee/LegacyEphemeris.jl)
[](https://coveralls.io/github/helgee/LegacyEphemeris.jl?branch=master)
[](http://codecov.io/github/helgee/LegacyEphemeris.jl?branch=master)
### Usage
```julia
using JPLEphemeris.ASCII
# Download and convert ephemeris DE421
getephem(421)
# Load ephemeris DE421
eph = Ephemeris(421)
# 2014-01-01T00:00 in Julian days
jd = 2456658.5
# Position of Mercury w.r.t. the Solar System's barycentre at 2014-01-01T00:00
# [km]
pos = position(eph, "mercury", jd)
# Velocity of Mercury w.r.t. the Solar System's barycentre at 2014-01-01T00:00
# [km/day]
vel = velocity(eph, "mercury", jd)
# Complete state vector (position and velocity) for a range of Julian days
st = state(eph, "mercury", jd:jd+100)
# The ephemeris also contains the set of constants with which it was calculated
# e.g. the Astronomical Unit (AU)
au = eph.constants["AU"]
# Close ephemeris file
close(eph)
```
### Available Celestial Bodies
* Mercury: `"mercury"`
* Venus: `"venus"`
* Earth-Moon system's barycenter: `"earthmoon"`
* Mars: `"mars"`
* Jupiter: `"jupiter"`
* Saturn: `"saturn"`
* Uranus: `"uranus"`
* Neptune: `"neptune"`
* Pluto: `"pluto"`
* Moon (geocentric): `"moon"`
* Sun: `"sun"`
* Librations: `"librations"`
* Nutations: `"nutations"`