JSBSim

JSBSim
Developer(s) JSBSim build team
Stable release 1.0.0 Release Candidate / 31 May 2009
Type Cross-platform Engineering Flight simulation
License LGPL
Website www.jsbsim.org

JSBSim is an open source Flight Dynamics Model (FDM) software library that models the flight dynamics of an aerospace vehicle. The library has been incorporated into the flight simulation packages FlightGear and OpenEaagles. It can also be called from a small standalone program to create a batch simulation tool. JSBSim has been in development and use since 1996, and has been built on all of the most popular platforms in use today including those running Linux, Macintosh, and Microsoft Windows operating systems. JSBSim is written in C++ and uses XML configuration files.

History and Overview

JSBSim was conceived in 1996 as a lightweight, data-driven, non-linear, six degree-of-freedom (6DoF), batch simulation application aimed at modeling flight dynamics and control for aircraft. Since the earliest versions, JSBSim has benefited from the open source development environment it has grown within, and the wide variety of users that have contributed ideas for its continued improvement. It has been incorporated into larger, full-featured, flight simulation applications and architectures (known examples are FlightGear and OpenEaagles), and has been used as a batch simulation tool in industry and academia.

As an example of ease of use, the following code illustrates how JSBSim could be called by a small program, with execution being controlled by a script:

#include <FGFDMExec.h>

int main(int argc, char **argv)
{
  JSBSim::FGFDMExec FDMExec;
  bool result = true;
  FDMExec.LoadScript(argv[1]);
  while (result) result = FDMExec.Run();
}

The above application works when built with the JSBSim library, and it only needs to be supplied with an aircraft configuration file, an initial conditions file, and a script file that controls execution. All of these files are defined using XML (eXtensible Markup Language). JSBSim is perhaps the first flight dynamics model to employ XML to describe an aircraft for simulation. An example of an aerodynamic definition is shown below:

<function name="aero/coefficient/CDDf">
  <product>
    <property>aero/qbar-area</property>
    <table>
      <independentVar>fcs/flap-pos-deg</independentVar>
      <tableData>
          0.0  0.0
         10.0  0.007
         20.0  0.012
         30.0  0.018
      </tableData>
    </table>
  </product>
</function>

Input Output Features

When running JSBSim in a standalone mode using the basic driver program, one only needs to supply a script name. Control inputs can be supplied to JSBSim from within the script.

If the aircraft configuration file contains an input port specification, the user can also telnet into JSBSim. From within the telnet interface, values of many parameters internal to JSBSim can be both read and set. The simulation itself can also be paused and resumed. The telnet feature, of course, is most valuable for running JSBSim in real-time. The sample standalone application included with the JSBSim distribution supports running in soft real-time.

JSBSim can be directed to output logically grouped sets of data to the console (screen), to a file, or to a socket. Output can simultaneously be directed out through any number of channels, where each channel can contain any set of data or single specific parameter, can be directed towards any file or socket (or even the console), and can be output at any rate.

A utility included with JSBSim takes the whole data file output by JSBSim and creates a complete set of plots in PDF format, using the open source plotting tool, gnuplot.

Flight Control Features

JSBSim allows a flight control system or autopilot to be constructed from individual components. The suite now includes: filters, conditional switch, summer, sensor, and gain (variable and static) components. Additionally, there is a function component that can be defined by the user.

A sample flight control system block diagram is seen below in the flight control system editor for the separate open source project, JSBSim Commander (currently in the early stages of development, but functional).

Aerodynamics Modeling

JSBSim uses a coefficient build-up method for modeling the aerodynamic characteristics of aircraft. Any number of forces and moments (or none at all) can be defined for each of the axes. Each force/moment specification includes a definition comment, and a specification of the function that calculates the force or moment. The function definition can be a simple value, or a complicated function that includes trigonometric and logarithmic functions, and a one-, two-, or three-dimensional table lookup.

Propulsion Modeling

JSBSim includes generic piston/propeller, rocket/nozzle, turbine, and turboprop models. The models are not detailed engineering models, but they allow engines to be added easily. Any number of engines can be added to an aircraft model, at any location and orientation, and different engine types can be mixed.

Equations of Motion

JSBSim is a full, six degree-of-freedom flight dynamics model. It provides the capability to specify initial conditions, and to trim the aircraft in several ways prior to startup. Specific integrators can be chosen for propagating each of the translational and rotational velocities and positions. Currently, 3rd order Adams Bashforth is the default.

Extensibility

JSBSim is designed to be extensible. The key objects (engines, flight control components) are implemented as base classes with a simple interface. Specific, new engines can be modeled by creating new classes derived from the base classes. New flight control components can be created in the same manner.

Notable uses

JSBSim is the default flight model used with the FlightGear open source simulator. Along with FlightGear, JSBSim is used to drive the motion base simulator at the University of Naples in Italy. JSBSim is included as a driving application for the OpenEaagles simulation environment. JSBSim has been used to model the flight of rockets (from sounding rockets to larger launch vehicles). It has been used to model the flight of UAVs—including the ARES vehicle designed to fly in the Martian atmosphere. It has been used as part of an air traffic control study. JSBSim has been used together with MATLAB and Simulink, has been compiled as a DLL, and has been ported to C#. The C# port is out of date and is no longer publicly available.

Future plans

Development continues on JSBSim itself. Additional tools that work with JSBSim are also emerging. A freely available tool called DATCOM+ (a derivative of Digital Datcom) outputs an aerodynamic specification directly in JSBSim-ML format (the XML aircraft file format). JSBSim Commander is under development as an editor for creating and modifying JSBSim models.

External links

This article is issued from Wikipedia - version of the Friday, March 15, 2013. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.