Navigation and Ancillary Information Facility NIF JNISPICE March 2006.

Slides:



Advertisements
Similar presentations
Chapter 6 Server-side Programming: Java Servlets
Advertisements

 Both System.out and System.err are streams—a sequence of bytes.  System.out (the standard output stream) displays output  System.err (the standard.
Navigation and Ancillary Information Facility NIF SPICE Conventions A summary of many “standards,” lingo and common usage within SPICE April 2006.
Inheritance and Class Hierarchies Chapter 3. Chapter 3: Inheritance and Class Hierarchies2 Chapter Objectives To understand inheritance and how it facilitates.
Navigation and Ancillary Information Facility NIF Shape Model Subsystem Preview (DSK) November 2014.
JSP Architecture  JSP is a simple text file consisting of HTML or XML content along with JSP elements  JSP packages define the interface for the compiled.
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 Time Formats January 2009.
Java Methods By J. W. Rider. Java Methods Modularity Declaring methods –Header, signature, prototype Static Void Local variables –this Return Reentrancy.
Java Software Solutions Lewis and Loftus Chapter 2 1 Copyright 1997 by John Lewis and William Loftus. All rights reserved. Software Concepts -- Introduction.
Java Programming, 2E Introductory Concepts and Techniques Chapter 2 Creating a Java Application and Applet.
A First Program Using C#
Abstract Data Types (ADTs) and data structures: terminology and definitions A type is a collection of values. For example, the boolean type consists of.
Java Programming, 3e Concepts and Techniques Chapter 2 - Part 2 Creating a Java Application and Applet.
Understanding the CORBA Model. What is CORBA?  The Common Object Request Broker Architecture (CORBA) allows distributed applications to interoperate.
Java Language and SW Dev’t
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.
CS 390- Unix Programming Environment CS 390 Unix Programming Environment Topics to be covered: Distributed Computing Fundamentals.
1 Module Objective & Outline Module Objective: After completing this Module, you will be able to, appreciate java as a programming language, write java.
1 Computer Systems -- Introduction  Chapter 1 focuses on:  the structure of a Java application  basic program elements  preparing and executing a program.
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.
Jaeki Song ISQS6337 JAVA Lecture 03 Introduction to Java -The First Java Application-
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 Shape Model Preview An overview of Current Status of and Further Development Plans for the SPICE Digital.
Navigation and Ancillary Information Facility NIF Summary of Key Points October 2014.
Chapter 8 - Additional Inheritance Concepts and Techniques1 Chapter 8 Additional Inheritance Concepts and Techniques.
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)
Java The Java programming language was created by Sun Microsystems, Inc. It was introduced in 1995 and it's popularity has grown quickly since A programming.
Chapter 12 Handling Exceptions and Events. Chapter Objectives Learn what an exception is Become aware of the hierarchy of exception classes Learn about.
Navigation and Ancillary Information Facility NIF Welcome to the SPICE Tutorial Class March 2006.
Topic 1 Object Oriented Programming. 1-2 Objectives To review the concepts and terminology of object-oriented programming To discuss some features of.
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 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.
Sheet 3 HANDLING EXCEPTIONS Advanced Programming using Java By Nora Alaqeel.
Navigation and Ancillary Information Facility NIF SPICE System Development Plans March 2006.
Java Programming: From Problem Analysis to Program Design, 4e Chapter 11 Handling Exceptions and Events.
Navigation and Ancillary Information Facility NIF Introduction to the SPICE Toolkit April 2006.
Navigation and Ancillary Information Facility NIF Introduction to the SPICE Toolkit June 2004.
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.
Creating a Java Application and Applet
Navigation and Ancillary Information Facility NIF SPICE Event Finding Subsystem October 2007.
Inheritance and Class Hierarchies Chapter 3. Chapter 3: Inheritance and Class Hierarchies2 Chapter Objectives To understand inheritance and how it facilitates.
Java Programming, Second Edition Chapter Twelve Advanced Inheritance Concepts.
Inheritance and Class Hierarchies Chapter 3. Chapter Objectives  To understand inheritance and how it facilitates code reuse  To understand how Java.
Chapter 11: Advanced Inheritance Concepts. Objectives Create and use abstract classes Use dynamic method binding Create arrays of subclass objects Use.
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 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 SPICE Development Plans and Possibilities 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.
Shape Model Subsystem Preview (DSK)
IDL Interface to CSPICE “Icy”
Lecture 4: RPC Remote Procedure Call Coulouris et al: Chapter 5
Lecture 4: RPC Remote Procedure Call CDK: Chapter 5
Remote method invocation (RMI)
Chap 1. Getting Started Objectives
Chap 4. Programming Fundamentals
Presentation transcript:

Navigation and Ancillary Information Facility NIF JNISPICE March 2006

Navigation and Ancillary Information Facility NIF JNISPICE 2 User feedback Introduction Overview of the JNISPICE prototype system Possible Java SPICE Implementation Structures Possible OO SPICE Implementation Structures Topics

Navigation and Ancillary Information Facility NIF JNISPICE 3 NAIF would like to hear your ideas on JNISPICE and more generally on the concept of an object-oriented SPICE Toolkit. –Would such a product be useful to you? –If so, what characteristics would this product have? To reply, please contact –Nat Bachman: –Chuck Acton: User Feedback

Navigation and Ancillary Information Facility NIF JNISPICE 4 JNISPICE is a prototype implementation of the SPICE system in Java, using the Java native interface (JNI) capability. –High level, object-oriented code is written in Java. –Low level implementation is largely based on CSPICE. Motivation for the JNISPICE experiment: –Various SPICE users are already using SPICE via JNI calls. Need for product of this type appears to exist. –Value of a complete, robust, well-documented, well-supported version of such a product is evident. –This development work may become the basis of a fully-OO version of SPICE, either in Java or other OO languages. –JNISPICE may facilitate development of higher-level SPICE-based tools, particularly GUI tools, by NAIF and others. –Arguably NAIF is the right team to do the job. Introduction

Navigation and Ancillary Information Facility NIF JNISPICE 5 JNISPICE has three implementation layers: API level: Object-oriented view of SPICE based on “natural” Java classes –States, Times, Reference frames, Units, SPICE exceptions, etc. –Functionality of OO layer, when complete »Will include functionality of CSPICE »May include higher-level functionality not provided by CSPICE Classes to support building SPICE-based GUIs? JNI level: Java class or classes declaring native methods –Methods correspond to CSPICE wrappers –Method functionality is as close as possible to that of CSPICE. –Methods provide error handling: trap SPICE errors, fetch SPICE error messages, throw exceptions –Methods are synchronized CSPICE level: C shared object library JNISPICE Implementation Layers

Navigation and Ancillary Information Facility NIF JNISPICE 6 JNISPICE documentation Java source code is documented via javadoc. –All documentation is presented as HTML pages –System-scope and package-scope documentation resides in stand-alone files. –Java source code contains detailed documentation: »Class-scope documentation is located at the start of each class source file. »Method documentation in the style of SPICE module headers. Most “SPICE Toolkit header style” documentation is presented in the “Constructor Detail” or “Method Detail” portions of Java class documentation pages –For an example of javadoc-style documentation, see Sun’s own Java documentation at » CSPICE code has traditional CSPICE Toolkit documentation JNISPICE Documentation

Navigation and Ancillary Information Facility NIF JNISPICE 7 Seven packages –spice.basic –spice.coverage –spice.daf –spice.geometry –spice.jni –spice.timesystem –spice.units About 60 classes and interfaces About 400 methods –As with most OO systems, there are many trivial methods. »System is not as big as it looks. JNISPICE Implementation: Components

Navigation and Ancillary Information Facility NIF JNISPICE 8 Package spice.basic: Components Classes –AberrationCorrection –Body –Engineering Quaternion –GeodeticCoords –KernelDatabase –LatitudinalCoords –Matrix33 –MatrixG –PositionRecord –PositionVector –Quaternion –ReferenceFrame –SCLK –SCLKTime –SpiceQuaternion –StateRecord –StateVector –Time –Vector3 –VectorG –VelocityVector Exceptions –SpiceException »Superclass for all JNISPICE exceptions »Non-error exceptions are also derived from SpiceException PointingNotFoundException –SpiceErrorException »All CSPICE errors cause a SpiceErrorException to be thrown Interfaces –Coordinates »Implemented by GeodeticCoords LatitudinalCoords

Navigation and Ancillary Information Facility NIF JNISPICE 9 Package spice.basic: Selected Hierarchies State vector class hierarchy java.lang.Object spice.basic.VectorG spice.basic.StateVector spice.basic.StateRecord Position vector class hierarchy java.lang.Object spice.basic.Vector3 spice.basic.PositionVector spice.basic.PositionRecord

Navigation and Ancillary Information Facility NIF JNISPICE 10 Package spice.daf Classes –DAFArraySearch »An array search is an object, rather than a set of variables comprising a “state” as in SPICELIB –DAFFileRecord –DAFNameRecord –DAFSegmentDescr –DAFSummaryRecord –ReadOnlyDAF »A class implementing the DAFReader interface Exceptions –DAFRecordNotFoundException Interfaces –DAFReader »The interface to be implemented by all classes that emulate traditional DAF access methods

Navigation and Ancillary Information Facility NIF JNISPICE 11 spice.basic Example Program - 1 // // Find the state of the moon relative to the earth at a specified // UTC time. Use light time and stellar aberration corrections. // Express the state relative to the J2000 reference frame. Display // the results of the computation. // import java.awt.*; import spice.basic.*; public class SRExample extends Object { // // Load the JNISpice C shared object library. // static { System.loadLibrary( "JNISpice" ); } public static void main ( String[] args ) { // // Get line terminator character for host system. // String nl = System.getProperty ( "line.separator" );

Navigation and Ancillary Information Facility NIF JNISPICE 12 spice.basic Example Program - 2 try { // // Load SPICE kernels: a planetary ephemeris SPK file and a // leapseconds kernel. // KernelDatabase.load ( "de405.bsp" ); KernelDatabase.load ( "leapseconds.ker" ); // // Declare and initialize inputs for state look-up. // Body targ = new Body ( "moon" ); Body obs = new Body ( "earth" ); Time t = new Time ( "2003 nov 6" ); ReferenceFrame ref = new ReferenceFrame ( "J2000" ); AberrationCorrection abcorr = new AberrationCorrection ( "LT+S" ); // // Create a new "state record." This is a traditional SPICE state // vector with additional information grouped together in a // data structure. // StateRecord sr = new StateRecord ( targ, t, ref, abcorr, obs );

Navigation and Ancillary Information Facility NIF JNISPICE 13 spice.basic Example Program - 3 // Display the state record using StateRecord class' default // formatting method toString(), which is implicitly invoked by // Java's System.out.println method. // System.out.println ( sr ); // // Express the target position in latitudinal coordinates. // System.out.println ( new LatitudinalCoords(sr) + nl ); } catch ( SpiceException se ) { // // Display description of the exception and a traceback. // se.printStackTrace(); } When this program is executed, the following output is produced:

Navigation and Ancillary Information Facility NIF JNISPICE 14 spice.basic Program Output Target = MOON (NAIF ID 301) Observer = EARTH (NAIF ID 399) Time = 2003-NOV-06 00:01: TDB Reference frame = J2000 Aberration correction = LT+S State vector = E 005 (km) E 004 (km) E 003 (km) E-001 (km/s) E-001 (km/s) E-001 (km/s) Distance = E 005 (km) Speed = E-001 (km/s) One way light time = E 000 (seconds) Radius = E 005 (km) Longitude = E 001 (degrees) Latitude = E-001 (degrees)

Navigation and Ancillary Information Facility NIF JNISPICE 15 Alternative Java SPICE Implementations Java OO API layer Java JNI layer Native layer - CSPICE or… - “C++ CSPICE”? Java OO API layer Java implementation layer JNISPICE style Could be build on CSPICE Could be built on C++ Pure Java

Navigation and Ancillary Information Facility NIF JNISPICE 16 Possible OO SPICE Layered Structure -1 IDL API IDL OO API layer CSPICE implementation layer … Partially OO: parallel APIs, CSPICE implementation Java API Java OO API layer CSPICE implementation layer C++ API C++ OO API layer CSPICE implementation layer Python API Python OO API layer CSPICE implementation layer

Navigation and Ancillary Information Facility NIF JNISPICE 17 Possible OO SPICE Layered Structure -2 … C++ SPICE implementation Fully OO: Parallel APIs for non-C++ Toolkits, C++ implementation IDL API IDL OO API layer C++ SPICE implementation layer Java API Java OO API layer C++ SPICE implementation layer Python API Python OO API layer C++ SPICE implementation layer

Navigation and Ancillary Information Facility NIF JNISPICE 18 Independent OO SPICE Implementations Multiple fully OO systems: completely independent implementations in different languages Functionality of systems in different languages may diverge as Toolkit grows. Each system can take advantage of features unique to its implementation language Maintenance and development cost appears prohibitive But this design *might* be feasible using automatic translation techniques … C++ SPICE implementation IDL SPICE implementation Java SPICE implementation Python SPICE implementation

Navigation and Ancillary Information Facility NIF JNISPICE 19 Possible OO SPICE Distributed Implementation Distributed OO implementation SPICE OO implementation language is transparent to clients May be unsuitable for number-crunching applications Tight coupling with SPICE objects preferable for these applications Object request broker SPICE OO implementation C++ clientJava clientPython client … IDL client