Skip to content

zacstewart/tengai

Repository files navigation

Tengai

Build Status Dependency Status Code Climate

Tengai is a Gem for using the NASA JPL HORIZONS System. It produces emepherides–tables plotting the course of a celestial body over time.

The JPL HORIZONS on-line solar system data and ephemeris computation service provides access to key solar system data and flexible production of highly accurate ephemerides for solar system objects (603428 asteroids, 3184 comets, 176 planetary satellites, 8 planets, the Sun, L1, L2, select spacecraft, and system barycenters ). HORIZONS is provided by the Solar System Dynamics Group of the Jet Propulsion Laboratory.

Usage

The API is currently very limited. The data from the telnet system is very irregularly structured, and as such parsing it is a big deal.

client = Tengai::Client.new # Connect a client to the telnet server
body = Tengai::Body.find(client, 499) # Get Mars
ephemeris = Tengai::Ephemeris.fetch(client, body,
  start_time: Date.today, stop_time: Date.today + 1, interval: 720) # Get ephemeris data for mars

Contributing :octocat:

The project uses Ragel State Machine Compiler to generate the parser code. If you will be working on that, you'll need to install Ragel (brew install ragel).

  1. Fork
  2. Create a feature branch
  3. Add your feature and test it
  4. Commit
  5. Push your branch
  6. Create a pull request

Testing 👌

Tengai is tested with Test::Unit. Tests are split unto units and integration. Run them with rake test:units and rake test:integration respectively or just rake to run them all.

About

Tengai is a Gem for using the NASA JPL HORIZONS System.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages