Navigation and Ancillary Information Facility NIF Introduction to the SPICE Toolkit April 2006.

Slides:



Advertisements
Similar presentations
Navigation and Ancillary Information Facility NIF SPICE Conventions A summary of many “standards,” lingo and common usage within SPICE April 2006.
Advertisements

Navigation and Ancillary Information Facility NIF The SPICE system has been developed by the Jet Propulsion Laboratory, California Institute of Technology,
Navigation and Ancillary Information Facility NIF Introduction to the SPICE Toolkit October 2007.
Navigation and Ancillary Information Facility NIF SPICE Conventions A summary of many “standards,” lingo and common usage within SPICE October 2007.
Navigation and Ancillary Information Facility NIF Shape Model Subsystem Preview (DSK) November 2014.
Navigation and Ancillary Information Facility NIF Matlab Interface to CSPICE “Mice” How to Access the CSPICE library Using Matlab © November 2014 © The.
Navigation and Ancillary Information Facility NIF Porting Kernels October 2014.
Navigation and Ancillary Information Facility NIF Porting Kernels January 2009.
Navigation and Ancillary Information Facility NIF Time Conversion and Time Formats January 2009.
Navigation and Ancillary Information Facility NIF Time Conversion and Time Formats November 2014.
Navigation and Ancillary Information Facility NIF Getting and Installing the SPICE Toolkit October 2014.
Navigation and Ancillary Information Facility NIF Leapseconds and Spacecraft Clock Kernels LSK and SCLK November 2014.
Navigation and Ancillary Information Facility NIF Introduction to the Family of SPICE Toolkits January 2009.
Navigation and Ancillary Information Facility NIF Introduction to the Family of SPICE Toolkits November 2014.
Navigation and Ancillary Information Facility NIF MATLAB Interface to CSPICE “Mice” How to Access the CSPICE library Using MATLAB © October 2007 © The.
Navigation and Ancillary Information Facility NIF SPICE Conventions A summary of standards, lingo and common usage within SPICE November 2014.
Navigation and Ancillary Information Facility NIF JNISPICE March 2006.
Navigation and Ancillary Information Facility NIF “Camera-matrix” Kernel CK (Orientation or Attitude Kernel) Emphasis on reading CK files October 2014.
Navigation and Ancillary Information Facility NIF Derived Quantities November 2014.
Navigation and Ancillary Information Facility NIF Introduction to Kernels November 2005.
Navigation and Ancillary Information Facility NIF Preparing for Programming Using the SPICE Toolkit January 2009.
Navigation and Ancillary Information Facility NIF Preparing for Programming Using the SPICE Toolkit March 2010.
Navigation and Ancillary Information Facility NIF Preparing for Programming Using the SPICE Toolkits November 2014.
Navigation and Ancillary Information Facility NIF SPICE Conventions A summary of standards, lingo and common usage within SPICE November 2014.
Navigation and Ancillary Information Facility NIF Leapseconds and Spacecraft Clock Kernels LSK and SCLK April 2006.
Navigation and Ancillary Information Facility NIF Summary of Key Points January 2009.
Navigation and Ancillary Information Facility NIF Summary of Key Points October 2014.
Navigation and Ancillary Information Facility NIF Preparing for Programming Using the SPICE Toolkit January 2008.
Navigation and Ancillary Information Facility NIF Toolkit Applications March 2006.
Navigation and Ancillary Information Facility NIF Event Finding Subsystem Preview Capabilities, Current Status and Plans January 2009.
Navigation and Ancillary Information Facility NIF IDL Interface to CSPICE “Icy” How to Access the CSPICE library Using Interactive Data Language (IDL)
Navigation and Ancillary Information Facility NIF IDL Interface to CSPICE “Icy” How to Access the CSPICE library Using Interactive Data Language (IDL)
Navigation and Ancillary Information Facility NIF Introduction to Kernels January 2009.
Navigation and Ancillary Information Facility NIF Exception Handling November 2014.
Navigation and Ancillary Information Facility NIF IDL Interface to CSPICE “Icy” How to Access the CSPICE library Using Interactive Data Language (IDL)
Navigation and Ancillary Information Facility NIF IDL Interface to CSPICE “Icy” How to Access the CSPICE library from the Interactive Data Language (IDL)
Navigation and Ancillary Information Facility NIF Exception Handling October 2014.
Navigation and Ancillary Information Facility NIF Using C-kernels to Capture Instrument Articulation June 28, 2002 Scott Turner
Navigation and Ancillary Information Facility NIF Porting Kernels November 2005.
Navigation and Ancillary Information Facility NIF Introduction to the SPICE Toolkit March 2006.
Navigation and Ancillary Information Facility NIF Getting Started Using SPICE April 2006.
Navigation and Ancillary Information Facility NIF Instrument Kernel IK November 2014.
Navigation and Ancillary Information Facility NIF Events Kernel Sequence Component ESQ One of three components of the E-kernel Subsystem June 2004.
Navigation and Ancillary Information Facility NIF SPICE System Development Plans March 2006.
Navigation and Ancillary Information Facility NIF Introduction to the SPICE Toolkit June 2004.
Navigation and Ancillary Information Facility NIF Introduction to the Family of SPICE Toolkits October 2014.
Navigation and Ancillary Information Facility NIF Planetary Constants Kernel PCK October 2014.
Navigation and Ancillary Information Facility NIF Introduction to Kernels March 2010.
Navigation and Ancillary Information Facility NIF SPICE Toolkit Common Problems November 2014.
Navigation and Ancillary Information Facility NIF Using Module Headers April 2006.
Navigation and Ancillary Information Facility NIF Frames Kernel FK March 2006.
Navigation and Ancillary Information Facility NIF Porting SPICE Kernels Between Computers June 2004.
Navigation and Ancillary Information Facility NIF Time Conversion and Time Formats March 2010.
Navigation and Ancillary Information Facility NIF SPICE Toolkit Common Problems October 2007.
Navigation and Ancillary Information Facility NIF Porting Kernels March 2010.
Navigation and Ancillary Information Facility NIF Getting and Installing the SPICE Toolkit November 2014.
Navigation and Ancillary Information Facility NIF Welcome to the SPICE Tutorials March 2010.
Navigation and Ancillary Information Facility NIF Welcome to the SPICE Training Class October 2007.
Navigation and Ancillary Information Facility NIF SPICE Conventions A summary of many “standards,” lingo and common usage within SPICE June 2004.
Navigation and Ancillary Information Facility NIF Frames Kernel FK March 2010.
Navigation and Ancillary Information Facility NIF Getting and Installing the SPICE Toolkit January 2008.
Navigation and Ancillary Information Facility NIF Getting and Installing the SPICE Toolkit April 2006.
Introduction to the Family of SPICE Toolkits
Preparing for Programming Using the SPICE Toolkits
Shape Model Subsystem Preview (DSK)
Summary of Key Points October 2007.
Toolkit Applications June 2004.
IDL Interface to CSPICE “Icy”
Frames Kernel FK October 2007.
Presentation transcript:

Navigation and Ancillary Information Facility NIF Introduction to the SPICE Toolkit April 2006

Navigation and Ancillary Information Facility NIF Introduction to the SPICE Toolkit 2 SPICE Toolkit Components SPICE Toolkits for Fortran, C, and IDL Supported Platforms Kernels Applications Library Functionality Documentation Installed Directory Structure Topics

Navigation and Ancillary Information Facility NIF Introduction to the SPICE Toolkit 3 The SPICE Toolkit is available in Fortran, C and IDL * –The Fortran and C Toolkits provide virtually identical functionality »Differences will be elaborated upon later –Icy, the IDL Toolkit, will eventually duplicate almost all functionality from the C Toolkit API-level routines. Toolkits contain: –Software »Subroutine libraries, with source code included SPICELIB (Fortran) CSPICE (C) Icy (C) »Executable programs application and utility programs cookbook examples »Installation scripts –Documentation »readme »dscriptn.txt (continued on next page ) SPICE Toolkit Components - 1 *IDL = Interactive Data Language, by Research Systems, Inc.

Navigation and Ancillary Information Facility NIF Introduction to the SPICE Toolkit 4 »intrdctn.txt »whats.new »“Required Reading” reference documents for major families (ASCII and HTML) »User’s Guides for executables (ASCII and HTML) »permuted index Fortran Toolkit: spicelib.idx CSPICE, Icy: cspice.idx »mostused.pdf (Fortran Toolkit only) »module headers (ASCII for SPICELIB, ASCII and HTML for CSPICE, HTML for Icy) –Data »Sample kernel files Supplied ONLY for use with cookbook programs, not valid for general use The components listed above are included in the generic Toolkit –Toolkits delivered to missions or other special customers may be augmented with mission- or customer-specific products SPICE Toolkit Components - 2

Navigation and Ancillary Information Facility NIF Introduction to the SPICE Toolkit 5 The Fortran SPICE Toolkit: –Developed first: in use since February 1990 –Contains code written in ANSI Standard Fortran 77 »A few widely supported non-ANSI extensions are used, for example DO WHILE, DO…END DO –Compiles under a wide variety of Fortran compilers Fortran SPICE Toolkit

Navigation and Ancillary Information Facility NIF Introduction to the SPICE Toolkit 6 CSPICE - 1 CSPICE is designed to duplicate the functionality of the Fortran Toolkit –All CSPICE source code is in ANSI C »Fortran SPICE Toolkit code has been converted to ANSI C using the automatic translation program f2c »High-level functions have been hand-coded in C and documented in C style in order to provide a natural C- style API. These functions are called “wrappers” »Most wrappers encapsulate calls to C functions generated by f2c The simpler wrappers do their work in-line, to boost performance »f2c’d functions may be called directly, but this is not recommended since f2c’d functions emulate Fortran functionality: Call by reference Fortran-style array indexing Fortran-style strings (continued on next page)

Navigation and Ancillary Information Facility NIF Introduction to the SPICE Toolkit 7 CSPICE runs under a wide variety of ANSI C compilers CSPICE functions may be called from within C++ source code –CSPICE prototypes are protected from name mangling Current CSPICE Limitations –Not all “Required Reading” reference documents have been converted to C style, with C examples »Eventually all will be converted –CSPICE wrappers exist for only a subset of the functionality provided by SPICELIB »Includes all the most commonly used modules »More will be added as time permits CSPICE - 2 (continued on next page)

Navigation and Ancillary Information Facility NIF Introduction to the SPICE Toolkit 8 –In some very limited cases, code generated by f2c fails to emulate Fortran accurately »List-directed I/O has some problems (not consequential for CSPICE) »Treatment of white space in text output is slightly different in CSPICE »Logical unit-to-file name translation does not handle file name "synonyms" properly under Linux: once opened with a specified name, a file must be referred to using the same name throughout a program run. CSPICE - 3

Navigation and Ancillary Information Facility NIF Introduction to the SPICE Toolkit 9 Icy - 1 Icy is a SPICE Toolkit for IDL users. –First delivered as part of the N0057 Toolkit in March, –Has existed as a distributed prototype system for several years. Icy provides an IDL-callable “wrapper” interface for many CSPICE wrapper routines –Example: »CSPICE: spkezr_c ( targ, et, ref, abcorr, obs, state, &ltime ); »Icy: cspice_spkezr, targ, et, ref, abcorr, obs, state, ltime –More IDL-callable wrappers are being added as time permits By necessity all Icy Toolkit packages include the complete CSPICE Toolkit.

Navigation and Ancillary Information Facility NIF Introduction to the SPICE Toolkit 10 Icy - 2 Icy API software components –IDL interface wrappers (implemented in ANSI C) –Icy cookbook programs (implemented in IDL) Icy Documentation –Icy Reference Guide »Each Icy wrapper has an HTML page serving as SPICE “module header” »Principal documentation showing how to call Icy wrappers »HTML pages contain code examples –Icy Required Reading »Provides background information essential for programming with Icy Icy Testing –A regression test suite (ticy) exercises the complete Icy API on all supported platforms.

Navigation and Ancillary Information Facility NIF Introduction to the SPICE Toolkit 11 Kernel Compatibility The Fortran, CSPICE and IDL Toolkits use identical kernel files on all platforms.

Navigation and Ancillary Information Facility NIF Introduction to the SPICE Toolkit 12 The SPICE Toolkit has been ported to a wide variety of popular platforms –Each platform is characterized by »Hardware type »Operating System »Compiler »Selected compilation options NAIF provides SPICE Toolkit packages for each supported platform –If you cannot find a pre-built package for the platform of interest to you, contact NAIF »Don’t try to port the Toolkit from another platform Supported Platforms - 1

Navigation and Ancillary Information Facility NIF Introduction to the SPICE Toolkit 13 Supported Platforms - FORTRAN Product NameOperating SystemCompiler HPHP-UXHP FORTRAN Mac_OSX_AbsoftOS 10.xAbsoft f77 Mac_OSX_g77OS 10.xg77 PC_CygwinWindows/Cygwing77 PC_LaheyWindows 95/98/NT/2K/XPLahey 95 PC_LinuxRed Hat Linux 6.1+g77 PC_Win95/NT_Digital FORTRAN Windows 95/98/NT/2K/XPVisual Fortran (Digital/Compaq) Sun_SolarisSolaris 7+Sun Fortran

Navigation and Ancillary Information Facility NIF Introduction to the SPICE Toolkit 14 Supported Platforms - C Product NameOperating SystemCompiler HP_CHP-UXHP C Mac_OSX_Apple_COS 10.xgcc 3.9x PC_Cygwin_CWindows/Cygwingcc 3.9x PC_Linux_CRed Hat Linux 6.1+gcc 3.9x PC_Win95NT_CWin 95/98/NT/2K/XPMS Visual C/C++ Sun_Solaris_CSolaris 7+Sun C Sun_Solaris_GCCSolaris 7+gcc 3.9x Sun_Solaris_GCC_64bitSolaris 7+gcc 64 bit 3.9x

Navigation and Ancillary Information Facility NIF Introduction to the SPICE Toolkit 15 Supported Platforms - IDL Product NameOperating SystemCompiler Mac_OSX_Apple_COS 10.xgcc 3.9x PC_Linux_CRed Hat Linux 6.1+gcc 3.9x PC_Win95NT_CWin 95/98/NT/2K/XPMS Visual C/C++ Sun_Solaris_CSolaris 7+Sun C Sun_Solaris_GCCSolaris 7+gcc 3.9x Icy was built and tested using IDL version 6.2

Navigation and Ancillary Information Facility NIF Introduction to the SPICE Toolkit 16 SPICE Toolkit utility programs are available to: –port binary SPICE kernels between incompatible systems »tobin, toxfr, spacit –add comments to binary kernels »commnt –read comments from binary kernels »commnt, spacit »inspekt (only for EK/ESQ files) –summarize coverage of binary kernels »brief, ckbrief, spacit –merge or subset SPK files »spkmerge –indicate current Toolkit version »version Toolkit Utility Programs

Navigation and Ancillary Information Facility NIF Introduction to the SPICE Toolkit 17 SPICE Toolkit application programs perform various tasks: –create a new SPK file from a text file holding one of various kinds of state vectors »mkspk –carry out a wide assortment of time conversions »chronos –query binary Event Kernels (EKs) »inspekt Toolkit Application Programs

Navigation and Ancillary Information Facility NIF Introduction to the SPICE Toolkit 18 Capabilities Vary Across Toolkits Not all functionality is yet present in all three language versions of the Toolkit. On the next several pages we use the following code to indicate where a given capability is not fully implemented –If no code is shown, then all Toolkits contain the complete functionality. xyz C = complete functionality P = partial functionality N = no functionality Status for Fortran toolkits Status for C toolkits Status for IDL toolkits

Navigation and Ancillary Information Facility NIF Introduction to the SPICE Toolkit 19 Kernel read access –“Load” kernels –Get state or position vectors (SPK) –Get orientation of planets, natural satellites, etc. (PCK) –Get body shape parameters or physical constants (PCK) –Get orientation of spacecraft or spacecraft instruments or structures (CK, FK) –Get instrument parameters (e.g., FOV) (IK) –Query binary EK files (EK-ESQ) Kernel write access –SPK writers CPP –CK writers CCP –EK writers (sequence component, ESQ) –PCK writers (only for binary PCK files) PPN Toolkit Library Functionality - 1

Navigation and Ancillary Information Facility NIF Introduction to the SPICE Toolkit 20 Additional ephemeris functions –Classical osculating elements –Two-body Keplerian propagation –NORAD* two line elements sets (TLE) propagation CPN –Light time and Stellar aberration computation CPP Frame transformation –Obtain 3x3 matrices for frame transformations of positions –Obtain 6x6 matrices for frame transformations of states Time conversion –Conversion between standard systems: TDB, TT (TDT), UTC –Conversion between SCLK and other systems –Parsing and formatting Toolkit Library Functionality - 2 * North American Aerospace Defense Command

Navigation and Ancillary Information Facility NIF Introduction to the SPICE Toolkit 21 Math –Vector/Matrix operations –Rotations, Euler angles, quaternions –Coordinate conversion (systems: latitudinal, cylindrical, rectangular, RA and DEC, spherical, geodetic, planetographic) –Geometry: ellipsoids, ellipses, planes –High-level functions: illumination angles, sub-observer point, sub-solar point, surface intercept point. Constants –Julian date of epoch J2000, SPD(seconds per day), PI, etc. Strings –Parsing: find tokens, words CPP –Numeric conversion CPP Toolkit Library Functionality - 3 (continued on next page)

Navigation and Ancillary Information Facility NIF Introduction to the SPICE Toolkit 22 –Pattern matching –Replace marker, substring CCN –Suffix, prefix CPN –Case conversion –Find first/last non-blank character, first/last printing character CPN Arrays –Sorting, finding order vector, reordering CCN –Searching: linear, binary CCN –Insertion and deletion CPN Name/code conversion –Bodies –Frames Toolkit Library Functionality - 4

Navigation and Ancillary Information Facility NIF Introduction to the SPICE Toolkit 23 I/O support –Logical unit management CPN –Open, read, write text files CPN –Kernel pool API Exception handling –Control exception handling behavior: mode, message set, output device CCN –Construct error messages CCN Advanced data types –Cells, Sets CCP –Windows (sometimes called schedules) –Symbol Tables CPN –Planes, Ellipses Toolkit Library Functionality - 5

Navigation and Ancillary Information Facility NIF Introduction to the SPICE Toolkit 24 Module headers –Act as functional specification: I/O, exceptions, particulars defining behavior of module –Contain code examples –Standard format, used for each routine or entry point intrdctn. txt –Introduction to the SPICE Toolkit : organization and contents Required Reading –References for principal subsystems –Provides many low-level details –Provides code examples User’s guides for applications –brief.ug, commnt.ug, chronos.ug, etc. Toolkit Documentation - 1

Navigation and Ancillary Information Facility NIF Introduction to the SPICE Toolkit 25 Permuted Index –Maps phrases describing functionality to corresponding module names and file names –Shows locations of entry points in Fortran toolkits dscriptn.txt –Describes the directory structure and contents of an installed Toolkit –Customized based on set of delivered products and platform README –Contains Toolkit installation instructions whats.new –Describes new features and bug fixes version.txt –Indicates Toolkit version HTML pages –For User's Guides, Required Reading, and Module Headers Toolkit Documentation - 2

Navigation and Ancillary Information Facility NIF Introduction to the SPICE Toolkit 26 Fortran, C and IDL Toolkits are delivered as distinct, standalone products –The IDL product includes the CSPICE Toolkit Directory structures for the Toolkits are almost identical. However… –Unlike SPICE, CSPICE and Icy have a directory for include files –The names for application source code directories in CSPICE differ, slightly, from those in SPICE –Icy has additional directories for »Icy source code »Icy cookbook programs »Icy HTML pages comprising the Icy Reference Guide Installed Directory Structure - 1

Navigation and Ancillary Information Facility NIF Introduction to the SPICE Toolkit 27 Directory structure The top level is –“toolkit” for Fortran Toolkits –“cspice” for C Toolkits –“icy” for IDL Toolkits The next level is comprised of: –data »cookbook example kernels (use ONLY for training with cookbook programs) –doc »*.req, *.ug, spicelib.idx/cspice.idx, whats.new, dscriptn.txt, intrdctn.txt, version.txt »Now contains HTML documentation as well in “html” subdirectory »For Icy, the “html” subdirectory contains an “icy” subdirectory for the HTML pages comprising the Icy Reference Guide. –etc »Miscellaneous items. Example: nav libraries for the conversion program niospk (not part of the generic Toolkit). In generic Toolkits this directory is empty. Installed Directory Structure - 2 (continued on next page)

Navigation and Ancillary Information Facility NIF Introduction to the SPICE Toolkit 28 –exe »Toolkit executables: brief, chronos, ckbrief, commnt, inspekt, mkspk, spacit, spkmerge, tobin, toxfr, version, plus the various cookbook example programs –include (Applies to CSPICE and Icy) »API header files. File to include in callers of CSPICE is SpiceUsr.h –lib »Toolkit libraries: For Fortran Toolkits –spicelib.a (public modules; use these) –support.a (private modules; don’t use these) For C Toolkits –cspice.a (public modules; use these) –csupport.a (private modules; don’t use these) For icy: –icy.so (shared object library) –icy.dlm (dynamically loadable module) –cspice.a –csupport.a Installed Directory Structure - 3

Navigation and Ancillary Information Facility NIF Introduction to the SPICE Toolkit 29 –src »Source code directories for executables and libraries Files have type *.f, *.for, *.inc, *.pgm, *.c, *.h, *.x, *.pro *.h files appearing here are not part of the user API Installed Directory Structure - 4

Navigation and Ancillary Information Facility NIF Introduction to the SPICE Toolkit 30 Toolkit Versions Generic SPICE Toolkits have an associated Version number –Example: “N0060” (also written as “N60”) The version number applies to the FORTRAN, C and IDL implementations for all supported platforms. Toolkit deliveries to flight projects normally consist of the current generic Toolkit, possibly augmented with a few mission-specific extras When does NAIF release new SPICE Toolkit versions? –Not according to a fixed schedule –Primarily driven by addition of significant, new capabilities to Toolkit »Icy, for example –Occasionally minor Toolkit updates are released to fix bugs, improve documentation, or satisfy an urgent request from a flight project