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 or other flight simulator.
Features include:
In 2015, the 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."
JSBSim is used in a range of projects among which:
JSBSim is also used in academic and industry research (more than 600 citations referenced by Google Scholar as of November 2020).
A Windows installer JSBSim-1.1.8-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 interfaceBoth executables are console line command.
Debian packages for Ubuntu Linux "Xenial" 16.04 LTS, "Bionic" 18.04 LTS and "Focal" 20.04 LTS for 64 bits platform are also available in the JSBSim project release section. There are 3 packages:
JSBSim_1.1.8-588.amd64.deb
which installs the executables JSBSim
and aeromatic
JSBSim-devel_1.1.8-588.amd64.deb
which installs the development resources (headers and libraries)python3-JSBSim_1.1.8-588.amd64.deb
which installs the Python 3.6 module of JSBSimJSBSim provides binary packages for its Python module on Windows, Mac OSX and Linux platforms for several Python versions (3.6, 3.7, 3.8 and 3.9). These can be installed using either pip
or conda
.
pip
Binary packages a.k.a. known as 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 ManyLinux packages requirements and as such are compatible with all the major Linux distributions.
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
At the moment, JSBSim do not provide binaries for platforms other than Windows 64 bits and Ubuntu 64 bits. If you fall in this category you should follow the instructions in the developer docs to build JSBSim on your platform.
You can get aircraft data and example scripts by downloading either the zip package or the tar.gz package.
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
A first place to look at for JSBSim documentation resources is http://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.
JSBSim can be interfaced or integrated to your application via a C++ API. 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;
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
JSBSim can also be used as a Python module. The following code provides a simple example of how to interface with JSBSim using the Python programming language:
import jsbsim
fdm = jsbsim.FGFDMExec('.', None)
fdm.load_script('scripts/c1721.xml')
fdm.run_ic()
while fdm.run():
pass
A more elaborate example is JSBSim.py, the Python version of JSBSim.exe
.
Q: I would like to visualize the aircraft model in FlightGear while running the FDM with the JSBSim executable. How do I proceed ?
A: We are assuming that FlightGear is installed on your platform. If it is not, please follow the instructions on the FlightGear website.
You will need to launch separately FlightGear and JSBSim from a console. In the example below, you will execute the script ShortS23_2.xml so you might need to install the Short Empire aircraft. This is optional however and any aircraft can be used for visualization even if it does not correspond to the FDM.
First, run FlightGear and tell it that the flight dynamics will be provided thru a socket by an external program. It is assumed that the executable of FlightGear is fgfs
(see the FlightGear docs for details on the parameters of --native-fdm
argument).
> fgfs --fdm=null --native-fdm=socket,in,60,,5550,udp --aircraft=Short_Empire --airport=SP01
Once FlightGear is launched, you will see the aircraft standing still.
Now we will run JSBSim and tell it that it must send the flight dynamics data to a socket with the FlightGear protocol
> JSBSim scripts/Short_S23_2.xml data_output/flightgear.xml --realtime --nice
The parameters describing the protocol are detailed in data_output/flightgear.xml
. The flag --realtime
requests JSBSim to execute in real time. Otherwise JSBSim will run as fast as it can and the flight will look like it is played fast forward. The flag --nice
tells JSBSim to use as few CPU power as possible. This is an optional flag but since we requested --realtime
, JSBSim will spend a considerable amount of time idling, waiting for the next time step.
At the this stage, the two executables are interacting and FlightGear produces the visualization of the flight dynamics simulated by JSBSim.
For more information on JSBSim, you can contact the development team on the mailing list jsbsim-devel@lists.sourceforge.net or submit tickets on https://github.com/JSBSim-Team/jsbsim/issues
We are also on Facebook: https://www.facebook.com/jsbsim/
JSBSim is open source and is licensed under the LGPL 2.1 license. The license is included in the source code in the file COPYING
No proprietary code is included. All code included within JSBSim 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: http://ntrs.nasa.gov and http://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.
JSBSim是一款开源的飞行动力学(FDM)软件库,能够用于飞行器的飞行力学建模和模拟。JSBSim 函数库已经被嵌入到 FlightGear 和 OpenEaagles 这些飞行模拟的软件包中,也能够以独立运行的方式被批处理工具调用。1996年,JSBSim开始被开发和使用,目前已经能够在大多数平台上运行,包括Linux、 Mac和 Windows。JSBSim由C++编写,采用XML进行文件配
JSBSim仿真设置步骤:输入指令函数解析 需要先获得FGFCS对象指针 std::shared_ptr<FGFCS> fcs = FDMExec->GetFCS();//获得FGFCS对象指针 函数位置:/usr/include/JSBSim/models/FGFCS.h 根据程序需要,自行调用相关函数,灵活组合 void SetDaCmd( double cmd ) { DaCmd = cmd
https://github.com/JSBSim-Team/jsbsim了解安装步骤 https://github.com/JSBSim-Team/jsbsim/releases下载安装包 三个包安装完成后,安装jsbsim时可以选择pip或者conda来安装 下载解压jsbsim-1.1.12.tar.gz文件 进入主目录执行 cd jsbsim # 生成Makefile文件 cmake
JSBSim与FlightGear交联 1.安装FlightGear 2.在cmd中运行如下命令: fgfs --fdm=null --native-fdm=socket,in,60,,5550,udp --aircraft=Short_Empire --airport=SP01 备注:此处飞机模型使用Short Empire aircraft,需要下载此飞机模型至FlightGear安装路径。
英文原文:JSBSim_vs_YASim 准确性和现实性 飞行动力学模型的准确性和真实性是针对YASim的争论中提出的两个共同点。实际上,如果你给YASim或JSBSim垃圾参数,它们都将返回垃圾空气动力学。算法的准确性受其输入的限制。 YASim和JSBSim在准确模拟真实飞机方面存在不同的问题。由于YASim是基于求解器的,因此您不需要风洞数据或精确的螺旋桨性能表;你只需告诉它一些基本的飞机参
转自csdn 原文:https://blog.csdn.net/yu_lei_/article/details/81463187 请大家去看原文,原文有图片和资源,本文仅供本人参考 权威参考:http://jsbsim.sourceforge.net/Building_JSBSim_with_Visual_Cpp.pdf 另外附上此作者的相关博客 JSBSim使用教程 JSBSim编程实
JSBSim是一个模拟飞机飞行空气动力学的,这些都不用深入理解,只要知道自己程序怎么和JSBSim交互就行了 我使用的是JSBSim-Win32-0.9.13 原理:改写jsbsim的FGInput 和FGOutput两个类 使其能通过udp或者tcp与自己的程序进程通信,以实现自己程序通过网络端,发送控制命令并获取飞机姿态的目的。 udp通信的例子:简单的udp通信 进阶版udp和tcp通信
JSBSim支持固定翼无人机(可选) JSBSim官网 JSBSim 参考手册 gitee链接 1方式1 参考Linux平台编译安装测试JSBSim 编译JSBSim 下载JSBSim源代码 git clone https://github.com/JSBSim-Team/jsbsim.git 编译JSBSim 跳转到jsbsim源码目录 cd jsbsim 创建build文件夹用于编译j
转自: 么的聊 链接:https://www.jianshu.com/p/a0b4598f928a 虽然用户不需要掌握太多 JSBSim 飞行模拟器的细节,但是了解 JSBSim 的基本工作流程也会对学习帮助很大。本章将介绍 JSBSim 的基本概念。 仿真系统 通过参考坐标系描述不同部件在飞行器模型中的安装位置——都支持英制和国标两种单位制。为了增强 JSBSim 的通用模拟特性,采用属性(
英文原文在 FGFCS.h头文件中 JSBSim的控制操作封装了飞行控制系统(FCS)的功能。 这个FGFCS类还封装了相同的“系统”和“自动驾驶仪”能力。 FGFCS包含用来定义一个系统或飞行模型体系的“FGFCS组件列表”。 飞机的配置文件包含控制路径的描述(从一个输入或命令开始和结束的效应),例如:aerosurface。 FCS组件包括一个轴的控制律是在配置文件中定义的顺序。例如,x -