Difference between revisions of "JSBSim"
(extra page for JSBSim installation, so no need to repeat the same thing on NPS and Simulation page) |
|||
(6 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
[http://jsbsim.org | <categorytree style="float:right; clear:right; margin-left:1ex; border: 1px solid gray; padding: 0.7ex;" mode=pages>Simulation</categorytree> | ||
__TOC__ | |||
[http://jsbsim.org JSBSim] is an open source flight dynamics model (FDM) used in [[NPS]]. | |||
== Installation == | == Installation == | ||
Line 10: | Line 13: | ||
=== From Source === | === From Source === | ||
Compile JSBSIM from source (with specified date to make sure it works and API hasn't changed) | Compile JSBSIM from source (with specified date to make sure it works and API hasn't changed) | ||
cvs -z3 -d:pserver:anonymous@jsbsim.cvs.sourceforge.net:/cvsroot/jsbsim co -D " | cvs -z3 -d:pserver:anonymous@jsbsim.cvs.sourceforge.net:/cvsroot/jsbsim co -D "23 Feb 2015" -P JSBSim | ||
cd JSBSim | cd JSBSim | ||
./autogen.sh | ./autogen.sh | ||
Line 17: | Line 20: | ||
sudo make install | sudo make install | ||
If you want to install to a different location, change the ''prefix'' to your | When building a [[NPS]] simulator target, the build system will first try to find JSBSim via pkg-config and fall back to ''/opt/jsbsim''. | ||
If you want to install to a different location, change the ''prefix'' to your liking. | |||
And you need to add a <tt><makefile></tt> section to your airframe file and add the correct flags to point to the include files and libraries, depending on where it is installed. | And you need to add a <tt><makefile></tt> section to your airframe file and add the correct flags to point to the include files and libraries, depending on where it is installed. | ||
With the default installation to <tt>/usr/local/</tt>, this would look like | With the default installation to <tt>/usr/local/</tt>, this would look like | ||
<makefile location="after"> | <makefile location="after"> | ||
nps.CFLAGS += -I/usr/local/include/JSBSim | |||
nps.LDFLAGS += -L/usr/local/lib | |||
</makefile> | </makefile> | ||
[[Category:Software]] [[Category:User_Documentation]] | === On OSX === | ||
* Install the JSBSim libraries onto your system. This should already be installed with <tt>paparazzi-tools</tt>, but if it isn't: | |||
<code>$ sudo port install jsbsim</code> | |||
It uses code from the cvs repo, so it should be the most up-to-date source. | |||
== Troubleshooting == | |||
* If you get an error like "undefined reference to `pcre_compile'", edit file conf/Makefile.jsbsim, look for the line that begins with LDFLAGS and add -lpcre, e.g.: | |||
LDFLAGS += $($(TARGET).LDFLAGS) -lpcre | |||
[[Category:Simulation]] [[Category:Software]] [[Category:User_Documentation]] |
Latest revision as of 10:20, 11 March 2016
JSBSim is an open source flight dynamics model (FDM) used in NPS.
Installation
Debian Package
On Debian/Ubuntu you can install the paparazzi-jsbsim package.
sudo apt-get install paparazzi-jsbsim
If you don't have that in your sources, see Installation/Linux#Adding_the_APT_repository
From Source
Compile JSBSIM from source (with specified date to make sure it works and API hasn't changed)
cvs -z3 -d:pserver:anonymous@jsbsim.cvs.sourceforge.net:/cvsroot/jsbsim co -D "23 Feb 2015" -P JSBSim cd JSBSim ./autogen.sh ./configure --enable-libraries --enable-shared --prefix=/opt/jsbsim make sudo make install
When building a NPS simulator target, the build system will first try to find JSBSim via pkg-config and fall back to /opt/jsbsim.
If you want to install to a different location, change the prefix to your liking. And you need to add a <makefile> section to your airframe file and add the correct flags to point to the include files and libraries, depending on where it is installed.
With the default installation to /usr/local/, this would look like
<makefile location="after"> nps.CFLAGS += -I/usr/local/include/JSBSim nps.LDFLAGS += -L/usr/local/lib </makefile>
On OSX
- Install the JSBSim libraries onto your system. This should already be installed with paparazzi-tools, but if it isn't:
$ sudo port install jsbsim
It uses code from the cvs repo, so it should be the most up-to-date source.
Troubleshooting
- If you get an error like "undefined reference to `pcre_compile'", edit file conf/Makefile.jsbsim, look for the line that begins with LDFLAGS and add -lpcre, e.g.:
LDFLAGS += $($(TARGET).LDFLAGS) -lpcre