GMAT R2012a is out!

Today the GMAT development team released the 2012 build of GMAT, R2012a. Here’s a copy of the release announcement.

This release includes a number of new features, including ground track plots, an early release of the event location feature, extensive enhancements to the user interface management, and an orbit designer wizard for spacecraft. The release notes can be found here.

Take a few minutes to check out this release! We are well on our way to preparing an operational version of the software, currently slated for release early in 2013. Anyone interested in participating in the beta test for that release, please contact me at djc@thinksysinc.com.

Posted in Uncategorized | Leave a comment

Plugin Development for GMAT

GMAT has the ability to incorporate extensions to its base user classes through run-time incorporation of user written shared libraries (dll’s on Windows, dynamic libraries. or dylibs, on Mac, and shared object files, so’s in Linux).  Several people have asked me recently for instructions on building GMAT plugins.  There is a plugin development guide that I wrote in 2008, which you can download here:

PluginDevelopment

The GMAT source tree on SourceForge includes a folder named plugins.  That folder contains the source code and build files for  four plugin libraries:

  • CInterfacePlugin: A library that provides access to GMAT functionality from systems that can load C language modules.  This interface was built to support access to GMAT’s force model from a MATLAB project at Goddard Space Flight Center.  It is expected to be extended to provide more complete functionality over time.
  • EstimationPlugin: A complete, though rudimentary, orbit determination system for GMAT.  This library includes a batch estimator, a Kalman filter, and an measurement simulator, along with several geometric and physical measurement models.
  • MatlabInterfacePlugin: GMAT’s MATLAB interface was originally built as part of the core system.  Once the plugin capabilities were added to the system, this code was moved into a plugin library so that users that do not have MATLAB need not obtain a special build of the system to use GMAT.
  • FminconPlugin: An optimizer for GMAT that uses the MATLAB Optimization Toolkit.

The SourceForge code associated with this blog (available in the SVN repository; download instructions are here) contains several additional plugin libraries:

  • SolarSail: A rudimentary solar sail force used to test the plugin interface during development.  This folder contains the code used in the examples in the Plugin Development Guide.
  • VernerIntegrators: A collection of four integrators designed by Jim Verner and presented on his web site.  These integrators were coded up during breaks at a conference where the plugin interface was introduced.  It was nice being able to say “Yesterday I learned about a collection of Verner integrators at this conference.  They can be used today in GMAT using the code uploaded to SourceForge a few minutes ago” during my talk.
  • VF13OptimizerPlugin: A shell of code needed to build the VF13ad optimizer for GMAT.  The optimizer code itself, written in Fortran, is available from the Harwell Subroutine Library archive collection and not licensed for distribution with GMAT.  The shell code provided here gives everything else needed to incorporate the library into GMAT.

There are additional plugins not yet publicly available, and more planned for the future.  If you are interested, post ideas you may have in the comments.  I may try writing up the steps to building VF13 if anyone expresses interest.

Posted in Plugin Development | Leave a comment

Welcome OSCON Attendees!

Joel Parker of the GMAT team presented an overview of the project at the 2011 OSCON conference.  You can read about his presentation here, and view his presentation slides as well.  If you’re visiting this blog with an interest in getting involved in the project, drop us a note in the comment section for this entry, or send me (Darrel Conway) an email at gmat@thinksysinc.com.  We’re looking forward to hearing from anyone interested in the project!

Posted in Uncategorized | Leave a comment

SPICE, f2c, or Nothing?

The GMAT source code in the trunk folder contains an atmosphere model – the MSISE90 atmosphere – that was originally coded in Fortran.  The code in GMAT was generated by running the Fortran to C conversion program, f2c, on the original Fortran code.  Future plans for GMAT include adding other models available as Fortran source code using this same approach.  In addition, several of the plugin libraries include code generated from f2c processing of the original Fortran code.  For these reasons, I strongly recommend making f2c available from the start when you prepare to build GMAT.  The system can be built without f2c if you are willing to forego use of these models, but the f2c setup is simple and straightforward, so well worth doing in my opinion.

There are two paths you can follow for incorporating f2c into your configuration.  If you are building with the SPICE library from JPL, the code that you download from JPL includes a version of f2c tailored to use in in SPICE.  The SPICE library also enables several features in GMAT that are useful: the ability to incorporate ephemerides for minor bodies (comets, asteroids, moons, etc) for use in modelling your mission, and the ability to generate a ephemeris file in SPICE format.  In addition, the version of GMAT that undergoes nightly build testing is built with the SPICE extensions enabled, so is more likely to see bug fixes made in a timely manner than are the other versions.  The testing issue is a minor consideration, though; the SPICE enabled code is built from the same code base as the version without SPICE, but with additional features enabled.

Developers that want to use f2c but not SPICE can find a copy of f2c in either GMAT’s build folder for their platform (for Mac or Windows), or as a package for their operating system (Linux).  The platforms that have the library in GMAT’s build folders should unpack the package into the Gmat3rdParty/f2c folder of their build environment.

The SPICE library is available from JPL at the NAIF website.  Download the toolkit for C for your platform, and unpack it into your Gmat3rdParty/cspice (or cspice64 for 64-bit) folder.  Once you’ve done this, you are ready to build GMAT with the SPICE and f2c code enabled.

Posted in Overview | Leave a comment

Populating the Configuration Folders: wxWidgets

GMAT is built on several open source packages, set up as described below.  These components play the following roles:

  • wxWidgets:  A cross-platform GUI toolkit that provides the windows, frames, text controls, and related components that are assembled to make the GMAT Graphical User Interface.  You’ll need a copy of wxWidgets in order to run the graphical version of GMAT; the console version does not need wxWidgets.
    (URL: http://wxwidgets.org/)
  • TSPlot:  The component used to draw XY plots in GMAT.  While this is a separate code base from the rest of GMAT, Thinking Systems has given the GMAT team permission to use the source files in GMAT’s source tree, so there is no separate configuration for this component.
    (http://sourceforge.net/projects/tsplot/)
  • f2c:  Several of the models included in GMAT were originally written in Fortran, and converted to C using the f2c conversion program.  GMAT’s source tree includes a minimal version of the files you’ll need for platforms that don’t supply a version of the utility.  Note that if you build GMAT including the SPICE library from JPL, the cspice code includes a customized version of f2c, and a separate copy of f2c is not needed.
    (http://www.netlib.org/f2c/)
  • cspice:  The SPICE toolkit from JPL provides utilities for reading and generating ephemerides and other space based data.  GMAT includes the ability to model moons, asteroids and comets from data in SPICE files, and to generate spacecraft ephemerides in SPICE formats.  Configure the SPICE tools to enable this capability.
    (http://naif.jpl.nasa.gov/naif/index.html)

The following paragraphs describe configuration for each of these components.

Setting up wxWidgets

GMAT’s GUI is written using the wxWidgets toolkit, available from wxWidgets.org.  Some operating systems – most distributions of Linux, for example – include options for a precompiled version of wxWidgets.  These precompiled versions are usually built with unicode extensions enabled.  GMAT is not currently unicode compatible, so we’ll build wxWidgets from the source code.  The general procedure is as follows:

  1. Download the latest version of wxWidgets 2.8 from wxWidgets.org.  Depending on your platform, you’ll want the following code:
    Windows:  wxMSW
    Mac: wxMac
    Linux:  wxGTK
  2. Unpack the code into the Gmat3rdParty/wxWidgets folder.
  3. Setup the build files.
    For Visual Studio:  Follow the setup instructions for Visual Studio 2010, and skip the remainder of this section.
    Other compilers and platforms: run the configure command with the OpenGL extensions:
    configure –with-opengl
  4. Build the source code:
    make
  5. (Optionally) Install the libraries (required administrator rights):
    make install

After following these steps, you’ll have a complete set of wxWidgets libraries for use with GMAT.

In the next post, I’ll discuss f2c and cspice.

Posted in Overview | Leave a comment

GMAT Folder Layout

The GMAT build files make a few assumptions about the relative arrangement of folders on your computer. This arrangement is, of course, customizable by the developer to meet personal or organizational requirements.  A different arrangement does require that the developer make matching updates to local copies of the build files. The purpose of this entry is to describe a standard arrangement that matches the file arrangement of at least one member of the GMAT development team.

I usually begin by creating a root folder for GMAT development. I have two separate arrangements of the system at my office because of different projects I’m working with; I use TS_Code for most development, and a separate folder for a project built in top of the GMAT code base. For the purposes of this blog I’m using a third root folder, “GmatBlog.” Inside of that folder I have 3 subfolders: GmatDevelopment, Gmat3rdParty, and GmatPlugins. The GmatDevelopment folder holds the code from GMAT’s Subversion repository at SourceForge. Gmat3rdParty holds code and libraries for systems that the GMAT code uses while building: f2c, wxWidgets, pcre, cspice, and so forth. GmatPlugins holds code for plugin libraries GMAT can use – the VF13ad optimizer, the Solar Sail demo code, and a collection of numerical integrators designed by Verner all have folders inside of this one on my development machine. (Truth be told, I tend to have several such folders for different sources of plugin code.)  Once all of the code is in place, the resulting folder layout looks like this:

Tree as shown on a Mac

The next post will explain how to populate the source trees shown here, starting with the Gmat3rdParty folder.  The post after that will describe how to configure and build GMAT on a Makefile driven system (e.g. Linux or Mac, or a Windows machine with GCC installed).

Posted in Overview | Leave a comment

GMAT Plugins and Extensions

The purpose of this blog is to provide a forum describing approaches to component development  and other programming assistance for the General Mission Analysis Tool (GMAT).  The materials here will include discussions about extensions to the tool and ways to use GMAT’s engine in projects outside of the main GMAT system.  The first few postings will look at general configuration issues, followed by discussion of extensions through plugins and related projects.  Here is my current list of items for discussion:

  • How to build GMAT (probably several entries, covering basic setup followed by overviews of building on Windows, Linux, and Mac)
  • GMAT’s plugin architecture
  • Connecting to the GMAT engine from MATLAB
  • Developer Playtime Projects
  • Building a Qt based GUI for GMAT

Please make suggestions for additional items in the comments to this entry, and I’ll add the items to the list!

Posted in Overview | Leave a comment