Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

An open source flight dynamics & control software library

License

NotificationsYou must be signed in to change notification settings

JSBSim-Team/jsbsim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

C/C++ buildPyPIConda (channel only)PyPI DownloadsDownloads 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 theUnreal 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:

In 2015,NASA performed some verification check cases on 7 flight dynamics softwareincluding 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 herehttps://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 theDARPA Virtual Air Combat Competition.

User Guide

Installation

Windows

A Windows installerJSBSim-1.2.3-setup.exe is available in therelease 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 (seeour 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 theJSBSim project release section. There are 3 packages for each platform:

  • JSBSim_1.2.3-1561.amd64.deb which installs the executablesJSBSim andaeromatic
  • 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 eitherpip orconda.

Installation withpip

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

Installingjsbsim usingpip can be achieved with:

> pip install jsbsim

Check thepip documentation for more details.

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

Installation withconda

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 fromconda-forge, a community led collection of recipes, build infrastructure and distributions for the conda package manager.

Installingjsbsim from theconda-forge channel can be achieved by addingconda-forge to your channels with:

> conda config --add channels conda-forge

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

> conda install jsbsim

It is possible to list all of the versions ofjsbsim 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 useJSBSim wheel packages for Windows, Linux or MacOS. Otherwise you should follow the instructions in thedeveloper docs to build JSBSim on your platform.

Aircraft data and example scripts

JSBSim aircraft data and example scripts are automatically installed if you are usingPython wheel packages. Otherwise, you can get aircraft data and example scripts by downloading either thezip package or thetar.gz package.

Quick start

Once you have downloaded (or built) the binaries and unzipped theaircraft 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 ishttps://jsbsim.sourceforge.net/documentation.html. This link points to the officialJSBSim 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 newJSBSim 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 availablehere. 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>intmain(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 theC++ 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:

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

Providingjsbsim.FGFDMExec with the valueNone allows using the installed default aircraft data and scripts (in the example above we are using the scriptscripts/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 functionget_default_root_dir():

print(jsbsim.get_default_root_dir())

A more elaborate example of Python code isJSBSim.py, the Python equivalent toJSBSim.exe.

Python module examples

Theexamples/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 theContributing 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 onGitHub discussion or submit tickets onhttps://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 theLGPL 2.1 license. The license is included in the source code fileCOPYING.

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

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

The Python module of JSBSim is open source and is licensed under theLGPL 2.1 license. The license is included in the source code fileCOPYING.

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 andhttps://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.


[8]ページ先頭

©2009-2025 Movatter.jp