jsbsim

An open source flight dynamics & control software library

https://github.com/jsbsim-team/jsbsim

Science Score: 59.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 5 DOI reference(s) in README
  • Academic publication links
    Links to: scholar.google, springer.com, ieee.org
  • Committers with academic emails
    2 of 65 committers (3.1%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (15.0%) to scientific vocabulary

Keywords

aerospace-engineering aircraft aircraft-control aircraft-design flight-dynamics flight-simulation jsbsim matlab python simulation unreal-engine-plugin

Keywords from Contributors

hack standardization interpretability autograder interaction meshing report pypy symbolic-computation hybrid-differential-equations
Last synced: 6 months ago · JSON representation

Repository

An open source flight dynamics & control software library

Basic Info
  • Host: GitHub
  • Owner: JSBSim-Team
  • License: lgpl-2.1
  • Language: C++
  • Default Branch: master
  • Homepage:
  • Size: 53.9 MB
Statistics
  • Stars: 1,695
  • Watchers: 57
  • Forks: 511
  • Open Issues: 48
  • Releases: 20
Topics
aerospace-engineering aircraft aircraft-control aircraft-design flight-dynamics flight-simulation jsbsim matlab python simulation unreal-engine-plugin
Created about 8 years ago · Last pushed 6 months ago
Metadata Files
Readme License Authors

README.md

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:
  • 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.2.3-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.2.3-1561.amd64.deb which installs the executables JSBSim and aeromatic
  • JSBSim-devel_1.2.3-1561.amd64.deb which installs the development resources (headers and libraries)
  • python3-JSBSim_1.2.3-1561.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.9, 3.10, 3.11, 3.12 and 3.13). 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:

```bash

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:

```bash

conda config --add channels conda-forge ```

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

```bash

conda install jsbsim ```

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

```bash

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:

```bash

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

More options are available if you run:

```bash

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:

```c++

include

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

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.loadscript('scripts/c1723.xml') fdm.runic()

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():

python 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

  • Trim Envelope.ipynb calculates a set of trim points for an aircraft over a range of airspeeds and flight path angles. Required thrust and AoA is indicated via a colormap. Open In Colab

  • Rudder Kick.ipynb simulate a pilot performing a rudder kick test with time histories of the control inputs and sideslip angle plotted. Open In Colab

  • Thrust Vectoring Analysis.ipynb vary the thrust vector angle to determine the minimum fuel burn for cruise and climb conditions. Open In Colab

Contributing Source Code Changes

If you would like to contribute source code changes please take a look at the Contributing Source Code Changes to JSBSim Wiki page for instructions on how to go about contributing.

Contact

For more information about JSBSim, you can contact the development team on GitHub discussion or submit tickets on https://github.com/JSBSim-Team/jsbsim/issues

We are also on Facebook: https://www.facebook.com/jsbsim/

Legal Notice

The JSBSim library is open source and is licensed under the LGPL 2.1 license. The license is included in the source code file COPYING.

The Unreal Engine Reference Application for JSBSim is open source and is licensed under the MIT license. The license is included in the source code file UnrealEngine/LICENSE.txt.

The JSBSim interface with MATLAB including the S-Function is open source and is licensed under the BSD license. The license is included in the source code file matlab/LICENSE.txt.

The Python module of JSBSim is open source and is licensed under the LGPL 2.1 license. The license is included in the source code file COPYING.

No proprietary code is included. All code included within the JSBSim project has been developed on a volunteer basis using publicly available information, and is often directly linked to a particular textbook, for educational reference. In some cases, code of a generic nature has been donated back to the project.

Likewise, the aircraft models included in this project and distribution do not include any proprietary, sensitive, or classified data. All data is derived from textbooks (such as Stevens and Lewis "Aircraft Control and Simulation" and Sutton's "Rocket Propulsion Elements"), freely available technical reports (see: https://ntrs.nasa.gov and https://www.aiaa.org), or other public data (such as the FAA web site). Aircraft models included in the JSBSim distribution and with names corresponding to existing commercial or military aircraft are approximations crafted using publicly available information, and are for educational or entertainment uses only.

Owner

  • Name: Developers of the JSBSim Flight Dynamics Software library
  • Login: JSBSim-Team
  • Kind: organization

This team includes developers/users who care about JSBSim advancement and maintenance in an open source development environment.

GitHub Events

Total
  • Create event: 5
  • Commit comment event: 6
  • Release event: 2
  • Issues event: 42
  • Watch event: 294
  • Delete event: 1
  • Issue comment event: 395
  • Push event: 70
  • Pull request review event: 67
  • Pull request review comment event: 68
  • Pull request event: 103
  • Fork event: 63
Last Year
  • Create event: 5
  • Commit comment event: 6
  • Release event: 2
  • Issues event: 42
  • Watch event: 294
  • Delete event: 1
  • Issue comment event: 395
  • Push event: 70
  • Pull request review event: 67
  • Pull request review comment event: 68
  • Pull request event: 103
  • Fork event: 63

Committers

Last synced: 9 months ago

All Time
  • Total Commits: 5,551
  • Total Committers: 65
  • Avg Commits per committer: 85.4
  • Development Distribution Score (DDS): 0.644
Past Year
  • Commits: 72
  • Committers: 15
  • Avg Commits per committer: 4.8
  • Development Distribution Score (DDS): 0.5
Top Committers
Name Email Commits
jberndt j****t 1,975
bcoconni b****i 1,472
ehofman e****n 511
jsb j****b 421
apeden a****n 283
dpculp d****p 203
andgi a****i 154
Sean McLeod s****n@s****m 117
dmegginson d****n 112
jentron j****n 80
frohlich f****h 38
dependabot[bot] 4****] 35
Agostino De Marco a****o@u****t 28
github-actions[bot] 4****] 14
ermarch 5****h 11
Sean McLeod s****d@s****m 6
James Turner z****e@m****m 5
Ewald Zietsman e****n@g****m 5
Alban BERGERET (Epic) 5****c 5
Chris Birkhold c****d@g****m 4
Guilherme A. L. da Silva g****a@a****r 4
Jonathan Redpath l****p@g****m 4
gallonmate 2****e 4
pbecchi p****i@a****t 4
Stefan Hagen s****n@h****k 3
Yannick Comte c****k@g****m 3
Mahesh Madhav 6****x 3
Adriano Bassignana a****n@g****m 3
Carlo Corradini c****8@g****m 2
Chris Regan r****1@u****u 2
and 35 more...

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 103
  • Total pull requests: 303
  • Average time to close issues: 5 months
  • Average time to close pull requests: 8 days
  • Total issue authors: 72
  • Total pull request authors: 45
  • Average comments per issue: 9.3
  • Average comments per pull request: 3.05
  • Merged pull requests: 237
  • Bot issues: 0
  • Bot pull requests: 27
Past Year
  • Issues: 28
  • Pull requests: 117
  • Average time to close issues: 7 days
  • Average time to close pull requests: 7 days
  • Issue authors: 21
  • Pull request authors: 21
  • Average comments per issue: 1.89
  • Average comments per pull request: 2.81
  • Merged pull requests: 83
  • Bot issues: 0
  • Bot pull requests: 3
Top Authors
Issue Authors
  • bcoconni (7)
  • carlocorradini (4)
  • jamesford42 (4)
  • vranki (4)
  • Octal450 (4)
  • Dobid (4)
  • ghost (3)
  • demonixis (3)
  • SLGY (3)
  • Scavanger (2)
  • MariuszXC (2)
  • frankzflyward (2)
  • steamjunkie (2)
  • BreakerHUN (1)
  • pbecchi (1)
Pull Request Authors
  • bcoconni (108)
  • seanmcleod (54)
  • dependabot[bot] (27)
  • seanmcleod70 (17)
  • cbirkhold (11)
  • gallonmate (6)
  • heshpdx (6)
  • demonixis (5)
  • etotheipluspi (4)
  • carlocorradini (3)
  • ermarch (3)
  • roccoblues (3)
  • andgi (3)
  • jamesford42 (2)
  • sryu1 (2)
Top Labels
Issue Labels
bug (16) Unreal Engine (15) Feature request (11) Moved to discussion (4) Support request (3) MATLAB (3) wontfix (3) documentation (2) duplicate (1) aeromatic++ (1) Issuer not responding (1) ArduPilot (1) FlightGear interface (1)
Pull Request Labels
dependencies (27) Unreal Engine (20) bug (16) Python (8) Obsolescence (5) aeromatic++ (2) Feature request (2) invalid (2) FlightGear interface (2) documentation (2) wontfix (1) Issuer not responding (1) GitHub Actions (1) Jupyter (1) github_actions (1)

Packages

  • Total packages: 4
  • Total downloads:
    • pypi 4,594 last-month
  • Total dependent packages: 1
    (may contain duplicates)
  • Total dependent repositories: 3
    (may contain duplicates)
  • Total versions: 67
  • Total maintainers: 3
pypi.org: jsbsim

An open source flight dynamics & control software library

  • Versions: 21
  • Dependent Packages: 1
  • Dependent Repositories: 3
  • Downloads: 4,594 Last month
Rankings
Stargazers count: 2.0%
Forks count: 2.7%
Average: 5.7%
Dependent packages count: 7.3%
Downloads: 7.4%
Dependent repos count: 9.1%
Maintainers (3)
Last synced: 6 months ago
proxy.golang.org: github.com/JSBSim-Team/jsbsim
  • Versions: 18
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 9.0%
Average: 9.5%
Dependent repos count: 10.1%
Last synced: 6 months ago
proxy.golang.org: github.com/jsbsim-team/jsbsim
  • Versions: 18
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent packages count: 9.0%
Average: 9.5%
Dependent repos count: 10.1%
Last synced: 6 months ago
conda-forge.org: jsbsim

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) for testing and study, or integrated with FlightGear <https://www.flightgear.org> or other flight simulator.

  • Versions: 10
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Forks count: 9.3%
Stargazers count: 13.4%
Average: 27.0%
Dependent repos count: 34.0%
Dependent packages count: 51.2%
Last synced: 6 months ago

Dependencies

.github/workflows/codeql-analysis.yml actions
  • actions/checkout v3 composite
  • actions/setup-python v4 composite
  • github/codeql-action/analyze v2 composite
  • github/codeql-action/autobuild v2 composite
  • github/codeql-action/init v2 composite
.github/workflows/cpp-python-build.yml actions
  • actions/cache v3 composite
  • actions/checkout v3 composite
  • actions/download-artifact v3 composite
  • actions/setup-python v4 composite
  • actions/upload-artifact v3 composite
  • codecov/codecov-action v3 composite
  • crazy-max/ghaction-github-pages v3 composite
  • matlab-actions/run-command v1 composite
  • matlab-actions/setup-matlab v1.2.4 composite
  • pypa/cibuildwheel v2.12.0 composite
  • softprops/action-gh-release v1 composite