MCPcopy Create free account
hub / github.com/JSBSim-Team/jsbsim

github.com/JSBSim-Team/jsbsim @v1.3.1

Chat with this repo
repository ↗ · DeepWiki ↗ · release v1.3.1 ↗ · + Follow
4,859 symbols 12,197 edges 404 files 844 documented · 17% updated 12d agov1.3.1 · 2026-05-17★ 2,13842 open issues

Browse by type

Functions 4,135 Types & classes 724
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

C/C++ build PyPI Conda (channel only) PyPI Downloads Downloads GitHub

Introduction

JSBSim is a multi-platform, general purpose object-oriented Flight Dynamics Model (FDM) written in C++. The FDM is essentially the physics & math model that defines the movement of an aircraft, rocket, etc., under the forces and moments applied to it using the various control mechanisms and from the forces of nature. JSBSim can be run in a standalone batch mode flight simulator (no graphical displays a.k.a. console mode) for testing and study, or integrated with the Unreal engine, FlightGear and many other simulation environments.

Features include:

  • Nonlinear 6 DoF (Degree of Freedom)
  • Fully configurable flight control system, aerodynamics, propulsion, landing gear arrangement, etc. through XML-based text file format.
  • Accurate Earth model including:
  • Rotational effects on the equations of motion (Coriolis and centrifugal acceleration modeled).
  • Oblate spherical shape and geodetic coordinates according to the WGS84 geodetic system.
  • Atmosphere modeled according to the International Standard Atmosphere (1976).
  • Configurable data output formats to screen, file, socket, or any combination of those.

JSBSim also includes the following bindings:

  • A Python module which provides the exact same features as the C++ library with Python based simulation samples that can be run on Google Colab Open in Colab
  • A Matlab S-Function that interfaces JSBSim with MATLAB Simulink.
  • An Unreal Engine plugin to build a connection between the flight dynamics model from JSBSim and the entire virtual environment provided by Unreal engine.

In 2015, NASA performed some verification check cases on 7 flight dynamics software including JSBSim (the other 6 being NASA in-house software). The results showed that the 7 simulation tools "were good enough to indicate agreement between a majority of simulation tools for all cases published. Most of the remaining differences are explained and could be reduced with further effort."

Applications and Usages

JSBSim is used in a range of projects among which:

Academic and Industry Research

JSBSim is also used in academic and industry research (more than 1000 citations referenced by Google Scholar as of May 2025).

In 2023 JSBSim was featured in the article "A deep reinforcement learning control approach for high-performance aircraft" , by De Marco et al. (2023), Nonlinear Dynamics, an International Journal of Nonlinear Dynamics and Chaos in Engineering Systems by Springer (doi: 10.1007/s11071-023-08725-y). The open-access article is available as a PDF here https://link.springer.com/content/pdf/10.1007/s11071-023-08725-y.pdf. The work demonstrates an application of Deep Reinforcement Learning (DRL) to flight control and guidance, leveraging the JSBSim interface to MATLAB/Simulink.

Another more advanced application within the field of Deep Reinforcement Learning is presented in the article "Hierarchical Reinforcement Learning for Air Combat at DARPA's AlphaDogfight Trials" by A. P. Pope et al. (2023), IEEE Transactions on Artificial Intelligence (doi: 10.1109/TAI.2022.3222143), featuring a hierarchical reinforcement learning approach. The trained agent was designed alongside of and competed against active fighter pilots, and ultimately defeated a graduate of the United States Air Force's F-16 Weapons Instructor Course in match play. See also the DARPA Virtual Air Combat Competition.

User Guide

Installation

Windows

A Windows installer JSBSim-1.3.0-setup.exe is available in the release section. It installs the 2 executables along with aircraft data and some example scripts:

  • JSBSim.exe which runs FDM simulations.
  • aeromatic.exe which builds aircraft definitions from Question/Answer interface

Both executables are console line commands.

The Windows installer also contains the files needed to build the JSBSim Matlab S-Function (see our MATLAB README for more details about using JSBSim in Matlab).

Ubuntu Linux

Debian packages for Ubuntu Linux "Jammy" 22.04 LTS and "Noble" 24.04 LTS for 64 bits platforms are also available in the JSBSim project release section. There are 3 packages for each platform:

  • JSBSim_1.3.0-1742.amd64.deb which installs the executables JSBSim and aeromatic
  • JSBSim-devel_1.3.0-1742.amd64.deb which installs the development resources (headers and libraries)
  • python3-JSBSim_1.3.0-1742.amd64.deb which installs the Python module of JSBSim

Python module

JSBSim provides binary wheel packages for its Python module on Windows, Mac OSX and Linux platforms for several Python versions (3.10, 3.11, 3.12, 3.13 and 3.14). These can be installed using either pip or conda.

Installation with pip

Binary packages a.k.a. wheel packages are available from the Python Package Index (PyPI), a repository of software for the Python programming language.

Installing jsbsim using pip can be achieved with:

> pip install jsbsim

Check the pip documentation for more details.

Note that wheel packages for Linux meet the PEP600 ManyLinux packages requirements and as such are compatible with a majority of Linux distributions.

Installation with conda

Conda is an open-source package management system and environment management system that runs on Windows, macOS, and Linux. The JSBSim conda package is available from conda-forge, a community led collection of recipes, build infrastructure and distributions for the conda package manager.

Installing jsbsim from the conda-forge channel can be achieved by adding conda-forge to your channels with:

> conda config --add channels conda-forge

Once the conda-forge channel has been enabled, jsbsim can be installed with:

> conda install jsbsim

It is possible to list all of the versions of jsbsim available on your platform with:

> conda search jsbsim --channel conda-forge

Other platforms

At the moment, JSBSim does not provide binaries for platforms other than Windows 64 bits and Ubuntu 64 bits. Alternatively, you can use JSBSim wheel packages for Windows, Linux or MacOS. Otherwise you should follow the instructions in the developer docs to build JSBSim on your platform.

Aircraft data and example scripts

JSBSim aircraft data and example scripts are automatically installed if you are using Python wheel packages. Otherwise, you can get aircraft data and example scripts by downloading either the zip package or the tar.gz package.

Quick start

Once you have downloaded (or built) the binaries and unzipped the aircraft data. Go to the root of the data package and make sure the executable is accessible from there.

You can then run an FDM simulation with the following command:

> JSBSim.exe --script=scripts/c1721.xml

More options are available if you run:

> JSBSim.exe --help

User documentation

A first place to look at for JSBSim documentation resources is https://jsbsim.sourceforge.net/documentation.html. This link points to the official JSBSim Reference Manual, a PDF which is the best source of information for users and developers.

However, due to the nature of the development of the project (JSBSim sources are updated often, sometimes even daily), several new features that are available in the software are not yet documented in the reference manual. Starting from March 2018 a new effort is underway to deliver an up-to-date documentation web site. You can browse the new JSBSim Online Reference Manual by going to: https://jsbsim-team.github.io/jsbsim-reference-manual. The online manual is under construction and as a first milestone it will incorporate all the non-outdated material contained in the original PDF Reference Manual. The online manual web site is based on the GitHub Pages technology and its sources are available here. Eventually, the PDF Reference Manual will be superseded by the online manual, which is designed to be updated collaboratively as well as in efficient and timely fashion.

Interfacing JSBSim with your application

Using the C++ API

JSBSim can be interfaced or integrated to your application via a C++ API. The following code illustrates how JSBSim can 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;
  FDMExec.LoadScript(SGPath(argv[1]));
  FDMExec.RunIC();
  bool result = true;
  while (result) result = FDMExec.Run();
}
 ```

The API is described in more details in the [C++ API documentation](doc/DevelopersDocs.md#c-api-documentation)

### Using the Python module

JSBSim can also be used as a Python module. JSBSim Python wheels are provided with the proverbial "batteries included" i.e. with some default aircraft data and example scripts.

The following code provides a simple example of how to interface with JSBSim using the Python programming language:

```python
import jsbsim

fdm = jsbsim.FGFDMExec(None)  # Use JSBSim default aircraft data.
fdm.load_script('scripts/c1723.xml')
fdm.run_ic()

while fdm.run():
  pass

Providing jsbsim.FGFDMExec with the value None allows using the installed default aircraft data and scripts (in the example above we are using the script scripts/c1723.xml, one of the many scripts installed by default).

The default aircraft data is located in a directory which path can be retrieved with the function get_default_root_dir():

print(jsbsim.get_default_root_dir())

A more elaborate example of Python code is JSBSim.py, the Python equivalent to JSBSim.exe.

Python module examples

The examples/python directory contains a number of example Python based scripts embedded in Jupyter notebooks demonstrating the use of JSBSim to determine and analyse aircraft performance. You can also quickly try it out using Google Colab by clicking on the icon.

  • AoA vs CAS.ipynb calculates and plots the AoA (Angle of Attack) versus CAS (Calibrated Air Speed) for level trim for a range in aircraft weight, altitude and cg (center of gravity). [Open In Colab](https://colab.research.google.com/github/JSB

Core symbols most depended-on inside this repo

Shape

Method 2,953
Function 1,182
Class 635
Enum 89

Languages

C++84%
C8%
Python8%
C#1%
PHP1%

Modules by API surface

src/simgear/xml/xmlparse.c209 symbols
src/math/FGStateSpace.h187 symbols
utils/aeromatic++/Aircraft.h112 symbols
src/simgear/props/props.cxx90 symbols
src/initialization/FGInitialCondition.h81 symbols
src/FGFDMExec.h72 symbols
tests/unit_tests/FGTableTest.h62 symbols
tests/unit_tests/FGLogTest.h56 symbols
src/simgear/xml/xmlrole.c54 symbols
src/models/FGFCS.h53 symbols
utils/aeromatic++/Systems/Systems.h52 symbols
src/initialization/FGTrimAnalysis.cpp52 symbols

For agents

$ claude mcp add jsbsim \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page