SPICE (observation geometry system). SPICE (Spacecraft Planet Instrument C-matrix Events) is a NASA ancillary information system used to compute geometric information used in planning and analyzing science observations obtained from robotic spacecraft. It is also used in planning missions and conducting numerous engineering functions needed to carry out those missions.

SPICE was developed at NASA's Navigation and Ancillary Information Facility (NAIF), located at the Jet Propulsion Laboratory. It has become the de facto standard for handling much of the so-called observation geometry information on NASA's planetary missions, and it is now widely used in support of science data analysis on planetary missions of other space agencies as well. Some SPICE capabilities are also used on a variety of astrophysics, solar physics and earth science missions.

Data 
SPICE data files are usually referred to as "kernels." These files provide information such as spacecraft trajectory and orientation; target body ephemeris, size and shape; instrument field-of-view size, shape and orientation; specifications for reference frames; and tabulations of time system conversion coefficients.

SPICE data are archived in a national archive center such as the NASA Planetary Data System archives.

Kernels
There are five major kernels and five other kernels.

SPK: Space vehicle or target body trajectory (ephemeris)
PcK: Target body size, shape and orientation
IK: Instrument field-of-view size, shape and orientation
CK: Orientation of space vehicle or any articulating structure on it
EK: Events information
ESP: Science Plan 
ESQ: Sequence of events
ENB: Experimenter’s Notebook
Others:
FK: Reference frame specifications
LSK: Leapseconds tabulation
SCLK: Spacecraft clock coefficients
DSK: Digital shape models
MK: Meta-kernel

Software 
The SPICE system includes software referred to as The SPICE Toolkit, used for reading the SPICE data files and computing geometric parameters based on data from those files. These tools are provided as subroutine libraries in four programming languages: C, FORTRAN, IDL, MATLAB and Java Native Interface. Third parties offer Python and Ruby interfaces to the C-language Toolkit. The Toolkits also include a number of utility and application programs. The SPICE Toolkits are available for most popular computing platforms, operating systems and compilers. Extensive documentation accompanies each Toolkit.

Those unable to write their own SPICE-based program may try using WebGeocalc, a browser interface to a SPICE-based geometry engine running on the NAIF server. Using WebGeocalc is much easier than writing your own program, but it still requires considerable knowledge about SPICE data and solar system geometry, and it doesn't offer the full range of computations available when using Toolkit software in your own program.

The NAIF Group also offers a 3-D mission visualization program named SPICE-Enhanced Cosmographia. This program runs in the OSX, Windows and Linux environments. Visual representations of mission SPICE data are controlled using an assortment of menus and GUI controls. A scripting interface is also available.

Tutorials and programming lessons 
A set of tutorials is available to help users understand the SPICE data and software. Some "open book" programming lessons useful in learning how to program using Toolkit subroutines are also available.

Availability 
The SPICE data, Toolkit software, tutorials and programming lessons are all freely available from the NAIF website. There are no licensing or export restrictions. Prospective users are cautioned that it takes some effort to learn to use this software: it is primarily provided for professionals in the space exploration business. Prospective users should carefully read the "Rules" page available at the NAIF website.

External links 
NAIF Website

References 

NASA online
Jet Propulsion Laboratory