Steven Roach, University of Wyoming/Ames Research Center summer graduate student, Michael Lowry and Thomas Pressburger, Amphion Project, IC Division, Ames Research Center
Science opportunity visualizers (SOVs) are essential tools for analyzing mission designs, planning detailed science observations, and aiding the analysis of science data returned from a spacecraft's instruments. In the past, creating an SOV was a labor intensive software development process. This article describes an extension to the Amphion automatic programming system that facilitates the rapid generation of SOVs for understanding observation geometries. Although this extension is not yet mature, it has already been employed in developing a SOV that is actively being used by the planetary rings community, as well as dozens of prototype animation programs.
This article first reviews SPICE and Amphion, and then discusses the extensions that are used in generating SOVs.
Amphion is an automatic program synthesis system; that is, a system that writes source code programs given high-level problem specifications. Amphion was introduced in the February 1994 issue, pp. 22-25. It consists of a graphical user interface and a program synthesis subsystem. Amphion allows you to program at the level of abstract problem specifications instead of at the tedious level of programming language syntax. It is a general program synthesis system that is tailored to a particular domain by a domain theory. The first theory written for Amphion was for the SPICE domain. Using this theory, Amphion generates FORTRAN programs containing calls to SPICE subroutines.
With Amphion, you do not need to be familiar with the hundreds of SPICE subroutines or the data structures they require. The graphical user interface guides you in the creation of a specification diagram (see Figures 1 and 2). The program synthesis subsystem then generates a FORTRAN program. In preliminary testing, SPICE programmers were able to generate graphical specifications with less than an hour of training. SPICE programmers can typically generate correct programs much faster using Amphion than on their own.
The basis of the animation system is a graphics package called Euclid, developed by Bill Taber of the NAIF group. This package draws visualizations containing points, rings, and wire frame ellipsoidal bodies. Euclid is suitable for visualizing observation geometries, but is not meant for producing photo-realistic images. Euclid uses ray tracing techniques to determine how the rings and bodies are illuminated by one or more specified light sources. Euclid is device independent and uses a simple device driver interface called ESCHER that has been ported to a variety of graphics devices. As part of this project, ESCHER was ported to the Unix X-windows system, the same system used by Amphion's graphical user interface.
The specification in Figure 1 includes Saturn, Titan, the Sun, and the Cassini spacecraft. In this specification, a "body" is the location of some object at a particular time. So the "Body-Saturn" icon is the location of the planet Saturn at Time-Saturn. The inputs to the program are the time of the observation at Cassini (Time-Cassini) and the inner and outer diameter of one of Saturn's rings to be displayed. To allow for the time light takes to travel, the time of Body-Saturn is the time a photon would have left Saturn to arrive at Cassini at Time-Cassini. The time of Body-Sun is specified in a similar fashion. Since they are relatively close, we assume that the time of Body-Titan is the same as that of Body-Saturn.
To create a visualization, a camera must also be specified. A camera has a coordinate system called a frame. The z-axis of the frame points along the camera boresight toward the objects being viewed, the x-axis points to the right, and the y-axis points up. In Figure 2, the z-axis is defined as a ray from Cassini toward Body-Saturn. The y-axis is orthogonal to the x-axis and is aligned with the vector normal to the orbital plane. The orbital plane is defined as the plane that contains two vectors: the instantaneous velocity vector of Saturn, and a vector from Saturn to the Sun.
In Figure 2 the specifications have been added for the objects to appear in the visualization and for the location of the source of light. This is done by creating display-objects. Each display-object consists of two components: an object in the specification and the camera from which it is viewed. In Figure 2 there are display-objects for Body-Saturn, Body-Titan, and the inner and outer edges of the ring. Rings are visualized as pairs of simple ellipses depicting the inner and outer edges. The illumination source is Sun-Body.
From the specification in Figure 2 Amphion generates a FORTRAN program containing the appropriate calls to the SPICE and Euclid subroutines. These in turn call ESCHER and X-windows subroutines that open a window on a terminal and display a visualization. The program can automatically generate visualizations for a sequence of times, thus producing an animation. In contrast to many other animation programs, the program is efficient enough to generate the sequence of views in real time. Thus the entire Cassini four year tour is animated at any desired time compression without storing a buffer of images. Figure 3 is a frame from this animation at the time of the first Titan fly-by.
or downloaded through anonymous ftp from:
ai.uwyo.edu:/pub/nasa/
The animation can be seen through any MPEG viewer, although some MPEG viewers might not display the colors correctly.
In December 1994 Mark Showalter, manager of the Rings Node for PDS, inquired about using Amphion to generate visualizations of the Saturn system as it will appear from Earth during the 1995-96 ring plane crossings. His objective was to provide a Web-based SOV to help astronomers plan their observations. Mark was able to adapt the specification in Figure 2 very quickly to produce a specification for his SOV. The program generated by Amphion was then further modified by Mark and is now accessible through the WWW at:
http://ringside.arc.nasa.gov/www/rpx/rpx.html
Figure 4 was generated using this Saturn Viewer program. It depicts Saturn, its rings, the inner moons, and an occulted background star just a few minutes after the Sun finishes crossing Saturn's ring plane at 12:05 UTC on November 21, 1995. The rings are shown in light gray because we will be seeing their unilluminated side at this time. The locations and names of the inner moons are shown (although the names are printed in a font too small to read in this reproduction). By coincidence, a 12th magnitude background star, shown as a plus, will be occulted by the rings at this time.
Amphion is also being extended to generate iterative code that searches for solutions to queries such as "When does a geometric configuration occur in a time interval" and "When does a geometric function take on a minimum value in a time interval." The NAIF group developed a set of iterative FORTRAN drivers call PERCY that form the components for this capability. Amphion is being extended to target PERCY, just as it was extended to target the elements of Euclid. Amphion's PERCY capability has already been prototyped. In combination with the animation capabilities, this will provide a basis for rapidly generating science opportunity analyzers.
For further information contact Michael Lowry via phone: 415- 604-3369 or e-mail:
lowry@ptolemy.arc.nasa.gov