[modules] convert FDM subsystems to modules (#1981)

* [modules] convert FDM subsystems to modules

* [doc] improve documentation for FDM modules
This commit is contained in:
Gautier Hattenberger
2017-01-13 21:17:59 +01:00
committed by Felix Ruess
parent 9f3b407862
commit fc3435303d
5 changed files with 57 additions and 31 deletions
+1 -1
View File
@@ -69,7 +69,7 @@ all compile: check_jsbsim $(OBJDIR)/simsitl
check_jsbsim:
@echo Paparazzi jsbsim package found: $(JSBSIM_PKG)
@echo Paparazzi jsbsim package found: $(FIND_JSBSIM_VIA_PKG_CONFIG)
$(OBJDIR)/simsitl : $($(TARGET).objs)
@@ -1,7 +0,0 @@
# Hey Emacs, this is a -*- makefile -*-
#
# NPS SITL Simulator FDM backend based on CRRCSIM (MNAV inputdev)
#
nps.srcs += nps/nps_fdm_crrcsim.c
@@ -1,23 +0,0 @@
# Hey Emacs, this is a -*- makefile -*-
#
# JSBSim FDM backend for NPS Simulator
#
JSBSIM_ROOT ?= /opt/jsbsim
JSBSIM_INC = $(JSBSIM_ROOT)/include/JSBSim
JSBSIM_LIB = $(JSBSIM_ROOT)/lib
# use the paparazzi-jsbsim package if it is installed, otherwise look for JSBsim under /opt/jsbsim
JSBSIM_PKG ?= $(shell pkg-config JSBSim --exists && echo 'yes')
ifeq ($(JSBSIM_PKG), yes)
nps.CFLAGS += $(shell pkg-config JSBSim --cflags)
nps.LDFLAGS += $(shell pkg-config JSBSim --libs)
else
JSBSIM_PKG = no
nps.CFLAGS += -I$(JSBSIM_INC)
nps.LDFLAGS += -L$(JSBSIM_LIB) -lJSBSim
endif
nps.srcs += nps/nps_fdm_jsbsim.cpp
+21
View File
@@ -0,0 +1,21 @@
<!DOCTYPE module SYSTEM "module.dtd">
<module name="fdm_crrcsim" dir="fdm">
<doc>
<description>
CRRCSIM FDM backend for NPS simulator
Only for fixed-wing.
CRRCSIM is running as an external program using the MNAV inputdev.
Download the patched version for Paparazzi on Github: https://github.com/paparazzi/crrcsim-pprz
CRRCSIM doc: https://github.com/paparazzi/crrcsim-pprz/tree/master/documentation
NPS doc: http://wiki.paparazziuav.org/wiki/NPS
</description>
</doc>
<header/>
<makefile target="nps" firmware="fixedwing">
<file name="nps_fdm_crrcsim.cpp" dir="nps"/>
</makefile>
</module>
+35
View File
@@ -0,0 +1,35 @@
<!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 /opt/jsbsim
JSBSim 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="/opt/jsbsim" description="set root directory for JSBSim library when auto-detection (see FIND_JSBSIM_VIA_PKG_CONFIG) is not used (default path: /opt/jsbsim)"/>
</doc>
<header/>
<makefile target="nps">
<configure name="JSBSIM_ROOT" default="/opt/jsbsim"/>
<configure name="JSBSIM_INC" value="$(JSBSIM_ROOT)/include/JSBSim"/>
<configure name="JSBSIM_LIB" value="$(JSBSIM_ROOT)/lib"/>
<configure name="FIND_JSBSIM_VIA_PKG_CONFIG" default="$(shell pkg-config JSBSim --exists && echo 'yes')"/>
<raw>
ifeq ($(FIND_JSBSIM_VIA_PKG_CONFIG), yes)
nps.CFLAGS += $(shell pkg-config JSBSim --cflags)
nps.LDFLAGS += $(shell pkg-config JSBSim --libs)
else
FIND_JSBSIM_VIA_PKG_CONFIG = no
nps.CFLAGS += -I$(JSBSIM_INC)
nps.LDFLAGS += -L$(JSBSIM_LIB) -lJSBSim
endif
</raw>
<file name="nps_fdm_jsbsim.cpp" dir="nps"/>
</makefile>
</module>