Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
fdm_jsbsim module

JSBSim FDM backend for NPS simulator

Use the paparazzi-jsbsim package if it is installed, otherwise look for JSBsim under /usr

JSBSim website: https://jsbsim-team.github.io/jsbsim-reference-manual/ JSBSim source: https://github.com/JSBSim-Team/jsbsim JSBSim/PPRZ doc: http://wiki.paparazziuav.org/wiki/JSBSim NPS doc: http://wiki.paparazziuav.org/wiki/NPS

Example for airframe file

Add to your firmware section: This example contains all possible configuration options, not all of them are mandatory!

<module name="fdm_jsbsim">
b'<configure name="FIND_JSBSIM_VIA_PKG_CONFIG" value="yes|no" />\n '
b'<configure name="JSBSIM_ROOT" value="/usr" />\n '
b'<configure name="JSBSIM_USE_SGPATH" value="FALSE|TRUE" />\n '
</module>

Module configuration options

Configure Options

  • name: FIND_JSBSIM_VIA_PKG_CONFIG value: yes|no
    Description: enable or disable using pkg-config to get library flags (enabled by default when package exists)
  • name: JSBSIM_ROOT value: /usr
    Description: set root directory for JSBSim library when auto-detection (see FIND_JSBSIM_VIA_PKG_CONFIG) is not used (default path: /usr)
  • name: JSBSIM_USE_SGPATH value: FALSE|TRUE
    Description: old version of jsbsim don't use SGPath module, can be forced to true or false if not found automatically

Files

Source Files

Raw fdm_jsbsim.xml file:

<!DOCTYPE module SYSTEM "module.dtd">
<module name="fdm_jsbsim" dir="fdm">
<doc>
<description>
JSBSim FDM backend for NPS simulator
Use the paparazzi-jsbsim package if it is installed, otherwise look for JSBsim under /usr
JSBSim website: https://jsbsim-team.github.io/jsbsim-reference-manual/
JSBSim source: https://github.com/JSBSim-Team/jsbsim
JSBSim/PPRZ doc: http://wiki.paparazziuav.org/wiki/JSBSim
NPS doc: http://wiki.paparazziuav.org/wiki/NPS
</description>
<configure name="FIND_JSBSIM_VIA_PKG_CONFIG" value="yes|no" description="enable or disable using pkg-config to get library flags (enabled by default when package exists)"/>
<configure name="JSBSIM_ROOT" value="/usr" description="set root directory for JSBSim library when auto-detection (see FIND_JSBSIM_VIA_PKG_CONFIG) is not used (default path: /usr)"/>
<configure name="JSBSIM_USE_SGPATH" value="FALSE|TRUE" description="old version of jsbsim don't use SGPath module, can be forced to true or false if not found automatically"/>
</doc>
<dep>
<provides>baro</provides>
</dep>
<header/>
<makefile target="nps|hitl">
<configure name="JSBSIM_ROOT" default="/usr"/>
<configure name="JSBSIM_INC" value="$(JSBSIM_ROOT)/include/JSBSim"/>
<configure name="JSBSIM_LIB" value="$(JSBSIM_ROOT)/lib"/>
<configure name="JSBSIM_USE_SGPATH" value="TRUE"/>
<configure name="FIND_JSBSIM_VIA_PKG_CONFIG" default="$(shell pkg-config JSBSim --exists ${AND} echo 'yes')"/>
<raw>
ifeq ($(FIND_JSBSIM_VIA_PKG_CONFIG), yes)
$(TARGET).CFLAGS += $(shell pkg-config JSBSim --cflags)
$(TARGET).LDFLAGS += $(shell pkg-config JSBSim --libs)
ifeq ($(shell pkg-config JSBSim --modversion), 1.0)
$(TARGET).CFLAGS += -DNPS_JSBSIM_USE_SGPATH=FALSE
else
$(TARGET).CFLAGS += -DNPS_JSBSIM_USE_SGPATH=$(JSBSIM_USE_SGPATH)
endif
else
FIND_JSBSIM_VIA_PKG_CONFIG = no
$(TARGET).CFLAGS += -I$(JSBSIM_INC)
$(TARGET).LDFLAGS += -L$(JSBSIM_LIB) -lJSBSim
$(TARGET).CFLAGS += -DNPS_JSBSIM_USE_SGPATH=$(JSBSIM_USE_SGPATH)
endif
</raw>
<file name="nps_fdm_jsbsim.cpp" dir="nps"/>
</makefile>
</module>