SciRuby / spice_rub

Ruby wrapper for the NASA-JPL CSPICE library via SciRuby

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

SpiceRub

Ruby wrapper for the NASA JPL CSPICE Library.

Description

SpiceRub is a wrapper interface for the NASA JPL CSPICE library used for various astronomical calculations. The spicerub gem provides a direct port of the CSPICE API along with additional Ruby functions to make commonly compounded tasks more straightforward. The initial release aims to port a useful subset of the various routines offered by the SPICE toolkit, the major focus of which is on routines related to ephemerides calculations using various JPL ephemerides files.

Requirements

An existing CSPICE installation or download the toolkit package and simply extract the binary file cspice.a. Find an appropriate installation for your architecture here. Please run +bundle install+ in your terminal from the Gem directory to make sure you have all the required Ruby dependencies.

Installation

Clone repository :

git clone https://github.com/gau27/spice_rub.git

Copy CSPICE binary library to the right extension folder (must be renamed to libcspice.a) :

cp path/to/cspice.a ext/spice_rub/cspice/lib/libcspice.a

Compile the gem :

bundle exec rake compile

Run test suite to see if everything works :

bundle exec rake spec

Try out the code without installing the gem :

bundle exec rake pry

Install as a gem :

bundle exec rake install

Features

Kernel Loading Functions

Geometric Co-Ordinate Conversion Functions

Basic Time Conversion and Encoding Functions

Time windows for Observer-Target constraints

Basic Ephemerides Functions

All ported CSPICE functions can be accessed by the call ‘SpiceRub::Native.CSPICE_FUNCTION_NAME`

License

Copyright © 2016, Gaurav Tamba and The Ruby Science Foundation.

All rights reserved.

About

Ruby wrapper for the NASA-JPL CSPICE library via SciRuby

License:Other


Languages

Language:C++ 55.8%Language:C 23.4%Language:Objective-C 14.5%Language:Ruby 6.1%Language:HCL 0.1%