Subject: Quaternions Class

From: "PEARSON, DON J. (JSC-DM)" <[email-masked]>
Date: Thu, 19 Feb 1998 08:56:43 -0600

I'm project manager of a small project here at the Johnson Space Center
which is developing mission planning software for future human missions to
the Moon and Mars, using 100% Java.   We are re-engineering numerically
complex trajectory algorithms into an object-oriented framework and
evaluating the suitablility of Java for a this type of work.   

One general utility area that needs to be developed is a basic quaternion
class that can be used for spacecraft attitude and coordinate frames
manipulation.    If you know of such a class, please email me at:

[email-masked]

For your edification, I've also cut/pasted a short document that we used to
get NASA/Headquarters funding approval last October. It tells you more about
our project....

<snip>

PROJECT TITLE:    RETOOLING FOR PLANETARY MISSION DESIGN

PROJECT MGR:   	DM / Don J. Pearson
			Assistant for Advanced Mission Design
			Flight Design & Dynamics Division
			Mission Operations Directorate,  JSC

PROJECT OVERVIEW / APPROACH

NASA is at a point in its history where the current "trusted legacy code"
for mission design is becoming difficult to maintain.  Current applications,
which consist mainly of Fortran and C codes, were written 20 years ago.
These applications are difficult to understand, maintain, or enhance, and
are not easily portable to new computer systems.   This legacy code is
unattractive to newly emerging college graduates, schooled in the
object-oriented world and in a Windows environment.  An effort to provide
graphical user interface (GUI)  wrappers to this code may insulate the
engineering mission designer from the underlying code better than in the
past, but basic maintenance of the underlying code remains difficult.  Young
professionals are seeking employment are likely to be attracted to other
areas which use more current technologies.  

This RTOP proposes a prototype effort to design a basic web-based software
development architecture for Lunar / Mars mission design and analysis.  With
this RTOP, we will define and evaluate a system architecture for large scale
trajectory mission design and subsystem analysis.

We propose re-tooling of current planetary trajectory design algorithms into
a single object-oriented software library by using a collaborative effort
between NASA and a number of universities across the country rather than
using the traditional  Request for Proposal (RFP) / contractor award
technique.  We feel that this new approach is appropriate in a time of
constrained budgets, and one that meets NASA goals of strong relationships
with the academic community.    

CUSTOMER OBJECTIVES

There are 3 distinct technology objectives that are addressed with the RTOP:

(1)  Develop a web-based software development architecture for distributed
collaborative software development.

(2)  Develop an object-oriented trajectory mission planning capability for
planetary mission design using the Java language.

 (3)  Form partnerships with universities across the country to retool
current algorithms using object-oriented software development methodologies,
as opposed to using  traditional contract award technique.

Looking at each objective in more detail, 

(1)  Develop a web-based software development architecture:

The system to be modeled begins with a spacecraft approaching a planetary
body, and includes trajectory mission design for capture into planetary
orbit, orbital adjustment, and then entry to the surface.  The capability
may then be extended to include ascent from the surface and rendezvous in
planetary orbit.   We envision primarily a 3 degree-of-freedom simulation
capability, with the ability to perform guidance, navigation, and control
(GN&C) system trades for spacecraft design and mission feasibility
assessments.  At least initially, this project will NOT model Earth launch
and departure windows, interplanetary travel, nor planetary swingbys.
However, the system will be designed to allow future extendibility into
these arenas.

The "web-based software development architecture" is one where software
developers located around the country can develop software components on a
variety of hardware/software platforms, using a NASA specified set of
guidelines, and deliver these components to NASA for evaluation,
verification, and acceptance.   When accepted, these components become part
of a web-based software library and are re-usable for additional software
component developments.   The process of developing code, data,
documentation, testing, and configuration management in this distributed
environment is part of the software architecture design. 

(2)  Object-oriented mission planning using Java:

Java is becoming a predominant computer language.  It is object-oriented and
derived from C++.  Its primary attraction is that the language offers
platform independence (resulting source code can developed and executed on
PCs, Macs,  or Unix workstations with no mods). Its rapid acceptance as a
primary language can be attributed to the explosive Web growth, which is
composed of a multitude of interconnected hardware platforms. 

Java is generally considered an improvement over C++ as an object-oriented
programming language.   Java doesn't allow "global variables or global
functions" and eliminates the explicit use of pointers(a major source of
software bugs).  Java also has built-in multithreaded capability to allow
for parallel processing.  

Java offers a lot in terms of simplicity, object-orientation, and
portability, but its use in large scale engineering applications has not
been proven. We will evaluate the Java language for suitability in this role
both in terms of its applicability to general engineering work and in terms
of its performance.  

For this RTOP, we will be evaluating a "100% Java" implementation.
Currently many emerging projects use Java to design GUIs and application
wrappers but leave the legacy code intact, which impairs the basic goal of
Java to provide complete portability.   One of our primary goals is to
understand Java's role as a complete solution to engineering applications.  

(3)  Universities to assist in retooling current algorithms:

A fundamental objective of the project will be to populate the resulting
proposed software architecture with GN&C models by integrating NASA agencies
and universities across the country into a collaborative software
development campaign for planetary mission design and analysis.   Assuming
our first year's work in developing and testing the architecture is
successful,  we will pursue a strong effort in FY99 to develop a web-based
mission design software library, using NASA and universities,  as opposed to
the traditional contractor award technique.  

APPLICATION / BENEFITS

This RTOP offers the potential to retool legacy algorithms using current
technologies, removing platform dependencies, and allowing for enhancements.
It can promote a strong NASA / university relationship and encourage college
students to understand and contribute to planetary mission design while
motivating them for future employment with NASA.  

We have desired means to interface more effectively with universities across
America, to use students both to assist NASA in its needs, and to encourage
those students to enter careers in the aerospace field.  The Human
Exploration and Development of Space  (HEDS)  Strategic Plan specifically
calls for NASA to "form partnerships with educators to bring space
exploration experience into the classroom... through implementation of new
initiatives to inspire students to study science, mathematics, engineering,
and technology.  We will prepare the next generation of researchers through
programs focused on HEDS-related experiences".  This effort offers an
excellent opportunity to involve those universities by asking them to
participate in a collaborative effort to develop planetary mission design
software in a web-based environment.  

This RTOP explores the suitability of Java for general engineering analysis
and simulation.   This suitability has been suggested, but not yet been
proven.  The answer to this question will also benefit many organizations
outside NASA. 

The  timing of this RTOP project is good - NASA is developing strategic
plans for future human exploration of space.  The major "GO / NO-GO"
decision point has been placed in 2004. In order to prepare for this point,
robotic missions to Mars are being launched by NASA every 2 years and their
mission objectives are being modified to address key future human flight
considerations (such as precision landing on the planet,  propellant
production on the planet, etc).  Development of this web-based mission
design capability must be in place in the next 5 years in order to provide a
"safed" software environment for future mission planning, capable of being
maintained and extended to human exploration of space.     

PRIOR YEAR ACCOMPLISHMENTS

None.  This is a new start.  We are currently using civil service to canvas
the NASA agencies for current capabilities involved with planetary mission
design.   

PLANNED ACCOMPLISHMENTS (FY98)

(1) System architecture definition - How to use the web for distributed
software development,  separation of code and data,  configuration control
processes,  testing techniques, etc.

(2) Enumeration of trajectory components:  hierarchical framework for "class
" development.  

(3) Initial population of the architecture and testing.  

(4) Evaluation of suitability of JAVA for general engineering and
performance assessment

(5) Proposal for follow-on agency-wide and academic involvement.  

FUNDING REQUIREMENTS  /  PARTNERSHIPS

FY98:
		Manpower:   	1.5 civil service + 2.0 contractor (with
object-oriented programming and trajectory mission design expertise)

CONCLUDING REMARKS

This is a small RTOP with a significant potential to demonstrate
collaborative software development techniques via the web and the viability
of Java to support general engineering application needs.  It could be a
good motivator for future intra-agency efforts in common planetary
trajectory software development.  This RTOP will re-invest NASA technical
experience into the college environment.  

<snip>

_______________________
Don J. Pearson
Advanced Mission Design
Flight Design & Dynamics Division (DM)
Mission Operations Directorate
Johnson Space Center, Houston Tx 77058
(281) 483-8052
[email-masked]

---

From: Dave Brillhart - SMCC SE - Orlando <[email-masked]>
Date: Thu, 19 Feb 1998 16:27:38 -0500 (EST)

> [email-masked]

Don,

The Java 3d interest archives includes a reference to a Quaternion library
implemented in pure java by the Geometry Center, a university research outfit
specifically focusing on 3d geometry for computer graphics.
See: http://www.geom.umn.edu

Also:

http://www.mbay.net/~watsen/kent/JavaMath/Quaternion.html 
http://www-vis.imag.fr/visHome/ReaderDigest/References/javadoc-lr/dnx.geom.Quaternion.html 	

There are others, found simply by searching AltaVista for "java NEAR quaternion".

Regards,

-- Dave
      ______
     /_____/\      Dave Brillhart - Regional Java Specialist
    /____ \\ \     Sun Microsystems Incorporated, SMCC
   /_____\ \\ /    3504 Lake Lynda Drive, Suite 410
  /_____/ \/ / /   Orlando, Florida 32817
 /_____/ /   \//\
 \_____\//\   / /  Voice/Pager:  407-384-4644/800-314-1259
  \_____/ / /\ /   E-mail:       [email-masked]
   \_____/ \\ \    Text Pages:   [email-masked]
    \_____\ \\     Internal URL: http://four11.east
     \_____\/

  Computing is fractal; wherever you look, there is infinite complexity

---

From: Dave Brillhart <[email-masked]>
Date: Fri, 20 Feb 1998 13:11:58 -0600 (CST)

Don,

This just in from an engineer at JavaSoft....

> manipulation.    If you know of such a class, please email me at:

You may wish to share the fact that the javax.vecmath
package associated with the Java 3D standard extension API includes a
Quat4D class that implements quaternion math.  The API is in now in
a private early access stage and will become available for public
early access (through the Java Developer's Connection) in approximately
two weeks  time.  The javadoc is currently available at

http://www.javasoft.com/products/java-media/3D 

-- Dave