Navigation and Ancillary Information Facility NIF Exception Handling November 2014.

Slides:



Advertisements
Similar presentations
Navigation and Ancillary Information Facility NIF The SPICE system has been developed by the Jet Propulsion Laboratory, California Institute of Technology,
Advertisements

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 Non-Toolkit Applications April 2012.
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 Time Conversion and Formats June 2004.
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.
UNIT 3 TEMPLATE AND EXCEPTION HANDLING. Introduction  Program errors are also referred to as program bugs.  A C program may have one or more of four.
Navigation and Ancillary Information Facility NIF “Camera-matrix” Kernel CK (Orientation or Attitude Kernel) Emphasis on reading CK files January 2009.
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 Geometry Finder (GF) Subsystem Searching for times when specified geometric conditions occur November.
Navigation and Ancillary Information Facility NIF “Comments” In SPICE Kernels Also known as “meta-data” 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 IDs and Names for Physical Objects and Reference Frames 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 Preview of a Web-based GUI Interface to SPICE “WebGeocalc” The NAIF and UCD Teams August 22, 2011 SPICE.
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 “Camera-matrix” Kernel CK (Orientation or Attitude Kernel) Emphasis on reading CK files March 2006.
Exceptions in Java. Exceptions An exception is an object describing an unusual or erroneous situation Exceptions are thrown by a program, and may be caught.
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 Welcome to the SPICE Tutorial Class March 2006.
Navigation and Ancillary Information Facility NIF NAIF IDs and Names for Physical Objects and Reference Frames March 2006.
Navigation and Ancillary Information Facility NIF Planetary Constants Kernel PCK November 2014.
Navigation and Ancillary Information Facility NIF Obtaining SPICE Components Offered by NAIF and Horizons Emphasis on Kernels November 2014.
Navigation and Ancillary Information Facility NIF Leapseconds and Spacecraft Clock Kernels LSK and SCLK June 2004.
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 “Camera-matrix” Kernel CK (Orientation or Attitude Kernel) Emphasis on reading CK files November 2014.
Navigation and Ancillary Information Facility NIF NAIF IDs and Names for Physical Objects and Reference Frames June 2004.
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 Planetary Constants Kernel PCK January 2009.
Navigation and Ancillary Information Facility NIF Planetary Constants Kernel PCK October 2014.
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 “Camera-matrix” Kernel CK (Orientation or Attitude Kernel) Emphasis on reading CK files March 2010.
Error Handling Tonga Institute of Higher Education.
Navigation and Ancillary Information Facility NIF Instrument Kernel IK March 2006.
Navigation and Ancillary Information Facility NIF Instrument Kernel IK November 2014.
1 Project 2: Using Variables and Expressions. 222 Project 2 Overview For this project you will work with three programs Circle Paint Ideal_Weight What.
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 Time Conversion and Time Formats January 2008.
Navigation and Ancillary Information Facility NIF SPICE Toolkit Common Problems October 2007.
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 Welcome to the SPICE Tutorials November 2014.
Navigation and Ancillary Information Facility NIF Instrument Kernel IK June 2004.
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 “Metadata” In SPICE Kernels Also known as “comments” January 2009.
Navigation and Ancillary Information Facility NIF Using the Frames Subsystem April 2016.
Navigation and Ancillary Information Facility NIF Finding SPICE Components An Introduction to the NAIF Server April 2006.
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.
Navigation and Ancillary Information Facility NIF “Metadata” In SPICE Kernels Also known as “comments” October 2007.
Summary of Key Points October 2007.
Frames Kernel FK October 2007.
Exception Handling and Reading / Writing Files
Presentation transcript:

Navigation and Ancillary Information Facility NIF Exception Handling November 2014

Navigation and Ancillary Information Facility NIF SPICE “Errors” Most “errors” made while using SPICE result from a mistake in how you are trying to use SPICE code, or in how you are trying to use SPICE files –It’s pretty rare that a SPICE user finds an error within SPICE code The SPICE “exception handling subsystem” helps detect user’s errors All “errors” detected by SPICE result in a SPICE error message –Such errors will never make your program crash A program crash indicates an error in your own code, a corrupted SPICE kernel, or (rarely) a SPICE bug. Exception Handling 2

Navigation and Ancillary Information Facility NIF What is “Exception Handling”? Most SPICE APIs contain code designed to detect and act on what appear to be erroneous inputs, or unanswerable requests for SPICE data –Some examples: »A request to obtain spacecraft trajectory data from outside the time bounds (the coverage) of a loaded SPK file »A request to obtain orientation for a newly discovered satellite for which such data does not exist in a loaded PCK file »A request to rotate a vector into a reference frame that is unknown to, or not fully defined, in a user’s program »Divide by zero, or take the square root of a negative number Several actions are possible; here we describe only the most common –The Error Required Reading document covers all the details Exception Handling 3

Navigation and Ancillary Information Facility NIF What Happens? When such “errors” occur, SPICE will normally display details about the problem. Example (when reading an SPK file): SPICE(SPKINSUFFDATA) Insufficient ephemeris data has been loaded to compute the state of 301 (MOON) relative to 399 (EARTH) at the ephemeris epoch 2060 JAN 01 00:00: computeState --> spkezr_c --> SPKEZR --> SPKEZ --> SPKGEO As shown above, you see both an “error” description and a traceback showing where the “error” was detected –In this example, the loaded ephemeris file did not extend all the way to the year 2060 Exception Handling 4

Navigation and Ancillary Information Facility NIF Understanding Error Messages With some experience and thought you can often understand and correct the problem by yourself Some of the more common problems are described in the BACKUP sections of the on-line SPK and CK tutorials, and in the “Common Problems” tutorial and the “Common Problems” Required Reading technical reference document Exception Handling 5

Navigation and Ancillary Information Facility NIF What to do? If you are unable to resolve a problem indicated by a SPICE error message you can contact a SPICE specialist for help –Send him the SPICE error message you’ve encountered –It’s usually necessary to also identify the kernels being used, and perhaps even provide copies of them if they are not readily available to the specialist –You may also be asked for your code where the problem seems to occur and identification of the compiler, operating system and Toolkit version being used Exception Handling 6

Navigation and Ancillary Information Facility NIF Additional Information on Exception Handling For more information look at the following: –The on-line (full) Exceptions tutorial –Error Required Reading document –Headers of the subroutines ERRACT, ERRDEV, ERRPRT (Fortran and C only) »These routines can be used to configure error handling behavior Exception Handling 7