https://wiki.flightgear.org/w/api.php?action=feedcontributions&user=Wonko&feedformat=atomFlightGear wiki - User contributions [en]2024-03-28T14:18:30ZUser contributionsMediaWiki 1.39.6https://wiki.flightgear.org/w/index.php?title=Dragon&diff=94694Dragon2016-03-04T23:56:27Z<p>Wonko: Add keyboard controls w and f</p>
<hr />
<div>{{aero-stub}}<br />
{{Infobox aircraft<br />
| name = Dragon<br />
| image = FG dragon near Lillooet.jpg<br />
| alt = The dragon near Lillooet<br />
| type = Mythical creature<br />
| authors = Erik Hofman<br />
| fdm = [[JSBSim]]<br />
| fgname = Pterosaur<br />
| development = {{fgaddon url|Pterosaur}}<br />
}}<br />
<br />
The '''dragon''' was inspired a personal project, and it demonstrates the diverse capabilities of FlightGear in terms of aircraft (or flying things). It sports [[ALS technical notes#The exhaust flame effect|ALS flames]] to simulate the breathing of fire. Below is a video of the dragon in flight:<br />
{{#ev:youtube|P-bP93JfqLQ}}<br />
<br />
== Keyboard controls ==<br />
{|<br />
|{{Key press|w}}<br />
|Retract wings for fast diving<br />
|-<br />
|{{Key press|f}}<br />
|Breathe fire (only visible in external view)<br />
|}<br />
<br />
== External links ==<br />
* [http://forum.flightgear.org/viewtopic.php?f=4&t=27814 Forum thread]<br />
* {{Wikipedia|Dragon}}</div>Wonkohttps://wiki.flightgear.org/w/index.php?title=Building_FlightGear_-_Debian&diff=90949Building FlightGear - Debian2015-12-27T00:15:41Z<p>Wonko: libqt5opengl5-dev added as a potentially needed package</p>
<hr />
<div>{{WIP|Article is being updated for the 3.6 release. At the moment building <u>3.6</u> will result in the release candidate for 3.6.0}} <!-- die RCs nicht vergessen! --><br />
<!-- {{note|So far the author wasn't able to compile a working FlightGear 3.4 on Jessie. Therefore this article will not receive an update until 3.6 is released. Compile and run GIT/next on Jessie works as decribed below, just skip the libboost part.}} --><br />
<br />
HowTo build [[FlightGear]] stable (<u>[[Changelog_3.6|3.6]]</u>) or bleeding edge development version, hereinafter simply called <u>[[GIT]]</u>, on [http://www.debian.org/ Debian] GNU/Linux Stable (<u>Jessie</u>). Users of Testing or Unstable at least have to change package names (version numbering) accordingly.<br />
<br />
The meaning of this article is to be a short, '''checklist''' like, overview of the specific steps to compile FlightGear and components on Debian. For more detailed information please refer to the main article [[Building_FlightGear_-_Linux | Building FlightGear on Linux]].<br />
<br />
If you don't want to get your hands dirty, have a look at [[Scripted Compilation on Linux Debian/Ubuntu]].<br />
<br />
[[File:Zeichen_144_icon.png|21px]] For beginners with compiling it is highly recommended to follow this guide step by step. Any modification to most of the here used commands may cause trouble.<br />
<br />
<br />
== Requirements and Preparations ==<br />
A bunch of packages (as well as some of their dependencies) are required to compile FlightGear:<br />
<br />
; Tools<br />
su -c "apt-get install automake cmake g++ gcc git make sed subversion"<br />
<br />
<br />
; Dependencies<br />
su -c "apt-get install \<br />
freeglut3-dev libboost-dev libcurl4-openssl-dev libdbus-1-dev \<br />
libfltk1.3-dev libgtkglext1-dev libjpeg62-turbo-dev libopenal-dev \<br />
libopenscenegraph-dev librsvg2-dev libxml2-dev"<br />
<br />
: If you prefer you might replace "libcurl4-openssl-dev" by "libcurl4-gnutls-dev".<br />
: If "libjpeg62-turbo-dev" breaks package dependencies, just install one of the other versions' -dev.<br />
: Add "libudev-dev" if you need FG's feature <code>-D EVENT_INPUT=ON</code>.<br />
: Add "qt5-default" if you intend to use/test FG's internal, yet experimental, [[Qt5 Launcher]]. You might also need to install "libqt5opengl5-dev".<br />
<br />
: [[File:Zeichen_144_icon.png|21px]] During installation development packages of libraries which are going to be compiled ''must not'' be installed. They can safely be re-installed after compilation. Namely these are "libplib-dev", "libopenthreads-dev" and "simgear-dev". For <u>Wheezy</u> additionally "libboost-dev" and "libopenscenegraph-dev". <br />
<!--<br />
osg: libxml2-dev libcurl4-openssl-dev libgtkglext1-dev libopenal-dev libpng12-dev librsvg2-dev libtiff4-dev<br />
sg: libalut-dev libboost1.42-dev libsvn-dev<br />
fg: freeglut3-dev (libfltk1.1-dev (für fgadmin) fluid) (libudev-dev)<br />
--><br />
<br />
<br />
== Build and install ==<br />
Because we are going to install versions different to the ones in the Debian repositories, it is recommended to install FlightGear in a place independent of the base system, such as <code>/usr/local/FG-3.6</code> or <code>$HOME/FG-3.6</code>. This way also has the advantage of easily managing several FlightGear versions, even with different versions of OpenSceneGraph and/or plib, simply by altering the installation prefix. I suggest to make this directory writeable by the user so there is no need to become root for the <code>make -j2 && make install</code> commands. We'll use <code>$FG_INSTALL_DIR</code> as a [http://www.cmiss.org/cmgui/wiki/SettingEnvironmentVariablesInBash placeholder] for this directory. <br /><br />
Another placeholder will be <code>$FG_SRC_DIR</code>, it stands for the absolute path to the directory which is supposed to keep the folders of the various source codes. So, in the instructions below, you have to replace these with the local paths or even <code>export</code> them (in every terminal you're using them) for the process:<br />
export FG_INSTALL_DIR=$HOME/FG-3.6 && mkdir $FG_INSTALL_DIR<br />
export FG_SRC_DIR=$HOME/src && mkdir $FG_SRC_DIR<br />
<br />
Have in mind that the data is a relatively large download (GIT about 1.5 GiB (required disk space 3.1 GiB) and growing / 3.6 about 1.0 GiB). So, to save some time, it is a good idea to [[#FlightGear data|fetch]] it while building the sources. <br /><br />
For some basic info on git commands for FlightGear users we have a [[Git_for_Laymen#How_do_I_use_the_git_repository_to_update_Flightgear_stuff.3F|git for laymen]] section. <br /><br />
<br />
For more/advanced cmake options and SimGear's and FlightGear's optional features see the [[Building_using_CMake#Optional_Features|cmake]] article.<br />
<br />
[[File:Zeichen_144_icon.png|21px]] Do '''not''' mix instructions for <u>3.6</u> and <u>GIT</u>! Not even for fgdata, mixing versions will almost certainly break the installation.<br />
<br />
<br />
=== libboost ===<br />
<u>Debian 7.x/Wheezy</u> only! <br /><br />
<u>3.6</u> and <u>GIT</u>: <br /><br />
Unfortunately version 1.52 or newer is recommended while Wheezy ships with 1.49:<br />
cd $FG_SRC_DIR<br />
<nowiki>wget -O boost_1_52_0.tar.bz2 http://sourceforge.net/projects/boost/files/boost/1.52.0/boost_1_52_0.tar.bz2/download</nowiki><br />
tar xjf boost_1_52_0.tar.bz2<br />
cp -R boost_1_52_0/boost $FG_INSTALL_DIR/include/<br />
For cmake to find this alternate libboost version it has to be told where to look for it. Use the following cmake commands instead of the ones given at the respective part. <br /><br />
SimGear:<br />
cmake -D Boost_INCLUDE_DIR="$FG_INSTALL_DIR/include/" \<br />
-D CMAKE_INSTALL_PREFIX:PATH="$FG_INSTALL_DIR" $FG_SRC_DIR/simgear.git<br />
Flightgear:<br />
cmake -D Boost_INCLUDE_DIR="$FG_INSTALL_DIR/include/" \<br />
-D CMAKE_INSTALL_PREFIX:PATH="$FG_INSTALL_DIR" $FG_SRC_DIR/flightgear.git<br />
<br />
<br />
=== [[plib]] ===<br />
<u>3.6</u> and <u>GIT</u>: <br /><br />
Latest SVN is [http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg20793.html required].<br />
cd $FG_SRC_DIR<br />
<nowiki>svn co https://svn.code.sf.net/p/plib/code/trunk plib.svn</nowiki><br />
cd plib.svn<br />
sed s/PLIB_TINY_VERSION\ \ 5/PLIB_TINY_VERSION\ \ 6/ -i src/util/ul.h<br />
./autogen.sh<br />
./configure --prefix=$FG_INSTALL_DIR<br />
make -j2 && make install<br />
<br />
<br />
=== [[OpenSceneGraph]] ===<br />
<u>Debian 7.x/Wheezy</u> only! <br /><br />
<u>3.6</u>'s optimum version is OSG 3.2.1. <br /><br />
Same for <u>GIT</u> at the time of the release. This might change over time.<br /><br />
<br />
<u>3.6</u> and <u>GIT</u>:<br />
cd $FG_SRC_DIR<br />
<nowiki>svn co http://svn.openscenegraph.org/osg/OpenSceneGraph/tags/OpenSceneGraph-3.2.1</nowiki><br />
mkdir build-osg; cd build-osg<br />
cmake -D CMAKE_BUILD_TYPE="Release" -D LIB_POSTFIX="" -D Boost_INCLUDE_DIR="$FG_INSTALL_DIR/include/" \<br />
-D CMAKE_INSTALL_PREFIX:PATH="$FG_INSTALL_DIR" $FG_SRC_DIR/OpenSceneGraph-3.2.1<br />
make -j2 && make install<br />
<br />
<br />
=== [[SimGear]] ===<br />
<u>3.6</u> and <u>GIT</u>:<br />
cd $FG_SRC_DIR<br />
<nowiki>git clone git://git.code.sf.net/p/flightgear/simgear simgear.git</nowiki><br />
<br />
<u>3.6</u> only:<br />
cd simgear.git<br />
git checkout release/3.6.0<br />
<br />
<u>3.6</u> and <u>GIT</u>:<br />
mkdir $FG_SRC_DIR/build-sg; cd $FG_SRC_DIR/build-sg<br />
cmake -D CMAKE_INSTALL_PREFIX:PATH="$FG_INSTALL_DIR" $FG_SRC_DIR/simgear.git<br />
make -j2 && make install<br />
<br />
<br />
=== FlightGear source ===<br />
<u>3.6</u> and <u>GIT</u>:<br />
cd $FG_SRC_DIR<br />
<nowiki>git clone git://git.code.sf.net/p/flightgear/flightgear flightgear.git</nowiki><br />
<br />
<u>3.6</u> only:<br />
cd flightgear.git<br />
git checkout release/3.6.0<br />
<br />
<u>3.6</u> and <u>GIT</u>:<br />
mkdir $FG_SRC_DIR/build-fg; cd $FG_SRC_DIR/build-fg<br />
cmake -D CMAKE_INSTALL_PREFIX:PATH="$FG_INSTALL_DIR" $FG_SRC_DIR/flightgear.git<br />
make -j2 && make install<br />
<br />
<br />
=== FlightGear data ===<br />
<u>3.6</u> only: Please have a look at the [http://www.flightgear.org/download/mirror/ mirror list] for a server close to your location.<br />
cd $FG_INSTALL_DIR<br />
<nowiki>wget http://sourceforge.net/projects/flightgear/files/release-candidate/FlightGear-3.6.0-data-rc.tar.bz2/download -O FlightGear-3.6.0-data-rc.tar.bz2</nowiki><br />
tar xjf FlightGear-3.6.0-data-rc.tar.bz2<br />
<!--<br />
<nowiki>wget ftp://ftp.snt.utwente.nl/pub/software/flightgear/ftp/Shared/FlightGear-data-3.6.0.tar.bz2</nowiki><br />
tar xjf FlightGear-data-3.6.0.tar.bz2<br />
--><br />
<br />
<u>GIT</u> only:<br />
cd $FG_INSTALL_DIR<br />
<nowiki>git clone git://git.code.sf.net/p/flightgear/fgdata fgdata</nowiki><br />
<br />
<br />
== Trial run and finishing process ==<br />
When all the builds are done and the data download has finished it is time for a test run:<br />
export LD_LIBRARY_PATH=$FG_INSTALL_DIR/lib/:$LD_LIBRARY_PATH<br />
$FG_INSTALL_DIR/bin/fgfs --fg-root=$FG_INSTALL_DIR/fgdata<br />
: The <code>fgfs</code> binary needs to find our self compiled libraries at runtime and therefore we have to tell the linker (ld) where to find them. That is what the first line here does. You might want to add this line to your <code>$HOME/.bashrc</code> to have this as a persistent setting (may cause problems, if one has installed more than one version of FlightGear!).<br />
: Have in mind, the <code>$FG_INSTALL_DIR</code> and <code>$FG_SRC_DIR</code> variables are available for this session only. For future use of these lines, replace them by the real paths.<br />
<br />
To avoid the need to give the path to the <code>fgfs</code> command each time, you might consider to create a symlink at a place that is listed in $PATH:<br />
ln -s $FG_INSTALL_DIR/bin/fgfs $HOME/bin/fgfs<br />
<br />
For the future, if you want to start FlightGear from command line have a look at [[fgfsrc]], if you prefer a graphical user interface continue with [[#fgrun|compiling fgrun]] or check out another [http://wiki.flightgear.org/Category:FlightGear_front_ends launcher]. <br />
<br />
<br />
== Optional Software ==<br />
[[File:Zeichen_101_icon.png|21px]] Some of the below instructions possibly are not up to date. Please feel free to revise them.<br />
<br />
Feel free to add the commands to install other FlightGear related projects.<br />
<br />
=== [[Atlas]] ===<br />
One more Package has to be installed: "libglew1.5-dev"<br />
cd $FG_SRC_DIR<br />
<nowiki>git clone http://mapserver.flightgear.org/git/atlas</nowiki><br />
cd atlas<br />
./autogen.sh<br />
./configure --prefix=$FG_INSTALL_DIR --with-fgbase=$FG_INSTALL_DIR/data<br />
make -j2 && make install<br />
cp -R $FG_SRC_DIR/atlas/src/data/* $FG_INSTALL_DIR/data/Atlas<br />
<!--If it does not compile, go back some commits. Before invoking the <code>autogen.sh</code> command do:<br />
git reset --hard 5a27c351a8c03c7fa47cba0b4af7f4e23e4c31b0--><br />
<br />
$FG_INSTALL_DIR/bin/Atlas<br />
<br />
<br />
=== [[FGCom_3.0|fgcom 3.0]] ===<br />
<br />
There is nothing to compile because FGCom 3.0 is compiled with FlightGear.<br />
<br />
If you can't compile FlightGear you can download a pre-built binary at [http://fgcom.flightgear.org/download http://fgcom.flightgear.org/download]<br />
<br />
=== fgcom (FG 2.12 and former) ===<br />
For [[fgcom]] install package "libasound2-dev".<br />
cd $FG_SRC_DIR<br />
<nowiki>git clone http://mapserver.flightgear.org/git/fgcom fgcom.git</nowiki><br />
cd fgcom.git<br />
git checkout -b next origin/next<br />
mkdir $FG_SRC_DIR/build-fgcom; cd $FG_SRC_DIR/build-fgcom<br />
cmake -D CMAKE_INSTALL_PREFIX:PATH="$FG_INSTALL_DIR" $FG_SRC_DIR/fgcom.git<br />
make -j2 && make install<br />
Create an .alsoftrc file as shown in [[FGCOM_Testing#Special_for_Linux_.28.alsoftrc.29|FGCOM Testing]].<br />
<br />
<br />
=== [[fgrun]] ===<br />
Package "fluid" has to be installed. <br /><br />
<u>3.6</u> and <u>GIT</u>:<br />
cd $FG_SRC_DIR<br />
<nowiki>git clone git://git.code.sf.net/p/flightgear/fgrun fgrun.git</nowiki><br />
<br />
<u>3.6</u> only:<br />
cd fgrun.git<br />
git checkout release/3.6.0<br />
<br />
<u>3.6</u> and <u>GIT</u>: <br /><br />
On <u>Wheezy</u> only, insert option <code>-D Boost_INCLUDE_DIR="$FG_INSTALL_DIR/include/"</code> right after "cmake". <br />
mkdir $FG_SRC_DIR/build-fgrun; cd $FG_SRC_DIR/build-fgrun<br />
cmake -D CMAKE_INSTALL_PREFIX:PATH="$FG_INSTALL_DIR" $FG_SRC_DIR/fgrun.git<br />
make -j2 && make install<br />
<br />
Execute it:<br />
export LD_LIBRARY_PATH=$FG_INSTALL_DIR/lib/:$LD_LIBRARY_PATH<br />
$FG_INSTALL_DIR/bin/fgrun<br />
<br />
<br />
=== TaxiDraw ===<br />
[[File:Zeichen_101_icon.png|21px]] Obsolete for airport creation, use [[WorldEditor]] instead. It is still useful for working on [[Interactive_traffic#Ground_networks|ground networks]]. <br /><br />
To compile [[Taxidraw|TaxiDraw]] we need to install packag "wx2.8-headers" (at least, maybe even more than just that one. Please [http://wiki.flightgear.org/index.php?title=Talk:Building_FlightGear_-_Debian&action=edit&redlink=1 report]!<br />
cd $FG_SRC_DIR<br />
<nowiki>git clone git://mapserver.flightgear.org/taxidraw</nowiki><br />
cd taxidraw<br />
./autogen.sh<br />
./configure --prefix=$FG_INSTALL_DIR<br />
make -j2 && make install<br />
<br />
<br />
=== [[TerraGear]] ===<br />
==== Automatic Installation ====<br />
[[BuildingTerraGear_in_Ubuntu_910_(32-_or_64-bit)#Automatic Installation|link]]<br />
If you are familiar with "download_and_compile.sh" script from Brisa you can donwload this script: http://clement.delhamaide.free.fr/download_and_compile_tg.sh<br />
This script is similar to Brisa's one (only usable for Debian/Mint/Ubuntu). This script installs TerraGear (latest version) and terragear-gui.<br />
<br />
; ''How to use it?''<br />
sh terragear_download_and_compile.sh -j 2 ALL<br />
<br />
; ''Need some help?''<br />
Look at forum topics: http://forum.flightgear.org/viewtopic.php?f=20&t=14849<br />
<br />
After success installation you can exectute this command line in the terragear/bin directory in order to display every --help for each binary files:<br />
cd terragear/bin && for i in `ls`; do echo ""; echo "################# "$i" ##############"; ./$i --help; done<br />
<br />
==== Basic Installation ====<br />
To resolve some of the dependencies of TerraGear the <u>GIT</u> sections of steps [[#plib|plib]], [[#OpenSceneGraph|OpenSceneGraph]] and [[#SimGear|SimGear]] have to be done first. Additionally some packages and their dependencies have to be installed:<br />
su -c "apt-get install \<br />
libgdal-dev libtiff4-dev libboost-signals-dev libboost-system-dev libboost-thread-dev"<br />
<br />
<u>Squeeze</u> users have to compile the CGAL dependency.<br />
On <u>Wheezy</u> just install package "libcgal-dev" instead.<br />
cd $FG_SRC_DIR<br />
wget https://gforge.inria.fr/frs/download.php/31174/CGAL-4.0.2.tar.bz2<br />
tar xjf CGAL-4.0.2.tar.bz2<br />
mkdir $FG_SRC_DIR/build-cgal; cd $FG_SRC_DIR/build-cgal<br />
cmake -D CMAKE_INSTALL_PREFIX:PATH="$FG_INSTALL_DIR" $FG_SRC_DIR/CGAL-4.0.2<br />
make -j2 && make install<br />
<br />
<!--<br />
# gpc install<br />
mkdir $FG_SRC_DIR/gpc232 && cd $FG_SRC_DIR/gpc232<br />
wget ftp://ftp.cs.man.ac.uk/pub/toby/gpc/gpc232-release.zip<br />
unzip gpc232-release.zip<br />
sed s/DBL_EPSILON/0.000001/ -i gpc.h<br />
grep -A 18 '# Unix/Linux makefile' $FG_SRC_DIR/terragear-cs/README.gpc > Makefile<br />
sed "s|/usr/local/lib|$FG_INSTALL_DIR/lib|" -i Makefile<br />
sed "s|/usr/local/include|$FG_INSTALL_DIR/include|" -i Makefile<br />
make -j2 && make install<br />
<br />
# newmat install<br />
mkdir $FG_SRC_DIR/newmat11 && cd $FG_SRC_DIR/newmat11<br />
wget http://www.robertnz.net/ftp/newmat11.tar.gz<br />
tar xzfv newmat11.tar.gz<br />
make -f nm_gnu.mak<br />
cp libnewmat.a $FG_INSTALL_DIR/lib<br />
mkdir $FG_INSTALL_DIR/include/newmat<br />
cp *.h $FG_INSTALL_DIR/include/newmat<br />
--><br />
Compile TerraGear:<br />
cd $FG_SRC_DIR<br />
git clone git://git.code.sf.net/p/flightgear/terragear terragear.git<br />
cd terragear.git<br />
git checkout scenery/ws2.0<br />
mkdir $FG_SRC_DIR/build-tg; cd $FG_SRC_DIR/build-tg<br />
cmake -D CMAKE_INSTALL_PREFIX:PATH="$FG_INSTALL_DIR" $FG_SRC_DIR/terragear.git<br />
make -j2 && make install<br />
<br />
<br />
=== WorldEditor (WED) ===<br />
Because this is the same for all Linux distributions the instructions are not listed here separately. Please refer to our [[WorldEditor#Linux|lead WED article]].<br />
<br />
<br />
{{Building}}<br />
<br />
[[de:FlightGear bauen - Debian]]</div>Wonkohttps://wiki.flightgear.org/w/index.php?title=Ubuntu&diff=90555Ubuntu2015-12-11T17:29:18Z<p>Wonko: Update git download link from gitorious to sf</p>
<hr />
<div>{{stub}}<br />
<br />
<br />
Following steps walk through downloading the FlightGear source code, compile and run on Ubuntu 13.04 (x86_64) <br />
<br />
== Required Packages ==<br />
<br />
Install the following packages and libraries to be able to compile FlightGear: <br />
<pre><br />
sudo apt-get install git subversion build-essential cmake cmake-curses-gui libpng12-dev libfreetype6-dev<br />
libjpeg-dev libgif-dev libtiff5-dev libxmu-dev libxi-dev freeglut3-dev libalut-dev libxft-dev libxinerama-dev<br />
libboost-dev libplib-dev libopenscenegraph-dev libsvn-dev libudev-dev libfontconfig1-dev<br />
</pre><br />
<br />
== Download source == <br />
<br />
Create a fgsrc directory and get the source code with git: <br />
<pre>mkdir ~/fgsrc <br />
cd ~/fgsrc<br />
git clone git://git.code.sf.net/p/flightgear/simgear simgear<br />
git clone git://git.code.sf.net/p/flightgear/flightgear<br />
git clone git://git.code.sf.net/p/flightgear/fgdata<br />
</pre> <br />
<br />
== Compile == <br />
<br />
Create directory to install FlightGear in and create environment variable: <br />
<pre>export prefix=$HOME/FG-install && mkdir $prefix</pre> <br />
<br />
Create a build directory for each package and run cmake from there: <br />
<br />
SimGear: <br />
<pre>cd ~/fgsrc<br />
mkdir build-sg<br />
cd build-sg <br />
cmake -D CMAKE_INSTALL_PREFIX:PATH="$prefix" ~/fgsrc/simgear <br />
make -j2 install<br />
</pre><br />
<br />
FlightGear: <br />
<pre>cd ~/fgsrc<br />
mkdir build-fg<br />
cd build-fg <br />
cmake -D CMAKE_INSTALL_PREFIX:PATH="$prefix" ~/fgsrc/flightgear <br />
make -j2 install<br />
</pre><br />
<br />
== Run == <br />
<br />
Link fgdata to the data directory in FG-install <br />
<pre>cd $prefix<br />
ln -s ~/fgsrc/fgdata data</pre> <br />
<br />
Run executable: <br />
<pre>$prefix/bin/fgfs --fg-root=$prefix/data</pre> <br />
<br />
== Troubleshooting ==<br />
<br />
; Link error undefined reference to symbol 'dlopen@@GLIBC_2.2.5<br />
: Uninstall fltk 1.3 library <pre>sudo apt-get remove libfltk1.3-dev</pre> See the [http://forum.flightgear.org/viewtopic.php?f=45&t=20164 forum] <br />
<br />
; Only-a-black-screen problem:<br />
: If you are a nvidia user and only get a black screen at startup, you might suffer from Ubuntu bug [https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers/+bug/982485 982485]. Have a look at comment [https://bugs.launchpad.net/ubuntu/+source/nvidia-graphics-drivers/+bug/982485/comments/24 #24] for a possible workaround.</div>Wonkohttps://wiki.flightgear.org/w/index.php?title=Cessna_Citation_X&diff=84768Cessna Citation X2015-05-20T21:04:19Z<p>Wonko: Minor fix of references</p>
<hr />
<div>{{infobox Aircraft<br />
|image = CessnaCitationX.jpg<br />
|name = Cessna Citation X<br />
|type = Business Jet<br />
|status-fdm = 3<br />
|status-systems = 3<br />
|status-cockpit = 3<br />
|status-model = 3<br />
|livery = Stripes<br />
|authors = Syd Adams<br />
|fdm = YASim<br />
|status = Development<br />
|fgname = CitationX<br />
}}<br />
The '''Cessna Citation X''' (X as in the Roman numeral for ten, not the letter) is a long range medium business jet aircraft. The X is currently the fastest civilian jet in production with a top speed of Mach 0.92 (703 mph). This also makes it the fastest business jet in history. The Citation X is powered by two Rolls-Royce turbofan engines and is built by the [[Cessna Aircraft Company]] in Wichita, Kansas. The Citation brand of business jets encompasses six distinct "families" of aircraft. Although based on the earlier Citation III, VI and VII models the Citation X is a significantly different airplane. It utilizes a totally new wing design, engines, and features a glass cockpit.<br />
<br />
== Aircraft help ==<br />
<br />
=== Startup ===<br />
(following the procedure in the tutorial) <br />
<br />
[[File:Citationx-power+avionics.png|400px|Screenshot of Citation X cockpit detail (Power and Avionics panel) with buttons to press during startup highlighted.Designer of Flightgear Citation X plane: Syd Adams]]<br />
<br />
Power and Avionics panel in front of pilot:<br />
* Battery L + R switches on<br />
* Generator L + R switches on<br />
* Avionics switch on<br />
* Ignition L + R on<br />
Lights:<br />
* Gnd/Rec anticoll on (on lower central panel on co-pilot side)<br />
* Taxi on (central console - copilot side, next to flaps)<br />
Start Engines:<br />
* Throttle: to idle<br />
* Press Engine starter button L+R<br />
* Throttle: spool up<br />
=== Taxi ===<br />
* Nav lights on<br />
* Release parking: Shift-B<br />
* Max Taxiing speed 20 kts<br />
<br />
=== Take Off ===<br />
Preparation<br />
* Landing lights on (central panel)<br />
* Recog on <br />
* Taxi light off<br />
* Flaps 5 deg<br />
Take Off<br />
* Thrust: TO (take/off ~95%)<br />
Note that you will lose tiller control at about 50 knots and no more control on yaw is possible; make sure you are aligned well before reaching this speed<br />
* Vr=130 kts (pull hard on yoke such that front wheels leave ground)<br />
* V2=140 kts (rear wheels leave ground) <br />
* Retract landing gear as soon as you have left the ground (G)<br />
* 1500 ft above ground: flaps up<br />
Climb out<br />
* Landing lights off<br />
* 250 kts (do not exceed below 10000 ft)<br />
* 280 kts (above 10000 ft)<br />
* At Transition Altitude set altimeter to 29.92 (1013)<br />
* Max speed 345 kts at FL240-280 (24000-28000 ft)<br />
=== Approach and Landing ===<br />
* Descent speed (280 kts to FL120, 250 kts below 10000 fts)<br />
* Turn on landing lights<br />
* Reduce speed (throttle to idle) <br />
* 180 kts Flaps 5 deg<br />
* 140 kts Flaps 15 deg<br />
* 130 kts lower landing gear <br />
At final stretch toward runway<br />
* 125 kts Flaps 35 deg<br />
* 120 kts Landing speed<br />
After touchdown<br />
* Lower nose wheel<br />
* Deploy spoilers (Ctrl-B)<br />
* Reverse thrust (del)<br />
* at 60 knots: cancel reverse (del)<br />
* Manual brakes <br />
Taxi <br />
* flaps up<br />
* Landing lights off<br />
* Recog light off<br />
* Taxi light on<br />
* max 20 kts<br />
<br />
<!-- During descent use the auto-pilot (VS mode) to control the rate of descent, and the throttle to control airspeed.--><br />
In order to effect the initial speed reduction, place the throttle in idle. As you deploy the larger flaps levels (15+) the aircraft can slow down quite quickly, and you will have to carefully use throttle and elevators to avoid a dramatic loss of airspeed and stall. Particularly for the full flaps extension it is very difficult to maintain sufficient airspeed to prevent fast descent so deploy these only when you are really close to the runway. <br />
<br />
<br />
=== The autopilot ===<br />
[[File:Citation-x-autopilot.png|thumb|Cockpit screenshot with highlighting of autopilot features]]<br />
<br />
''As of version 2.12, the autopilot appears to still have some stability issues, and using either the horizontal localiser or glideslope locking of an ILS signal caused the autopilot to put me into a highly unstable situation (extreme bank angle, upside down), although on the forum I have read of others who have not experienced these difficulties and apparently have carried out semi-automatic landings with the Citation X autopilot. If you encounter instability in any other autopilot mode you can try to turn off auto-coordination (i.e. do not use option --enable-auto-coordination option, which links rudder to aileron movements). Also you must only engage the autopilot from a stable situation, i.e. level or small bank and pitch angles. Please note that I have no knowledge of the internals of the autopilot, so some of the information below might be inaccurate''<br />
<br />
Before the flight you should set the route in the [[route manager]]. In the explanation it is assumed you are familiar with basic autopilot operation in the Cessna, although the Citation X autopilot differs in many aspects. This description is not an exhaustive description of the autopilot modes, but rather a summary that should be sufficient to get you started.<br />
<br />
The autopilot can be controlled either from the unit at the top of the instrument panel (marked in red), or from the dedicated GUI menu (F11) (marked in green). The keys in the cockpit will light up according to which autopilot mode you are in - no direct visual feedback is associated with key presses in the GUI window but the actual mode is shown in the top of the window. The current horizontal and vertical mode are shown in the top part of the GUI window as well as in the top of the primary flight display (PFD, the left glas panel on pilot side).<br />
<br />
Basic mode<br />
* AP: engages/disengages the autopilot - this switch works as a toggle switch. On first engaging the autopilot, it will reduce the bank angle to zero and keep the pitch direction. You can adjust the pitch with the 'nose' up/dn wheel on the autopilot unit, or equivalently the UP and DN buttons on the GUI. It is no longer possible to control the attitude or climb and sink rate directly with the elevator as the autopilot will adjust the elevator trim to counter any movement of the yoke. <br />
(Note that this behaviour is slightly different to that described in <ref name="CitXSec3">(Citation X - Section III Instrument and Avionics)[http://www.scribd.com/doc/78382264/Cessna-Citation-X-Instrumentation-and-Avionics]</ref>)<br />
<br />
* STBY: cancel all horizontal and vertical modes and revert to basic mode of pitch and roll control<br />
<br />
Horizontal modes<br />
* HDG: turn into the direction set by the heading bug and follow it. Although there is a cockput knob for adjusting this in the central console on both the pilot and co-pilot side, it is not practical to use unless you have multiple views enabled or use the autopilot GUI as you cannot at the same time operate the knob and look and its effect. So the best way is to use the GUI to set this. The current position of the heading bug is shown on the horizontal indicator in the centre bottom part of the PFD and as a number in the bottom left of the PFD.<br />
* NAV: Navigation mode. ''Choosing the NAV source:'' For this you use the two buttons NAV and FMS in the unit above the PFD (marked blue) (or equivalent buttons in the GUI). NAV will select the VOR tracking mode (pressing it will toggle between tracking NAV1 and NAV2 receivers), and FMS will follow the flight plan defined through the [[route manager]]. Note that changing from FMS to NAV1 or NAV2 mode and vice versa will disengage all horizontal and vertical modes and put autopilot into standby mode. In the NAV mode the autopilot will intercept and then track the selected radial of the VOR station similar to a Cessna. The radial can be selected in the GUI, with the knob in the central panel or with the knob in the auxiliary HSI. Both HDG and NAV mode can be engaged at the same time - in this case the HDG bug will select the intercept direction. The HDG mode will automatically disengage when the autopilot turns to line up with the radial. In the FMS mode, the plane will fly from waypoint to waypoint, starting with the currently active one (the horizontal mode indicator then shows LNAV). <br />
''The NAV mode AP might not be stable when the NAV receiver is tuned to an ILS frequency''<br />
<br />
Vertical modes<br />
* VS: set the vertical speed in ft/min. If the mode is engaged the target sink or climb rate is indicated as a light blue number above the vertical speed indicator in the PFD<br />
* ALT: when this button is pressed the current altitude will be held. The target altitude can be adjusted in the GUI (ASEL) or (theoretically) with the ASEL knob on the co-pilot side of the central panel. The altitude is specified in terms of flight level (hundreds of feet), and the target altitude is also shown as purple number above the altitude indicator in the PFD<br />
* FLC (Flight Level Change): In this mode a target airspeed is set (indicated as number above the air speed indicator in PFD), which the autopilot will match by lowering the nose if the plane is too slow, and raising it, when it is too fast. This mode will automatically disengage when reaching the target altitude. Conversely, if you are already flying at the pre-selected altitude (or have recently pressed ALT), then this mode does not even engage.<br />
* VNAV This button can only be pressed if a route has been defined and the FMS mode has been selected. It will then follow the preset altitudes defined the [[route manager]] (again as flight level, i.e. in hundreds of feet). ''Watch out: if no altitude has been defined for a waypoint then a default altitude of 0 ft seems to be assumed. This might get you into serious trouble, of course.''<br />
<br />
Combined modes<br />
* APP: Approach mode is supposed to first intercept and track localiser of ILS beacon, and then intercept and follow the glideslope. On my trials this resulted in unstable AP behaviour.<br />
* BC: Back-course follows an ILS radial in the opposite direction (e.g. for landing from the opposite side). After I could not get APP to work properly I did not bother testing this mode.<br />
<br />
Modifier switches<br />
* BANK: (relevant for horizontal modes) Limit bank angle to 17° making for wider turns - generally good idea to have this depressed while cruising<br />
<br />
The CO and YD buttons are active buttons in the cockpit but do not seem to have any effect.<br />
<br />
=== Configuration speed limits <ref name="CitXSec3" /> ===<br />
<br />
{| class="wikitable"<br />
|-<br />
|Flaps 5 deg||250 kts<br />
|-<br />
|Flaps 15 deg||210 kts<br />
|-<br />
|Flaps >15 deg||180 kts<br />
|-<br />
|Gear down || 210 kts<br />
|}<br />
<br />
=== When and how fast to descend? ===<br />
<br />
The following rules-of-thumb apply will give you a glide slope angle of 3 deg and are easily worked out using basic trigonometry.<br />
* Altitude above airport ground (ft) should be about 318 times distance left to fly to runway head (nm)<br />
<br />
Examples: <br />
# You are flying at 20000 ft, and the airport is at 1000 ft. Your descent should start at about (20000-1000)/318 ~ 60 nm left to fly<br />
# You are 10 nm from the airport. Your altitude should be airport altitude plus 318*10 ~ 3200 ft<br />
<br />
* Assuming you are at about the correct altitude your vertical descent speed (ft/min) should be 5.3 times your speed relative ground (kts, from GPS, NOT airspeed)<br />
<br />
Example:<br />
# You are flying at 200 kts rel. ground. Your vertical descent speed should be 200*5.3=1060 ft /min<br />
<br />
<br />
== References ==<br />
<references/><br />
<br />
== Related content ==<br />
* [[FlightGear Newsletter April 2011#Aircraft reviews|Click here]] for a review of the Cessna Citation X.<br />
<br />
{{Cessna}}<br />
<br />
[[Category:Business aircraft]]<br />
<br />
[[de:Cessna Citation X]]<br />
[[es:Cessna Citation X]]<br />
[[fr:Cessna Citation X]]<br />
[[it:Cessna Citation X]]</div>Wonkohttps://wiki.flightgear.org/w/index.php?title=Joystick_autopilot_bindings&diff=81446Joystick autopilot bindings2015-02-23T10:19:18Z<p>Wonko: Minor typos</p>
<hr />
<div>This page describes joystick bindings, which can be used to control the (simulated) autopilot with a set of joystick buttons.<br />
<br />
== Prerequisites ==<br />
Before you start, read [[Input device]] and probably [[Writing Joystick Code: Part 1]].<br />
<br />
== Introduction ==<br />
Autopilots are often very useful devices, but unfortunately the standard key bindings of Flightgear control the `magic autopilot' rather than the simulated real ones, and the only way to control popular GA autopilots is by clicking the corresponding buttons in the 3D-cockpit. This is awkward if there is a need to change mode or turn off the autopilot quickly (at final stage of ILS landing, or if the autopilot does something silly).<br />
<br />
Every type of autopilot is operated quite differently, such that these keys only work for specific models. Here, key bindings are provided for the [[Bendix/King KAP140 Autopilot]] (in the [[Cessna 172]]) and the [http://www.centuryflight.com/manuals/CENTIII.pdf CENTURY III Autopilot POH] ([[Seneca II]]).<br />
Those were prioritised, as the more complex autopilots in jets usually have a dedicated GUI and therefore maybe less in need of joystick binding. However, it is planned to provide bindings for at least basic functions like AUTOPILOT OFF for other autopilot types in the future. <br />
<br />
== Implementation ==<br />
The example code provides a setup for six buttons arranged like this:<br />
<br />
4 5 6<br /><br />
9 8 7 <br />
<br />
(this happens to be suitable for the Thrustmaster T16000M but it can be adapted trivially to other button numbers by simply changing the button numbers in the snippets below).<br />
In the following snippets for each functionality are provided - usually one with the actual binding and some corresponding initialisation code (placed between nasal tags at the beginning of the script). You need to copy/paste both into your joystick bindings xml file. In the summary the code of all snippets is provided in one code box for convenience but you learn more if you consider each snippet in turn. Generally, it was attempted to have largely consistent bindings for the different autopilot types, but because they are operated quite differently, this was not entirely possible, and it was attempted to stay close to the mode of operation of the actual instruments. <br />
<br />
=== Generic initialisation code ===<br />
On startup, we need to figure out whether we are dealing with a Bendix KAP 140 or CENTURY III autopilot.<br />
<syntaxhighlight lang="nasal" ><br />
<nasal><br />
<!-- set autopilot type:<br />
1: KAP140 (e.g. c172p)<br />
2: CENTURYIII (e.g. senecaII) --><br />
<script><![CDATA[<br />
var autopilottype=0;<br />
var horizontalmode=0;<br />
if (getprop("sim/aircraft")=="c172p") {<br />
print("JOYSTICK INIT: Found KAP140 autopilot");<br />
autopilottype=1;<br />
} elsif (getprop("autopilot/CENTURYIII/power")>-1) {<br />
print("JOYSTICK INIT: Found CENTURYIII autopilot");<br />
autopilottype=2; <br />
}<br />
....<br />
]]></script><br />
</nasal><br />
<br />
</syntaxhighlight><br />
As you can see it assumes only the Cessna 172 has the KAP-140. If there is another plane with this autopilot the condition should be adjusted.<br />
<br />
=== Major mode selection ===<br />
Button 4 turns the autopilot on or off (toggle switch). <br />
With modifiers:<br /><br />
(SHIFT) HDG mode toggle (the details of this mode are controlled by button 4)<br /><br />
(CTRL) PITCH mode toggle (CENTURYIII only!)<br /><br />
(ALT) ALT mode toggle (KAP140: switches between VS and ALT vertical modes. CENTURYIII: turns on and off ALT mode) <br />
<br />
Button settings:<br />
<syntaxhighlight lang="nasal"><br />
<button n="4"><br />
<repeatable type="bool">false</repeatable><br />
<desc>Autopilot Toggle / HDG mode toggle / PITCH mode / ALT mode </desc><br />
<binding><br />
<condition><property>/autopilot/CENTURYIII/controls/roll/button-state</property></condition><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/disconnect</property><br />
<value>1</value><br />
</binding><br />
<binding><br />
<condition><not><property>/autopilot/CENTURYIII/controls/roll/button-state</property></not></condition><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/roll/button-on</property><br />
<value>1</value><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
if ( autopilottype == 1 ) { <br />
kap140.apButton();<br />
if ( getprop("autopilot/KAP140/locks/roll-mode") == 0 ) {<br />
gui.popupTip("AP off");<br />
} else {<br />
gui.popupTip("AP on");<br />
}<br />
} <br />
</script><br />
</binding><br />
<mod-up><br />
<binding><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/disconnect</property><br />
<value>0</value><br />
</binding><br />
<binding><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/roll/button-on</property><br />
<value>0</value><br />
</binding><br />
<binding><br />
<command>nasal</command><script><br />
if ( autopilottype == 2 ) { <br />
<!-- CENTURYIII --><br />
if ( getprop("autopilot/CENTURYIII/controls/roll/button-state") ) {<br />
gui.popupTip("AP ROLL on");<br />
} else {<br />
gui.popupTip("AP ROLL off");<br />
} <br />
}<br />
</script><br />
</binding><br />
</mod-up> <br />
<mod-shift> <br />
<binding><br />
<condition><property>/autopilot/CENTURYIII/controls/hdg/button-state</property></condition><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/hdg/button-off</property><br />
<value>1</value><br />
</binding><br />
<binding><br />
<condition><not><property>/autopilot/CENTURYIII/controls/hdg/button-state</property></not></condition><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/hdg/button-on</property><br />
<value>1</value><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
if ( autopilottype == 1 ) { <br />
kap140.hdgButton();<br />
if ( getprop("autopilot/KAP140/locks/roll-mode") == 2 ) {<br />
gui.popupTip("AP HDG");<br />
} elsif ( getprop("autopilot/KAP140/locks/roll-mode") == 1 ) {<br />
gui.popupTip("AP ROL");<br />
}<br />
} <br />
</script><br />
</binding><br />
<mod-up><br />
<binding><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/hdg/button-off</property><br />
<value>0</value><br />
</binding><br />
<binding><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/hdg/button-on</property><br />
<value>0</value><br />
</binding><br />
<binding><br />
<command>nasal</command><script><br />
if ( autopilottype == 2 ) { <br />
<!-- CENTURYIII --><br />
if ( getprop("autopilot/CENTURYIII/controls/hdg/button-state") ) {<br />
gui.popupTip("AP HDG on");<br />
} else {<br />
gui.popupTip("AP HDG off");<br />
}<br />
}<br />
</script><br />
</binding><br />
</mod-up> <br />
</mod-shift><br />
<mod-ctrl> <br />
<binding><br />
<condition><property>/autopilot/CENTURYIII/controls/pitch/button-state</property></condition><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/pitch/button-off</property><br />
<value>1</value><br />
</binding><br />
<binding><br />
<condition><not><property>/autopilot/CENTURYIII/controls/pitch/button-state</property></not></condition><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/pitch/button-on</property><br />
<value>1</value><br />
</binding><br />
<mod-up><br />
<binding><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/pitch/button-off</property><br />
<value>0</value><br />
</binding><br />
<binding><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/pitch/button-on</property><br />
<value>0</value><br />
</binding><br />
<binding><br />
<command>nasal</command><script><br />
if ( autopilottype == 2 ) { <br />
<!-- CENTURYIII --><br />
if ( getprop("autopilot/CENTURYIII/controls/pitch/button-state") ) {<br />
gui.popupTip("AP PITCH on");<br />
} else {<br />
gui.popupTip("AP PITCH off");<br />
} <br />
}<br />
</script><br />
</binding><br />
</mod-up> <br />
</mod-ctrl><br />
<mod-alt> <br />
<binding><br />
<command>nasal</command><br />
<script>if (autopilottype==1 ) {<br />
kap140.altButton();<br />
if ( getprop("autopilot/KAP140/locks/pitch-mode") == 2 ) {<br />
gui.popupTip("AP ALT");<br />
} elsif ( getprop("autopilot/KAP140/locks/pitch-mode") == 1 ) {<br />
gui.popupTip("AP VS");<br />
}<br />
}<br />
</script><br />
</binding><br />
<binding><br />
<condition><property>/autopilot/CENTURYIII/controls/alt/button-state</property></condition><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/alt/button-off</property><br />
<value>true</value><br />
</binding><br />
<binding><br />
<condition><not><property>/autopilot/CENTURYIII/controls/alt/button-state</property></not></condition><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/alt/button-on</property><br />
<value>true</value><br />
</binding><br />
<mod-up><br />
<binding><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/alt/button-off</property><br />
<value>false</value><br />
</binding><br />
<binding><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/alt/button-on</property><br />
<value>false</value><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
if(autopilottype==2) {<br />
if ( getprop("autopilot/CENTURYIII/controls/alt/button-state")) {<br />
gui.popupTip("AP ALT on");<br />
} else {<br />
gui.popupTip("AP ALT off");<br />
}<br />
}<br />
</script><br />
</binding><br />
</mod-up> <br />
</mod-alt><br />
</button><br />
</syntaxhighlight><br />
<br />
=== Horizontal mode selection ===<br />
Button 5 controls the source of course selection in HDG mode (for the LOC and APR modes, the vertical mode is also affected, of course). It works quite differently in the two autopilots:<br />
* KAP140: (no modifier) NAV mode: track radial of VOR1 beacon. Press again to go back to follow set heading<br /><br />
(SHIFT) APR mode: track ILS beacon (set radial to runway orientation). If glideslope is approached from below in ALT mode, lock on to localiser <br /><br />
(CTRL) REV mode: track reverse ILS direction<br /><br />
* CENTURYIII: Move mode selector button to the right (clockwise) <br /><br />
(SHIFT) Move mode selector button to the left (anti-clockwise) <br /><br />
Both directions are wrapped, i.e. you can keep pressing the button until you arrive at the selected mode. In turn, the modes selected are: NAV, OMNI, HDG, LOC NORM, LOC REV. Please refer to the CENTURYIII manual for further explanation. <br />
<br />
Initialisation:<br />
<syntaxhighlight lang="nasal"><br />
var showhorizontalmode=func() {<br />
if ( autopilottype == 1 ) {<br />
if ( getprop("autopilot/KAP140/locks/roll-arm") == 1 ) {<br />
gui.popupTip("AP NAV");<br />
} elsif ( getprop("autopilot/KAP140/locks/roll-arm") == 2 ) {<br />
gui.popupTip("AP APR");<br />
} elsif ( getprop("autopilot/KAP140/locks/roll-arm") == 3 ) {<br />
gui.popupTip("AP REV");<br />
}<br />
}<br />
if (autopilottype == 2) {<br />
horizontalmode=getprop("autopilot/CENTURYIII/controls/mode");<br />
if ( horizontalmode==0) {<br />
gui.popupTip("APmode NAV");<br />
} elsif ( horizontalmode==1) {<br />
gui.popupTip("APmode OMNI");<br />
} elsif ( horizontalmode==2) {<br />
gui.popupTip("APmode HDG");<br />
} elsif ( horizontalmode==3) {<br />
gui.popupTip("APmode LOC");<br />
} elsif ( horizontalmode==4) {<br />
gui.popupTip("APmode REV");<br />
} <br />
}<br />
}<br />
</syntaxhighlight><br />
<br />
Button settings:<br />
<syntaxhighlight lang="nasal"><br />
<button n="5"><br />
<repeatable type="bool">false</repeatable><br />
<desc>KAP140: NAV / APR / REV ; CENTURYIII:<br />
Move Hdg select button to the right (wrap)</desc><br />
<binding><br />
<command>property-adjust</command><br />
<property>autopilot/CENTURYIII/controls/mode</property><br />
<step type="double">1</step><br />
<min>0</min><br />
<max>5</max> <br />
<wrap>true</wrap> <br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
if (autopilottype==1) { <br />
kap140.navButton(); }<br />
showhorizontalmode();<br />
</script><br />
</binding><br />
<mod-shift> <br />
<binding><br />
<command>property-adjust</command><br />
<property>autopilot/CENTURYIII/controls/mode</property><br />
<step type="double">-1</step><br />
<min>0</min><br />
<max>5</max> <br />
<wrap>true</wrap> <br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script> <br />
if (autopilottype==1) { kap140.aprButton();}<br />
showhorizontalmode();<br />
</script><br />
</binding><br />
</mod-shift><br />
<mod-ctrl> <br />
<binding><br />
<command>nasal</command><br />
<script> if (autopilottype==1) { kap140.revButton();}<br />
showhorizontalmode();<br />
</script><br />
</binding><br />
</mod-ctrl><br />
</button><br />
</syntaxhighlight><br />
<br />
=== Vertical mode pitch or vertical speed selector ===<br />
Control the vertical mode.<br />
<br />
* KAP140: Button 6 increases target VS by 100 ft/min, button 7 decreases target VS by 100 ft/min<br />
* CENTURYIII: Button 6 smoothly lowers pitch (nose down), button 7 increases pitch (nose up)<br />
<br />
The opposite way these buttons work for the two types of autopilot arises from the arrangement in the cockpit. For the CENTURYIII, the pitch is controlled by a wheel, which needs to be moved up to lower the nose (similar to elevator trim wheels), whereas for the KAP140 two buttons are arranged such that the top button increases target VS. <br />
<br />
Initialisation:<br />
<syntaxhighlight lang="nasal"><br />
var showvertical=func() {if ( autopilottype==1 ) {<br />
if ( getprop("autopilot/KAP140/locks/pitch-mode") == 1 ) {<br />
gui.popupTip(sprintf("AP VS<br />
%d",getprop("autopilot/KAP140/settings/target-pressure-rate")*(-58000)));<br />
}<br />
} elsif ( autopilottype==2 ) {<br />
gui.popupTip(sprintf("AP Pitch:%4.1f",getprop("autopilot/CENTURYIII/settings/pitch-wheel-deg")));<br />
}}<br />
</syntaxhighlight><br />
Button settings:<br />
<syntaxhighlight lang="nasal"><br />
<button n="6"><br />
<repeatable type="bool">false</repeatable><br />
<desc>AP-VS (KAP140:increase VS, CENTURYII: pitch down</desc><br />
<!-- KAP140 --><br />
<binding><br />
<command>nasal</command><br />
<script>if (autopilottype==1) {<br />
kap140.upButton();<br />
}<br />
showvertical(); <br />
</script><br />
</binding><br />
<!-- CENTURYIII --><br />
<binding><br />
<command>property-interpolate</command><br />
<property>/autopilot/CENTURYIII/settings/pitch-wheel-deg</property><br />
<value type="double">-10</value><br />
<rate>4</rate><br />
</binding><br />
<mod-up><br />
<binding><br />
<command>property-interpolate</command><br />
<property>/autopilot/CENTURYIII/settings/pitch-wheel-deg</property><br />
<property>/autopilot/CENTURYIII/settings/pitch-wheel-deg</property><br />
<rate>1</rate><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
if(autopilottype==2) { showvertical(); } <br />
</script><br />
</binding><br />
</mod-up><br />
</button><br />
<br />
<br />
#7: Autopilot VS down<br />
<button n="7"><br />
<repeatable type="bool">false</repeatable><br />
<desc>AP-dn</desc><br />
<!-- KAP140 --><br />
<binding><br />
<command>nasal</command><br />
<script>if (autopilottype==1) {<br />
kap140.downButton();<br />
}<br />
showvertical(); <br />
</script><br />
</binding><br />
<!-- CENTURYIII --><br />
<binding><br />
<command>property-interpolate</command><br />
<property>/autopilot/CENTURYIII/settings/pitch-wheel-deg</property><br />
<value type="double">10</value><br />
<rate>4</rate><br />
</binding><br />
<mod-up><br />
<binding><br />
<command>property-interpolate</command><br />
<property>/autopilot/CENTURYIII/settings/pitch-wheel-deg</property><br />
<property>/autopilot/CENTURYIII/settings/pitch-wheel-deg</property><br />
<rate>1</rate><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
if(autopilottype==2) { showvertical(); } <br />
</script><br />
</binding><br />
</mod-up><br />
</button></syntaxhighlight><br />
=== Horizontal mode direction selector ===<br />
Adjust heading bug (button 8 clockwise and button 9 anti-clockwise).<br />
<br />
With modifiers:<br /><br />
(SHIFT) coarse heading bug adjustment<br /><br />
(CTRL) adjust bank angle (CENTURY III only!)<br /><br />
(ALT) adjust radial of NAV1 (can also be used without autopilot)<br /><br />
<br />
<br />
Initialisation:<br />
<syntaxhighlight lang="nasal" ><br />
var showhdgbug=func() {if ( autopilottype==1 ) {<br />
gui.popupTip(sprintf("Heading Bug:%3d",getprop("autopilot/settings/heading-bug-deg"))); <br />
} elsif ( autopilottype==2 ) {<br />
gui.popupTip(sprintf("Hdg Bug:%3d",getprop("instrumentation/kcs55/ki525/selected-heading-deg")));<br />
}}<br />
var showroll=func() { if ( autopilottype==2 ) {<br />
gui.popupTip(sprintf("AP Roll:%2d",getprop("autopilot/CENTURYIII/settings/roll-knob-deg")));}}<br />
var showcourseselect=func() {<br />
if ( autopilottype==1 ) {<br />
gui.popupTip(sprintf("Course select:%2d",getprop("instrumentation/nav/radials/selected-deg")));<br />
} elsif ( autopilottype==2 ) {<br />
gui.popupTip(sprintf("Course select:%2d",getprop("instrumentation/kcs55/ki525/selected-course-deg")));}}<br />
</syntaxhighlight><br />
<br />
Button definition:<br />
<syntaxhighlight lang="xml" ><br />
<button n="8"><br />
<desc>Heading bug CW / Heading bug CW large steps /<br />
(CENTURYIII:)Roll knob turn right / Course select CW</desc><br />
<repeatable>true</repeatable><br />
<binding><br />
<command>property-adjust</command><br />
<property>/autopilot/settings/heading-bug-deg</property><br />
<step type="double">0.25</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>property-adjust</command><br />
<property>instrumentation/kcs55/ki525/selected-heading-deg</property><br />
<step type="double">0.25</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showhdgbug();<br />
</script><br />
</binding><br />
<mod-shift><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showhdgbug();<br />
</script><br />
</binding><br />
<binding><br />
<command>property-adjust</command><br />
<property>/autopilot/settings/heading-bug-deg</property><br />
<step type="double">2.5</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>property-adjust</command><br />
<property>instrumentation/kcs55/ki525/selected-heading-deg</property><br />
<step type="double">2.5</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showhdgbug();<br />
</script><br />
</binding><br />
</mod-shift><br />
<mod-ctrl><br />
<binding><br />
<command>property-adjust</command><br />
<property>/autopilot/CENTURYIII/settings/roll-knob-deg</property><br />
<step type="double">0.5</step><br />
<max>30</max><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showroll();<br />
</script><br />
</binding><br />
</mod-ctrl><br />
<mod-alt><br />
<binding><br />
<command>property-adjust</command><br />
<property>instrumentation/nav/radials/selected-deg</property><br />
<step type="double">0.25</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>property-adjust</command><br />
<property>instrumentation/kcs55/ki525/selected-course-deg</property><br />
<step type="double">0.25</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showcourseselect();<br />
</script><br />
</binding><br />
</mod-alt><br />
</button><br />
<br />
<br />
<button n="9"><br />
<desc>Heading bug CCW / Heading bug CCW large steps</desc><br />
<repeatable>true</repeatable><br />
<binding><br />
<command>property-adjust</command><br />
<property>/autopilot/settings/heading-bug-deg</property><br />
<step type="double">-0.25</step><br />
</binding><br />
<binding><br />
<command>property-adjust</command><br />
<property>instrumentation/kcs55/ki525/selected-heading-deg</property><br />
<step type="double">-0.25</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showhdgbug();<br />
</script><br />
</binding><br />
<mod-shift><br />
<binding><br />
<command>property-adjust</command><br />
<property>/autopilot/settings/heading-bug-deg</property><br />
<step type="double">-2.5</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>property-adjust</command><br />
<property>instrumentation/kcs55/ki525/selected-heading-deg</property><br />
<step type="double">-2.5</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showhdgbug();<br />
</script><br />
</binding><br />
</mod-shift><br />
<mod-ctrl><br />
<binding><br />
<command>property-adjust</command><br />
<property>/autopilot/CENTURYIII/settings/roll-knob-deg</property><br />
<step type="double">-0.5</step><br />
<min>-30</min><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showroll();<br />
</script><br />
</binding><br />
</mod-ctrl><br />
<mod-alt><br />
<binding><br />
<command>property-adjust</command><br />
<property>instrumentation/nav/radials/selected-deg</property><br />
<step type="double">-0.25</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>property-adjust</command><br />
<property>instrumentation/kcs55/ki525/selected-course-deg</property><br />
<step type="double">-0.25</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showcourseselect();<br />
</script><br />
</binding><br />
</mod-alt><br />
</syntaxhighlight><br />
<br />
== Summary ==<br />
For convenience all of the above bindings are summarised into one file accessible at [http://pastebin.com/2HM9S1df pastebin] (at the time of writing identical to the combination of the snippets above but of course the pastebin might not always keep up with the Wiki - beware)<br />
<br />
[[Category:Documentation]]</div>Wonkohttps://wiki.flightgear.org/w/index.php?title=Input_device&diff=76790Input device2014-09-28T09:53:38Z<p>Wonko: /* Related content */ add linkt to joystick xml library page</p>
<hr />
<div>Could you imagine a pilot in his or her [[:Category:Cessna|Cessna]] controlling the machine with a keyboard alone? For getting the proper feeling of flight you will need a '''joystick/yoke''' plus [[rudder]] pedals, right? <br />
<br />
FlightGear has integrated joystick support, which automatically detects any joystick, yoke, or pedals attached. Just try it! If this does work for you, lean back and be happy! You can see what FlightGear has detected your joystick as in the Help > Joystick Information dialog from the [[menu]]. <br />
<br />
Unfortunately, for the above mentioned versatility, chances are your joystick does not work out of the box. This article explains you how to make FlightGear recognise your device<br />
<br />
== Joystick or yoke? ==<br />
{| cellpadding="4" cellspacing="0" align="right" style="clear:right; background:#fafafa; font-size: 85%; border: 1px solid #CCCCCC;" <br />
|-<br />
| [[File:CH Products Fighterstick USB.jpg|x199px|CH Products Fighterstick USB]]<br />
| [[File:Saitek Pro Flight Cessna Yoke front.jpg|300px|Saitek Pro Flight Cessna Yoke]]<br />
|-<br />
| CH Products Fighterstick USB<br />
| Saitek Pro Flight Cessna Yoke<br />
|}<br />
The two most common control devices on aircraft are the joystick (left picture) and yoke (right picture). Joysticks can be found on military fighters, helicopters and Airbus [[airliner]]s, while yokes are used on almost all other fixed wing aircraft, including Boeing airliners.<br />
<br />
Joysticks are generally a lot cheaper, starting at $10. Yokes start at $100. When you are new to flightsimming, buying a cheap (ca. $20) joystick might be a good way to find out if it's something for you.<br />
<br />
The following table should help you decide which one is best suited for you:<br />
{| class="wikitable"<br />
!<br />
! Joystick<br />
! Yoke<br />
|-<br />
! style="text-align:left;" | Price<br />
| $10+<br />
| $100+<br />
|-<br />
! style="text-align:left;" | General aviation<br />
| {{no}}<br />
| {{yes}}<br />
|-<br />
! style="text-align:left;" | Helicopter<br />
| {{yes}}<br />
| {{no}}<br />
|-<br />
! style="text-align:left;" | Fighters<br />
| {{yes}}<br />
| {{no}}<br />
|-<br />
! style="text-align:left;" | Airbus<br />
| {{yes}}<br />
| {{no}}<br />
|-<br />
! style="text-align:left;" | Boeing<br />
| {{no}}<br />
| {{yes}}<br />
|}<br />
<br />
Some reviews of flight simulation hardware can be found in [[:Category:Hardware reviews]].<br />
<br />
== Built-in joystick support ==<br />
In order for joystick auto-detection to work, a joystick bindings xml file must exist for each joystick. This file describes what axes and buttons are to be used to control which functions in FlightGear. The associations between functions and axes or buttons are called "bindings".<br />
<br />
FlightGear includes a large number of such bindings files for a variety of manufacturers. Chances are high that your joystick will be recognised straight away, so let's try that first. You can confirm whether it was recognised by looking in the <tt>Help > Joystick Information</tt> dialog. "Used for" should contain a name/description of your joystick. It will contain "default" when FlightGear did not recognise your joystick.<br />
<br />
Most of the time when your joystick is not recognised, it is because of a missing name definition in the respective bindings file. Because FlightGear is used on all kind of operating systems, names vary a lot. You can find the files under <tt>[[$FG_ROOT]]/Input/Joysticks/</tt> (despite the name, yokes and pedals are also found here!). For example, if you have a CH Products joystick, look in the folder <tt>[[$FG_ROOT]]/Input/Joysticks/CH</tt> for a file that might work for your joystick. When such a file exists, do the following:<br />
# Launch FlightGear with the joystick connected.<br />
# Look under Help > Joystick Information and check the name behind "Joystick #0:". <br />
# Open your joystick's bindings file in a XML editor and add the following code to the file, below the already-present <code><name></code> tags.<br />
# <syntaxhighlight lang="xml"><name>The EXACT name you found under step 2; including spaces, capitals etc.</name></syntaxhighlight><br />
# Please report this name [http://forum.flightgear.org/viewforum.php?f=24 at our forum], so it can be added to the official file (and next releases).<br />
<br />
Please note that the latest config files are always to be found at https://gitorious.org/fg/fgdata/trees/master/Input/Joysticks. This link may contain additional binding files that were not included in the latest stable release.<br />
<br />
If there is no file for your joystick, you will have to create such a file. We will discuss that in [[Joystick#Writing or editing joystick binding xml files|a later section]], by cutting and pasting bindings from the examples that are included with FlightGear.<br />
<br />
=== Multiple devices on Windows ===<br />
In case you have two USB devices (for instance a yoke plus pedals) to a Windows computer, there may be cases, where the same driver name is reported twice. In this case, you can get at least the yoke to work by assigning it number 0 (out of 0 and 1), by adding a line to <tt>[[$FG_ROOT]]/joystick.xml</tt> like:<br />
<syntaxhighlight lang="xml"><js n="0" include="Input/Joysticks/Saitek/ST290-Pro.xml"/></syntaxhighlight><br />
if you also have pedals (or another joystick), just add more lines, similar to:<br />
<syntaxhighlight lang="xml"><js n="1" include="Input/Joysticks/Saitek/Pro-Flight-Rudder-Pedals.xml"/></syntaxhighlight><br />
<br />
To make sure that the first input device is indeed the yoke, rotate the yoke ([[aileron]] control) and observe the Help > Joystick Information dialog. If the aileron value does not change, you have to make the yoke the preferred device first. For doing so, enter the Windows "Control panel", open "Game controllers" and select the "Advanced" button. Here you can select the yoke as the "Preferred" device. Afterwards you can check that assignment by restarting FlightGear. The yoke should now control the aileron.<br />
<br />
== Adding support for your joystick ==<br />
=== Verifying your joystick is working ===<br />
==== Linux ====<br />
Reboot your system and immediately enter on the [[command line]] <br />
<br />
<syntaxhighlight lang="bash"><br />
dmesg | grep Joystick <br />
</syntaxhighlight><br />
<br />
which pipes the boot message to grep which then prints every line in the boot message that contains the string “Joystick”. When you do this with a Saitek joystick attached, you will see a line similar to this one: <br />
<br />
<syntaxhighlight><br />
input0: USB HID v1.00 Joystick [SAITEK CYBORG 3D USB] on usb2:3.0 <br />
</syntaxhighlight><br />
<br />
This line tells us that a joystick has identified itself as SAITEK CYBORG 3D USB to the operating system. It does not tell us that the joystick driver sees your joystick. You can verify that the joystick driver sees the joystick by entering:<br />
<br />
<syntaxhighlight><br />
js_demo <br />
</syntaxhighlight><br />
<br />
If your joystick is not recognized by the driver, you may have to manually load the joystick device module with the command:<br />
<br />
<syntaxhighlight><br />
modprobe joydev<br />
</syntaxhighlight><br />
<br />
==== Windows ====<br />
Go to <tt>Start > Control Panel > Game Controller</tt> and see whether the dialog displays (and responses) on your joystick. <br />
<br />
=== Confirming that the driver recognizes your joystick ===<br />
FlightGear ships with a utility called js_demo. It will report the number of joysticks attached to a system, their respective "names" and their capabilities. Under Linux, you can run js_demo from the folder /FlightGear/bin as follows: <br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /usr/local/FlightGear/bin <br />
$ js_demo<br />
</syntaxhighlight><br />
<br />
Under Windows, open a command shell (<tt>Start > All Programs > Accessories > Command Prompt</tt>), go to the FlightGear binary folder and start the program as follows (given FlightGear is installed under <tt>C:/Program Files/Flightgear</tt>) <br />
<br />
<syntaxhighlight lang="dos"><br />
C:<br />
cd /Program Files/FlightGear/bin/win32 <br />
js_demo.exe <br />
</syntaxhighlight><br />
<br />
<!--If js_demo.exe is not included in your version, download it [http://fgfs.beggabaur.de/forum/js_demo.exe here].--><br />
<br />
On our system, the first few lines of output are (stop the program with C if it is quickly scrolling past your window!) as follows: <br />
<br />
<syntaxhighlight><br />
Joystick test program. <br />
Joystick 0: “CH PRODUCTS CH FLIGHT SIM YOKE USB ” <br />
Joystick 1: “CH PRODUCTS CH PRO PEDALS USB” <br />
Joystick 2 not detected <br />
Joystick 3 not detected <br />
Joystick 4 not detected <br />
Joystick 5 not detected <br />
Joystick 6 not detected <br />
Joystick 7 not detected <br />
+——————–JS.0———————-+——————–JS.1———————-+ <br />
| Btns Ax:0 Ax:1 Ax:2 Ax:3 Ax:4 Ax:5 Ax:6 | Btns Ax:0 Ax:1 Ax:2 | <br />
+———————————————-+———————————————-+ <br />
| 0000 +0.0 +0.0 +1.0 -1.0 -1.0 +0.0 +0.0 . | 0000 -1.0 -1.0 -1.0 . . . . . | <br />
</syntaxhighlight><br />
<br />
First note that js demo reports which number is assigned to each joystick recognized by the driver. Also, note that the “name” each joystick reports is also included between quotes. We will need the names for each bindings file when we begin writing the binding xml files for each joystick.<br />
<br />
=== Identifying the numbering of axes and buttons ===<br />
Axis and button numbers can be identified using js demo as follows. By observing the output of js demo while working your joystick axes and buttons you can determine what axis and button numbers are assigned to each joystick axis and button. It should be noted that numbering generally starts with zero. <br />
<br />
The buttons are handled internally as a binary number in which bit 0 (the least significant bit) represents button 0, bit 1 represents button 1, etc., but this number is displayed on the screen in hexadecimal notation, so: <br />
<br />
* 0001 ⇒ button 0 pressed <br />
* 0002 ⇒ button 1 pressed <br />
* 0004 ⇒ button 2 pressed <br />
* 0008 ⇒ button 3 pressed <br />
* 0010 ⇒ button 4 pressed <br />
* 0020 ⇒ button 5 pressed <br />
* 0040 ⇒ button 6 pressed <br />
* ... etcp to ... <br />
* 8000 ⇒ button 15 pressed <br />
* ... and ... <br />
* 0014 ⇒ buttons 2 and 4 pressed simultaneously <br />
* ... etc. <br />
<br />
For Linux users, there is another option for identifying the “name” and the numbers assigned to each axis and button. Most Linux distributions include a very handy program, “jstest”. With a CH Product Yoke plugged into the system, the following output lines are displayed by jstest: <br />
<br />
<syntaxhighlight lang="bash"><br />
jstest /dev/js3 <br />
Joystick (CH PRODUCTS CH FLIGHT SIM YOKE USB ) has 7 axes and 12 buttons. Driver version is 2.1.0 <br />
Testing…(interrupt to exit) <br />
Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 6: 0 Buttons: 0:off 1:off 2:off 3:on 4:off 5:off 6:off 7:off 8:off 9:off 10:off 11:off <br />
</syntaxhighlight><br />
<br />
Note the “name” between parentheses. This is the name the system associates with your joystick. <br />
<br />
When you move any control, the numbers change after the axis number corresponding to that moving control and when you depress any button, the “off” after the button number corresponding to the button pressed changes to “on”. In this way, you can quickly write down the axes numbers and button numbers for each function without messing with binary.<br />
<br />
In most modern repositories, there is a graphical version of this program, called "jstest-gtk", where you are given a list of attached devices to choose from, and then get a graphical representation of all axes and buttons.<br />
<br />
=== Calibration ===<br />
For many/most joysticks this step might not be necessary. If either, the centre position of the joystick does not yield near-zero values for relevant axes, or if the maximum value for an axis cannot be reached, or is reached too early, you need to calibrate the joystick. (Note that some calibration problems can be fixed with the flighgear joystick configuration files, but not all, e.g. if the maximum value is reached too early)<br />
<br />
==== Linux ====<br />
The program "jscal" (install from repositories if not already available on your system) provides a calibration routine for joysticks. You need to know or find out the device name of your joystick (usually /dev/js0 or /dev/input/js0 - instead of 0 a different number might need to be used, look at output of js_demo to figure out which). For example to calibrate the joystick with device name /dev/input/js0, execute<br />
<syntaxhighlight lang="bash">jscal -c /dev/input/js0<br />
</syntaxhighlight><br />
and follow instructions.<br />
The calibration is retained until the joystick is unplugged, or the computer rebooted. In order to save it for future use, execute <br />
<syntaxhighlight lang="bash">jscal -p /dev/input/js0<br />
</syntaxhighlight><br />
which will print the command that needs to be entered to restore the calibration, for example<br />
<syntaxhighlight lang="bash">jscal -s 6,1,0,8171,8171,65936,65374,1,0,8166,8166,65928,65494,1,0,128,128,4194176,4227201,1,0,128,128,4194176,4227201,1,0,0,0,536854528,536854528,1,0,0,0,536854528,536854528 /dev/input/js0<br />
</syntaxhighlight><br />
Copy the command you obtained into your startup script in order to restore calibration automatically.<br />
<br />
Recent versions of jscal have this simplified, you can store and restore your calibration settings.<br />
After calibration store the settings:<br />
<syntaxhighlight lang="bash">jscal-store /dev/input/js0<br />
</syntaxhighlight><br />
<br />
Then in your startup script recall the settings for the given device:<br />
<syntaxhighlight lang="bash">jscal-restore /dev/input/js0<br />
</syntaxhighlight><br />
<br />
However if you have multiple controllers connected, they might be renumbered on pluging/repluging. Best way to insure you get the correct calibration is to create a custom '''udev''' rule-set that you put into /etc/udev/rules.d/00-joystick.rules, similar to the following example:<br />
<syntaxhighlight lang="bash"><br />
#joystick rules to make the names persistent and reload the stored calibration profile<br />
ACTION!="add|change", GOTO="joystick_end"<br />
SUBSYSTEM!="input", GOTO="joystick_end"<br />
<br />
KERNEL=="js*", ATTRS{idProduct}=="a02f", ATTRS{idVendor}=="12bd", SYMLINK+="input/joystick" RUN+="/etc/udev/scripts/joycal.sh"<br />
KERNEL=="js*", ATTRS{name}=="Logitech Logitech Racing Wheel", SYMLINK+="input/logiwheel" RUN+="/etc/udev/scripts/wheelcal.sh"<br />
<br />
LABEL="joystick_end"<br />
</syntaxhighlight><br />
<br />
Then the scripts called would be as follows:<br />
*/etc/udev/scripts/joycal.sh:<br />
<syntaxhighlight lang="bash"><br />
#!/bin/sh<br />
jscal-restore /dev/input/joystick<br />
</syntaxhighlight><br />
*/etc/udev/scripts/wheelcal.sh<br />
<syntaxhighlight lang="bash"><br />
#!/bin/sh<br />
jscal-restore /dev/input/logiwheel<br />
</syntaxhighlight><br />
<br />
Now each time you plug/replug your joysticks/controllers they will get the persistent device names, and will get the correct calibration profile restored.<br />
<br />
<br />
The calibration is even more comfortable using the program "jstest-gtk", also available from most repositories. Starting this you are given a list of all attached joysticks with their device names. Pick the one you wish to inspect or calibrate and click 'Properties', then calibrate. This calibration tool offers the possibility to fine-tune the calibration by editing the numbers. The program manipulates the same internals as jscal so you can use jscal to save the calibration information for later use, as before.<br />
<br />
=== Writing or editing joystick binding xml files ===<br />
At this point, you have confirmed that the operating system and the joystick driver both recognize your joystick(s). You also know of several ways to identify the joystick “name” your joystick reports to the driver and operating system. You will need a written list of what control functions you wish to have assigned to which axis and button and the corresponding numbers. <br />
<br />
Make the following table from what you learned from js demo or jstest above (pencil and paper is fine). Here we assume there are 5 axes including 2 axes associated with the hat. <br />
<br />
{| class="prettytable"<br />
! align="center" bgcolor="#EFEFEF" | Axis<br />
! align="center" bgcolor="#EFEFEF" | Button<br />
|- <br />
|elevator = 0 <br />
|view cycle = 0 <br />
|- <br />
|rudder = 1 <br />
|all brakes = 1 <br />
|- <br />
|aileron = 2 <br />
|up trim = 2 <br />
|- <br />
|throttle = 3 <br />
|down trim = 3 <br />
|-<br />
|leftright hat = 4 <br />
|extend flaps = 4 <br />
|- <br />
|foreaft hat = 5 <br />
|retract flaps = 5 <br />
|-<br />
| <br />
|decrease RPM = 6 <br />
|-<br />
|<br />
|increase RPM = 7 <br />
|}<br />
<br />
We will assume that our hypothetical joystick supplies the “name” QUICK STICK 3D USB to the system and driver. With all the examples included with FlightGear, the easiest way to get a so far unsupported joystick to be auto detected, is to edit an existing binding xml file. Look at the xml files in the sub-folders of '''/FlightGear/Input/Joysticks/'''. After evaluating several of the xml binding files supplied with FlightGear, we decide to edit the file <tt>[[$FG_ROOT]]/Input/Joysticks/Saitek/Cyborg-Gold-3d-USB.xml</tt>.<br />
<br />
This file has all the axes functions above assigned to axes and all the button functions above assigned to buttons. This makes our editing almost trivial. <br />
<br />
Before we begin to edit, we need to choose a name for our bindings xml file, create the folder for the QS joysticks, and copy the original xml file into this directory with this name. <br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /usr/local/FlightGear/Input/Joysticks <br />
$ mkdir QS <br />
$ cd QS <br />
$ cp /usr/local/FlightGear/Input/Joysticks/Saitek/ <br />
Cyborg-Gold-3d-USB.xml QuickStick.xml <br />
</syntaxhighlight><br />
<br />
Here, we obviously have supposed a Linux/UNIX system with FlightGear being installed under '''/usr/local/FlightGear'''. For a similar procedure under Windows with FlightGear being installed under C:/Program Files/FlightGear, open a command shell and type <br />
<br />
<syntaxhighlight lang="dos"><br />
C: <br />
cd /Program Files/FlightGear/Input/Joysticks <br />
mkdir QS <br />
cd QS <br />
copy /FlightGear/Input/Joysticks/Saitek/ <br />
Cyborg-Gold-3d-USB.xml QuickStick.xml <br />
</syntaxhighlight><br />
<br />
Next, open QuickStick.xml with your favorite editor. Before we forget to change the joystick name, search for the line containing <name>. You should find the line <br />
<br />
<syntaxhighlight lang="xml"><name>SAITEK CYBORG 3D USB</name></syntaxhighlight><br />
<br />
and change it to <br />
<br />
<syntaxhighlight lang="xml"><name>QUICK STICK 3D USB</name></syntaxhighlight><br />
<br />
This line illustrates a key feature of xml statements. They begin with a <tag> and end with a </tag>. <br />
<br />
You can now compare your table to the comment table at the top of your file copy. Note that the comments tell us that the Saitek elevator was assigned to axis 1. Search for the string <br />
<br />
<syntaxhighlight lang="xml"><axis n="1"></syntaxhighlight><br />
<br />
and change this to <br />
<br />
<syntaxhighlight lang="xml"><axis n="0"></syntaxhighlight><br />
<br />
Next, note that the Saitek rudder was assigned to axis 2. Search for the string <br />
<br />
<syntaxhighlight lang="xml"><axis n="2"></syntaxhighlight><br />
<br />
and change this to <br />
<br />
<syntaxhighlight lang="xml"><axis n="1"></syntaxhighlight><br />
<br />
Continue comparing your table with the comment table for the Saitek and changing the axis numbers and button numbers accordingly. Since QUICKSTICK USB and the Saitek have the same number of axes but different number of buttons, you must delete the buttons left over. Just remember to double check that you have a closing tag for each opening tag or you will get an error using the file. <br />
<br />
Finally, be good to yourself (and others when you submit your new binding file to a FlightGear developers or users archive!), take the time to change the comment table in the edited file to match your changed axis and button assignments. The new comments should match the table you made from the js demo output. Save your edits. <br />
<br />
Several users have reported that the numbers of axes and buttons assigned to functions may be different with the same joystick under Windows and Linux. The above procedure should allow one to easily change a binding xml file created for a different operating system for use by their operating system.<br />
<br />
You can tell how FlightGear has interpretted your joystick setup by selecting <tt>Help > Joystick Information</tt> from the menu.<br />
<br />
== Joystick support via .fgfsrc entries ==<br />
Fortunately, there is a tool available now, which takes most of the burden from the average user who, maybe, is not that experienced with XML, the language which these files are written in. <br />
<br />
For configuring your joystick using this approach, open a command shell (command prompt under windows, to be found under Start|All programs|Accessories). Change to the directory <tt>[[$FG_ROOT]]/bin</tt> via e.g. (modify to your path) <br />
<br />
<syntaxhighlight lang="dos">cd C:/Program Files/FlightGear/bin</syntaxhighlight><br />
<br />
and invoke the tool fgjs via <br />
<br />
<syntaxhighlight lang="bash">./fgjs --fg-root=$FG_ROOT</syntaxhighlight><br />
<br />
on a UNIX/Linux machine, or via <br />
<br />
<syntaxhighlight lang="dos">fgjs --fg-root=$FG_ROOT</syntaxhighlight><br />
<br />
on a Windows machine. The program will tell you which joysticks, if any, were detected. Now follow the commands given on screen, i.eṁove the axis and press the buttons as required. Be careful, a minor touch already “counts” as a movement. Check the reports on screen. If you feel something went wrong, just re-start the program. <br />
<br />
After you are done with all the axis and switches, the directory above will hold a file called fgfsrc.js. If the FlightGear base directory FlightGear does not already contain an options file .fgfsrc (under UNIX)/system.fgfsrc (under Windows) mentioned above, just copy <br />
<br />
'''fgfsrc.js''' into '''.fgfsrc''' (UNIX)/'''system.fgfsrc''' (Windows) <br />
<br />
and place it into the directory FlightGear base directory FlightGear. In case you already wrote an options file, just open it as well as fgfsrc.js with an editor and copy the entries from fgfsrc.js into .fgfsrc/system.fgfsrc. One hint: The output of fgjs is UNIX formatted. As a result, Windows Editor may not display it the proper way. I suggest getting an editor being able to handle UNIX files as well. My favorite freeware file editor for that purpose, although somewhat dated, is still PFE, to be obtained from http://www.lancs.ac.uk/people/cpaap/pfe/. <br />
<br />
The the axis/button assignment of fgjs should, at least, get the axis assignments right, its output may need some tweaking. There may be axes moving the opposite way they should, the dead zones may be too small etc. For instance, I had to change <br />
<br />
<syntaxhighlight><br />
--prop:/input/joysticks/js[1]/axis[1]/binding/factor=-1.0<br />
</syntaxhighlight><br />
<br />
into <br />
<br />
<syntaxhighlight><br />
--prop:/input/joysticks/js[1]/axis[1]/binding/factor=1.0<br />
</syntaxhighlight><br />
<br />
(USB CH Flightsim Yoke under Windows XP). Thus, here is a short introduction into the assignments of joystick properties. <br />
<br />
Basically, all axes settings are specified via lines having the following structure: <br />
<br />
<syntaxhighlight><br />
--prop:/input/joysticks/js[n]/axis[m]/binding/command=property-scale <br />
--prop:/input/joysticks/js[n]/axis[m]/binding/property=/controls/steering option<br />
--prop:/input/joysticks/js[n]/axis[m]/binding/dead-band=db<br />
--prop:/input/joysticks/js[n]/axis[m]/binding/offset=os<br />
--prop:/input/joysticks/js[n]/axis[m]/binding/factor=fa<br />
</syntaxhighlight><br />
<br />
where <br />
<br />
{| class="prettytable"<br />
! align="center" bgcolor="#EFEFEF" | <br />
! align="center" bgcolor="#EFEFEF" | <br />
|- <br />
|n<br />
|number of device (usually starting with 0) <br />
|-<br />
|m<br />
|number of axis (usually starting with 0)<br />
|-<br />
|steering option<br />
|elevator, aileron, rudder, throttle, mixture, pitch <br />
|-<br />
|dead-band<br />
|range, within which signals are discarded; useful to avoid jittering for minor yoke movements<br />
|-<br />
|offset<br />
|specifies, if device not centered in its neutral position <br />
|-<br />
|factor<br />
|controls sensitivity of that axis; defaults to +1, with a value of -1 reversing the behavior <br />
|}<br />
<br />
You should be able to at least get your joystick working along these lines. Concerning all the finer points, for instance, getting the joystick buttons working, John Check has written a very useful README being included in the base package to be found under '''FlightGear/Docs/Readme/Joystick.html'''. In case of any trouble with your input device, it is highly recommended to have a look into this document.<br />
<br />
== More about programming joystick XML files ==<br />
=== General tips ===<br />
* When testing a new xml file it is best to start FlightGear via a command window (rather than the GUI interface). Any error messages will then be displayed in the terminal. Error messages will give both a message and a line number, helping you pinpoint any errors.<br />
* Errors can be detected on initial startup or at runtime. Both types of errors will be displayed in the terminal.<br />
* One of the most common errors is including a character that makes XML choke. Such characters include<br>& < --<br>These characters will cause problems even if simply included in comments or within scripts.<br />
* If your scripts contain any of these characters, you have to enclose the scripts in <script><![CDATA[...]]></script>. Alternatively, you can 'escape' the characters, ie "<" becomes "&amp;lt;".<br />
* You can reload your edited joystick file without restarting FlightGear by selecting "Debug" &gt; "Reload Input" from the main simulator window.<br />
* You can find many examples of different ways to program joysticks simply by examining the joystick xml files that are packaged with FlightGear. See the directory FlightGear/data/input/joysticks<br />
* Many advanced functions can be programmed using the Nasal scripting language. These scripts are enclosed in <script></script> tags in the XML file. Helpful:<br />
** A guide to the [[Nasal scripting language]] in FlightGear <br />
** [[Nasal FAQ]]<br />
** [[Howto: Write simple scripts in Nasal]]<br />
* You can explore the internal property tree to see many variables that can be altered using joystick buttons or axes (File/Browse Internal Properties)<br />
* You can test bits of Nasal code and do some other useful things using the Nasal Console (Debug/Nasal Console).<br />
* All Nasal code shares a common namespace, so it's possible to set a variable in one nasal binding, and to read it in another.<br />
<br />
=== Useful hints for scripts ===<br />
Some particularly useful ideas for programming scripts within joystick XML files:<br />
* getprop and setprop can be used for getting & setting properties from the internal properties tree:<br />
<syntaxhighlight lang="nasal"><br />
var brake = !getprop("/controls/gear/brake-parking");<br />
setprop("/controls/gear/brake-parking", brake);<br />
</syntaxhighlight><br />
* You can also make your own values on the property tree:<br />
<syntaxhighlight lang="nasal"><br />
setprop("/input/joysticks/js[0]/myjoystick-modifier", 1);<br />
var mod = getprop("/input/joysticks/js[0]/myjoystick-modifier");<br />
</syntaxhighlight><br />
* You can print to terminal using the print function. This is very useful for debugging.<br />
<syntaxhighlight lang="nasal"><br />
print("Just", " a ", "test");<br />
</syntaxhighlight><br />
* You can display info in FlightGear via a popup. This is useful for giving the user feedback about changes that may not be obvious via the panel. It can also be useful for debugging. Example:<br />
<br />
<syntaxhighlight lang="nasal"><br />
gui.popupTip("Parking Brake ON");<br />
</syntaxhighlight><br />
<br />
Arguments for gui.popupTip must be strings, so if you want to display other types of variables they should be formatted with something like sprintf:<br />
<br />
<syntaxhighlight lang="nasal"><br />
gui.popupTip(sprintf("Elevator trim: %d", 100 * getprop("/controls/flight/elevator-trim")));<br />
</syntaxhighlight><br />
<br />
Or<br />
<br />
<syntaxhighlight lang="nasal"><br />
thv = getprop("/controls/engines/engine[0]/mixture");<br />
gui.popupTip("Thrust vector " ~ int(thv * 120 - 20));<br />
</syntaxhighlight><br />
<br />
* You can just start using variables, ie,<br />
<syntaxhighlight lang="nasal"><br />
x = 10;<br />
</syntaxhighlight><br />
<br />
But [http://wiki.flightgear.org/index.php/Nasal_scripting_language#Variables for various reasons] it is generally better to declare variables with the "var" statement:<br />
<syntaxhighlight lang="nasal"><br />
var x = 10;<br />
</syntaxhighlight><br />
<br />
Note that "var" creates variables that are local in scope, but since all bindings for a joystick share the same scope, it will be seen across each script in the joystick file.<br />
<br />
* You can include a section of script that runs on startup to initialize variables, create functions, etc. Example:<br />
<syntaxhighlight lang="xml"><br />
<PropertyList><br />
<name type="string">My joystick name</name><br />
<name type="string">My joystick name #2</name><br />
<nasal><br />
<script><br />
#initialize variables<br />
f1 = f2 = 0;<br />
left_brake = right_brake = 0;<br />
# create a function to be used with all buttons<br />
getmod = func { getprop("/input/joysticks/js[0]/t-flight-hotas-x-modifier" ) }<br />
</script><br />
</nasal><br />
</syntaxhighlight><br />
<br />
* Sample code for firing weapons with the joystick is found on the [[Gun Effects]] page.<br />
<br />
== Related content ==<br />
{{Forum|24|Hardware}}<br />
* [[Troubleshooting input devices]]<br />
* [[Force feedback]]<br />
* [[Writing Joystick Code: Part 1]]<br />
* [[Joystick xml library]] <br />
<br />
=== External links ===<br />
* [http://www.flightgear.org/Docs/getstart/getstartch3.html#x8-360003.6 The FlightGear Manual]<br />
* [http://sourceforge.net/projects/hapticsforfg/ Force Feedback]<br />
<br />
[[Category:Hardware]]<br />
<br />
[[de:Joystick]]<br />
[[es:Joystick]]</div>Wonkohttps://wiki.flightgear.org/w/index.php?title=Writing_Joystick_Code:_Part_2&diff=76789Writing Joystick Code: Part 22014-09-28T09:51:55Z<p>Wonko: Add link joystick xml library page</p>
<hr />
<div>{{JoystickScripting Navigation}}<br />
<br />
== Code snippets ==<br />
<br />
Make sure you have read [[Input device]] and [[Writing Joystick Code: Part 1]] first.<br />
<br />
<br />
Code snippets are what you use instead of ''Your code goes here'' and ''Ctrl-Alt button released'' as seen in Part 1.<br />
You just need to put them in the right place - in between the <script> and </script> tags.<br />
<br />
<br />
'''Please note that some of them have concepts that will be explained in Part 3.'''<br />
<br />
<br />
Each snippet has the following format:<br />
Action R/NR S C<br />
Code for action<br />
U<br />
Code for <mod-up><br />
<br />
Where Action is what you want to do, R means use with a repeatable button, NR means use with a non-repeatable button,<br />
and U is the code for <mod-up>. If it is not there, a <mod-up> is not needed.<br />
<br />
An S, if present, means that it is a step action. gearDown is not a step-action, the gear is either up or down. flapsDown is a step action. Each time you send a flapsDown command the flaps go down one notch. This matters not if you are using a non-repeatable button, but if you use a repeating button, as long as you are pressing the button, flapsDown commands are being sent. This means that if you are still pressing the button when the flaps reach the next notch, they will go down one more notch.<br />
<br />
The C, if present, means that whatever is being controlled is continously variable between its limits. An example is elevator trim. It moves between full-down to full-up in very tiny steps. Very tiny.<br />
<br />
Some Actions will have code for use with repeatable and non-repeatable buttons. Sometimes it is not wise to use the wrong type for a certain action. And sometimes you must use the correct type for an action - using a non-repeating button for Zoom is a bad idea, the user will have to constantly keep triggering the button to reach the zoom level he requires. Using a repeatable button is possible for something like gearDown, as long as the use knows to just use a brief push, but it is a bad idea.<br />
<br />
Notice that some commands have a +1 or a -1 in brackets to specify the direction of the action, and a 0 to say stop doing that. The 0 version will of course be in the <mod-ip> section.<br />
<br />
If the action is upside-down for you, swap the + and - signs.<br />
<br />
Also, sometimes the 1 is replaced by a number, which specifies by how much the action should be carried out. This is of course not approprite for all actions - you would not want to lower the gear just 75% of the way.<br />
If the action is too vicious for you, make the number smaller.<br />
<br />
=== The snippets ===<br />
-----------------------------------------------------------------------------<br />
Gear down NR<br />
controls.gearDown(1)<br />
<br />
Gear up NR<br />
controls.gearDown(-1)<br />
-----------------------------------------------------------------------------<br />
Flaps down one notch NR S<br />
controls.flapsDown(1)<br />
<br />
Flaps up one notch NR S<br />
controls.flapsDown(-1)<br />
-----------------------------------------------------------------------------<br />
Deploy spoilers NR S<br />
controls.stepSpoilers(1)<br />
<br />
Retract spoilers NR S<br />
controls.stepSpoilers(-1)<br />
-----------------------------------------------------------------------------<br />
Cycle View NR<br />
view.stepView(1)<br />
-----------------------------------------------------------------------------<br />
Elevator trim down R C<br />
controls.elevatorTrim(0.75)<br />
<br />
Elevator trim up R C<br />
controls.elevatorTrim(-0.75)<br />
-----------------------------------------------------------------------------<br />
Elevator Trim down NR C<br />
interpolate("/controls/flight/elevator-trim", 1, 30 * (1 - getprop("controls/flight/elevator-trim")))<br />
U<br />
interpolate("/controls/flight/elevator-trim", getprop("controls/flight/elevator-trim"), 0)<br />
<br />
Elevator trim up NR C<br />
interpolate("/controls/flight/elevator-trim", -1, 30 * (1 - getprop("controls/flight/elevator-trim")))<br />
U<br />
interpolate("/controls/flight/elevator-trim", getprop("controls/flight/elevator-trim"), 0)<br />
<br />
To make it go faster, make the 30 smaller.<br />
-----------------------------------------------------------------------------<br />
Aileron trim left R C<br />
controls.aileronTrim(-0.75)<br />
<br />
Aileron trim right R C<br />
controls.aileronTrim(0.75)<br />
-----------------------------------------------------------------------------<br />
Aileron trim left NR C<br />
interpolate("/controls/flight/aileron-trim", -1, 30 * (1 - getprop("controls/flight/aileron-trim")))<br />
U<br />
interpolate("/controls/flight/aileron-trim", getprop("controls/flight/aileron-trim"), 0)<br />
<br />
Aileron trim right NR C<br />
interpolate("/controls/flight/aileron-trim", 1, 30 * (1 - getprop("controls/flight/aileron-trim")))<br />
U<br />
interpolate("/controls/flight/aileron-trim", getprop("controls/flight/aileron-trim"), 0)<br />
<br />
To make it go faster, make the 30 smaller.<br />
-----------------------------------------------------------------------------<br />
If you want rudder-trim, use either the repeatable or non-repeatable above, changing elevator-trim/aileron-trim to rudder-trim.<br />
-----------------------------------------------------------------------------<br />
Apply left brake NR<br />
controls.applyBrakes(1, -1)<br />
U<br />
controls.applyBrakes(0, -1)<br />
<br />
Apply Right brake NR<br />
controls.applyBrakes(1, 1)<br />
U<br />
controls.applyBrakes(0, 1)<br />
-----------------------------------------------------------------------------<br />
Start Stopwatch NR<br />
globals["__dlg:stopwatch-dialog"].start()<br />
<br />
Stop Stopwatch NR<br />
globals["__dlg:stopwatch-dialog"].stop()<br />
<br />
Reset Stopwatch NR<br />
globals["__dlg:stopwatch-dialog"].reset()<br />
-----------------------------------------------------------------------------<br />
Make mixture richer R C<br />
controls.adjMixture(0.05)<br />
<br />
Make mixture leaner R C<br />
controls.adjMixture(-0.05)<br />
-----------------------------------------------------------------------------<br />
Start all engines R<br />
controls.startEngine(1)<br />
U<br />
controls.startEngine(0)<br />
<br />
Start specific engine R<br />
controls.startEngine(1, x)<br />
U<br />
controls.startEngine(0, x)<br />
<br />
x is the engine number. First engine is 0.<br />
-----------------------------------------------------------------------------<br />
Wingsweep<br />
<br />
How this is implemented in each aircraft depends on the design of the aircraft. If it has predefined wingsweep settings it will step through these settings.<br />
If not, it will step 20% of the way each time called.<br />
<br />
Wingsweep forward NR<br />
controls.wingSweep(1)<br />
<br />
Wingsweep backwards NR<br />
controls.wingSweep(-1)<br />
<br />
It is possible (but desirable?) to use any value from 1 to 5 in the brackets. This will make the wings sweep more steps at a time.<br />
-----------------------------------------------------------------------------<br />
Weapons<br />
<br />
Fire selected weapon NR<br />
controls.trigger(1)<br />
U<br />
controls.trigger(0)<br />
<br />
Select previous weapon NR<br />
controls.weaponSelect(-1)<br />
<br />
Select next weapon NR<br />
controls.weaponSelect(-1)<br />
-----------------------------------------------------------------------------<br />
Toggle all lights on/off NR<br />
controls.toggleLights()<br />
<br />
Switch specific lights on NR<br />
setProp(("controls/lighting/xxx"), true)<br />
<br />
Switch specific lights off NR<br />
setProp(("controls/lighting/xxx"), false)<br />
<br />
Where xxx = beacon, landing-lights, landing-light, landing-light[1] logo-lights, nav-lights, strobe, taxi-light,<br />
taxi-lights, cabin-lights, map-lights. <br />
-----------------------------------------------------------------------------<br />
Instrument lights level brighter R<br />
<![CDATA[ <br />
if(getprop("controls/lighting/instruments-norm") < 1 ) {<br />
setprop("controls/lighting/instruments-norm", getprop ("controls/lighting/instruments-norm") + 0.05)<br />
}<br />
]]><br />
<br />
Instrument lights level dimmer R<br />
<![CDATA[ <br />
if(getprop("controls/lighting/instruments-norm") > 0 ) {<br />
setprop("controls/lighting/instruments-norm", getprop ("controls/lighting/instruments-norm") - 0.05)<br />
}<br />
]]><br />
<br />
Instrument lights level up NR<br />
<![CDATA[ <br />
if(getprop("controls/lighting/instruments-norm") < 1 ) {<br />
setprop("controls/lighting/instruments-norm", getprop ("controls/lighting/instruments-norm") + 0.2)<br />
}<br />
]]><br />
<br />
Instrument lights level down NR<br />
<![CDATA[ <br />
if(getprop("controls/lighting/instruments-norm") > 0 ) {<br />
setprop("controls/lighting/instruments-norm", getprop ("controls/lighting/instruments-norm") - 0.2)<br />
}<br />
]]><br />
-----------------------------------------------------------------------------<br />
Step magnetos up NR<br />
controls.stepMagnetos(1)<br />
<br />
Step magnetos down NR<br />
controls.stepMagnetos(-1)<br />
-----------------------------------------------------------------------------<br />
<br />
<br />
While editing an xml file, if you find a line is too long for your page width, then you can press Enter and go to a new line.<br />
FG will be happy - it needs a tag or a ; at the end of a line to tell it that the current line of code is finished.<br />
setprop("controls/engines/engine/mixture", getprop ("controls/engines/engine/mixture") + 0.05)<br />
becomes<br />
setprop("controls/engines/engine/mixture",<br />
getprop ("controls/engines/engine/mixture") + 0.05)<br />
Notice where I put the newline and how I indented the second line. Both are designed to make it easy for people to read,<br />
as part of being a programmer is making your code legible for others.<br />
<br />
<br />
<br />
-----------------------------------------------------------------------------<br />
<br />
<br />
Any complaints/suggestions/questions/kudos can be posted [http://forum.flightgear.org/viewtopic.php?f=24&t=17892 here].<br />
<br />
== Related content ==<br />
* [[Joystick xml library]] <br />
<br />
[[Category:Hardware]]</div>Wonkohttps://wiki.flightgear.org/w/index.php?title=Joystick_xml_library&diff=76788Joystick xml library2014-09-28T09:47:26Z<p>Wonko: </p>
<hr />
<div>This is a master page linking to pages containing joystick xml codes for various specialised functions. Note that there is an equivalent forum topic with the same aim (see Related content) as well as a dropbox page extracted from the forum. However, the wiki offers the potential to organise the codes in a hierarchical manner, and improvements can be made in a collective manner not possible as a forum topic. You are well advised to check out both.<br />
<br />
* [[Joystick Autopilot Bindings]] Control the Bendix/KAP140 and the CENTURYIII autopilots with the joystick <br />
<br />
NB: If you want to introduce more code, make a new wiki page and link rather than pasting code directly in this page.<br />
<br />
== Related content ==<br />
* [http://forum.flightgear.org/viewtopic.php?f=24&t=12363 Joystick xml codes Library project] Forum topic with a similar objective<br />
* [https://dl.dropboxusercontent.com/u/11151437/STICK%20XML%20LIBRARY/INDEX.html Dropbox library] Collection of short snippets for particular tasks, complete configuration files for particular joysticks, and various general aviation related links</div>Wonkohttps://wiki.flightgear.org/w/index.php?title=Joystick_xml_library&diff=76782Joystick xml library2014-09-28T08:35:35Z<p>Wonko: </p>
<hr />
<div>This is a master page linking to pages containing joystick xml codes for various specialised functions. Note that there is an equivalent forum topic with the same aim (see Related content) as well as a dropbox page extracted from the forum. However, the wiki offers the potential to organise the codes in a hierarchical manner, and improvements can be made in a collective manner not possible as a forum topic. You are well advised to check out both.<br />
<br />
* [[Joystick Autopilot Bindings]] Control the Bendix/KAP140 and the CENTURYIII autopilots with the joystick <br />
<br />
NB: If you want to introduce more code, make a new wiki page and link rather than pasting code directly in this page.<br />
<br />
== Related content ==<br />
* [http://forum.flightgear.org/viewtopic.php?f=24&t=12363 Joystick xml codes Library project] Forum topic with the same aim<br />
* [https://dl.dropboxusercontent.com/u/11151437/STICK%20XML%20LIBRARY/INDEX.html Dropbox library] Collection of short snippets for particular tasks, complete configuration files for particular joysticks, and various general aviation related links</div>Wonkohttps://wiki.flightgear.org/w/index.php?title=Joystick_xml_library&diff=76781Joystick xml library2014-09-28T08:29:47Z<p>Wonko: Introducing a page for linking to joystick xml codes</p>
<hr />
<div>This is a master page linking to pages containing joystick xml codes for various specialised functions. Note that there is an equivalent forum topic with the same aim (see Related content) as well as a dropbox page extracted from the forum. However, the wiki offers the potential to organise the codes in a hierarchical manner, and improvements can be made in a collective manner not possible as a forum topic. You are well advised to check out both.<br />
<br />
* [[Joystick Autopilot Bindings]] Control the Bendix/KAP140 and the CENTURYIII autopilots with the joystick <br />
<br />
NB: If you want to introduce more code, make a new wiki page and link rather than pasting code directly in this page.<br />
<br />
== Related content ==<br />
* [http://forum.flightgear.org/viewtopic.php?f=24&t=12363 Joystick xml codes Library project]<br />
* [https://dl.dropboxusercontent.com/u/11151437/STICK%20XML%20LIBRARY/INDEX.html Dropbox library] Collection of short snippets for particular tasks, complete configuration files for particular joysticks, and various general aviation related links</div>Wonkohttps://wiki.flightgear.org/w/index.php?title=Howto:Seneca_II&diff=76777Howto:Seneca II2014-09-27T21:51:07Z<p>Wonko: Add link to autopilot joystick bindings page</p>
<hr />
<div>These are basic instructions about how to fly the Seneca II in FlightGear.<br />
They should help you finding and operating all controls in the cockpit you need for a flight.<br />
You will also learn some basic maneuvers and procedures. They are based on real world flying procedures and should match reality quite close.<br />
But do not use this HOWTO as a guide for real-life flying. There are still some differences between reality and virtuality (e.g. there are no keys like {{key press|P}} and {{key press|ESC}} in real aircraft).<br />
<br />
To follow this HOWTO, you need<br />
* A running version of FlightGear<br />
* The Seneca II aircraft from the [http://www.flightgear.org/Downloads/aircraft-2.0.0/ FlightGear Aircraft download page] installed<br />
* The [[Seneca II Checklist]]<br />
* The [[Seneca II Panel Reference]]<br />
* For the IFR part some IFR charts [http://www.airnav.com/airport/KSFO e.g. from AirNav]<br />
* Some spare time: 1 hour for the VFR part, 2 hours for the complete session<br />
The reference screenshots may help, if you are not familiar with the location of the controls:<br />
[[File:Seneca_II_reference_left.jpg|thumb|left|Pilot's Panel]]<br />
[[File:Seneca_II_reference_right.jpg|thumb|left|Co-Pilot's Panel]]<br />
[[File:Seneca_II_reference_fuel_trim.jpg|thumb|left|Fuel-Trim Console]]<br />
<br clear="all"><br />
<br />
= Basics - VFR =<br />
[[File:Seneca_II_HOWTO_before_start_engine.jpg|thumb|Cockpit before start engine]]<br />
To keep the beginning simple, let's start on a nice sunny day in San Francisco Intl - KSFO, FlightGear's default airport.<br />
Start your FlightGear with<br />
<br />
''fgfs --aircraft=SenecaII''<br />
<br />
You will be placed on KSFO runway 28R with a dead aircraft blocking the runway.<br />
In reality, you should never sit in this position without being ready for an immediate takeoff - but in our sim everything is fine here. Grab your checklist and go through the '''''Cockpit Check''''' and '''''Before Start Engine''''' lists. Your panel should look similiar to the picture on the right.<br />
<br clear="all"><br />
<br />
== Startup, Takeoff, Straight and Level ==<br />
[[File:SenecaII_HOWTO_before_takeoff.jpg|thumb|Before takeoff]]<br />
First of all, we have to start the engines. Once again, the checklist will help us doing the right things in the correct order.<br />
The operation of the primer is not needed in the simulation, so you can safely skip the operation of the primer here, since the engines will fire regardless of priming or not. After ignition, you have to open the throttles to let the engines run at more than 1000RPM for a short time to keep them alive.<br />
Go through the '''''After Start Engine Check'''''. The '''''Taxi Check''''' is somewhat void here, since we will not taxi. Leave the flaps up - they are not needed on this long runway. The default trim position will work fine for takeoff.<br />
When the engines are running, it's time to do the nav setup. We do a straight out departure without navaids, so just twist the heading bug to the runway heading of 280. The center dot of the attitude indicator should align with the horizon line.<br />
The '''''Before Takeoff Check''''' will make you set the fuel selectors to on. The clearance for our little training session is:<br />
'Climb on runway heading to 2000ft. Maintain 2000ft until further advice.'<br />
That will also serve as a departure briefing.<br />
And in case of emergency: hit the {{key press|ESC}} key and restart FlightGear.<br />
<br />
[[File:SenecaII_HOWTO_after_takeoff.jpg|thumb|After takeoff]]<br />
<br />
'''D-GEAR: cleared for takeoff runway 28R'''<br />
<br />
When cleared for takeoff, advance the throttle slowly to apply 40" of manifold pressure. In reality you should only advance to 39" of manifold pressure, the remaining inch will build up on the run due to ramair. A warning light in the annunciator panel will illuminate if you exceed 40". Reduce throttle on the corresponding engine in that case to avoid engine damage.<br />
When MP is stabilized, release the parking brake ({{key press|Shift}}+{{key press|B}}) for the takeoff-run. Maintain the centerline and observe the airspeed indicator passing the red line (minimum control speed air) and rotate at 70knots by pulling the yoke (or joystick) a little back. When airborne, accelerate past the blue line (best rate of climb single engine) to 95knots. When the runway is not sufficient for landing anymore, retract the gear and turn off the landing lights.At 500ft above the field reduce the power to 31" manifold pressure and 2500 RPM.Accelerate to 100knots climb speed for a better engine cooling. When your workload permitts, read the '''''After Takeoff Check'''''.<br />
[[File:SenecaII_HOWTO_level_at_2000.jpg|thumb|Level at 2000ft]]<br />
When reaching the target altitude of 2000ft, lower the nose and let the aircraft accelerate for some seconds. Adjust your pitch slowly so the vertical speed indicator shows 0fpm. Reduce the power to 28"/2400RPM. Lean the mixture a little to save some virtual fuel and get best cruise performance. Closing the cowl-flaps (use the 'Seneca' Menuitem) will give you approx. 10knots of additional airspeed.<br />
You should be now on a straight and level flight at 2000ft at some 130 knots. If you want, go to the next section or hit the {{key press|P}} key to pause and have a coffee.<br />
<br clear="all"><br />
<br />
== Airwork, Turns, Climbs and Descends ==<br />
OK - Now let's have some fun and leave the boring straight and level thing and go for some airwork. We skip the usual clearing turn here, because we don't care about any other virtual aircraft around us. <br />
<br />
=== Climbs and Descends ===<br />
'''D-GEAR on course climb altitude 4000ft, maintain for 1 minute, thereafter descend altitude 3000ft'''<br />
<br />
To climb, the aircraft needs more power and less speed. That means the engines need better cooling, so first thing to do is open the cowl flaps. Climb power will be at 75% max power. The according power setting is 32" manifold pressure and 2500RPM. When increasing power, always increase RPM first before increasing manifold pressure. Increase pitch (pull yoke backwards) to some 5 degrees and slow down to 100 knots indicated.<br />
When reaching the target altitude, level off exactly like you did after takeoff. Reduce power to 28"/2400RPM and close the cowl flaps.<br />
<br />
After one minute start the descent. Reduce power to 21" and 2300RPM. Reduce manifold pressure before decreasing RPM. Leave the cowl flaps closed to keep the engines warm. Pitch down 3-4 degrees to maintain a rate of descent of 500-1000 feet per minute.<br />
<br />
Never descent with an idle engine to avoid shock-cooling and severe engine damage.<br />
<br />
When reaching the target altitude of 3000ft, reset power to 28"/2400RPM (remember: increase RPM first), pitch up and accelerate to cruise speed.<br />
<br clear="all"><br />
<br />
=== Standard Rate Turn ===<br />
[[File:SenecaII_HOWTO_standard_rate.jpg|thumb|Standard rate turn to the right, apply right rudder]]<br />
The standart rate turn is defined (for slow aircraft like the Seneca) as turning with a rate of 3 degrees per second. That makes a full circle in 2 minutes. That's why some people call this a 2-minute-turn. The turn coordinator helps you in the correct timing. When the aircraft starts turning (rotate around the vertical axis), the little aircraft symbol starts to bank. When the right wing of that symbol aligns with the R marking, the aircraft turns right at exactly the 3 degrees per second rate. And it works on left turns, too. Just use the L marking and the left wing of the aircraft symbol for that.<br />
<br />
So much for the theory - start with a 360 degree turn to the right. Bank to the right, a bank angle of 20 degrees should get you a correct rate of turn. Apply a little right rudder to make the turn coordinated and keep the ball in the turn coordinator instrument centered. Try to keep the altitude within a limit of +/- 100ft (2900-3100ft). Align the altitude with small variations of pitch. Slowly roll out 10 degrees before reaching the target heading of 280. <br />
<br />
Stabilize heading 280 and altitude 3000ft and do the same with a left turn.<br />
<br clear="all"><br />
<br />
=== Steep Turn ===<br />
[[File:SenecaII_HOWTO_steep_turn.jpg|thumb|Steep turn to the right]]<br />
This is fun! Steep turn are at 60 degrees bank angle (this is the second long marking on the attitude indicator). In reality this makes you feel the g-force and if you make it perfect, you enter you own wake turbulance when finishing the 360.<br />
<br />
The high bank angle reduces the aircraft's lift. This will be compensated with a higher power setting - 1" more manifold pressure will do. Apply the higher manifold pressure when passing 30 degrees of bank angle. In the turn, the elevator becomes more a rudder. Pulling the yoke increases the rate of turn. Adjust the bank angle with the ailerons. Adjust the altitude with the bank angle. Reduce the bank angle when altitude decreases and increase bank angle when the altitude increases. Do not pull the elevator when you loose altitude. That will make things worse.<br />
<br />
Now start again with a steep turn to the right. Bank to the right - at 30 degrees bank angle set manifold pressure to 29". Continue increasing the bank angle and pull the yoke. In reality, you need some force here and you feel the increased weight of you body. Keep an eye on the attitude indicator and the altimeter. Try to maintain altitude within +/- 100ft and bank angle of 60 degrees. Roll out on heading 250, reduce manifold pressure to 28" and settle on heading 280 altitude 3000ft. Now try a steep turn to the left. If you are satisfied with the result, try to swing over to the right for another steep turn to the right. <br />
<br />
After all these steep turns calm down again, make a standard rate turn to the right for a new heading of 090. This should lead closer to the field.<br />
<br clear="all"><br />
<br />
=== Slow Flight ===<br />
[[File:SenecaII_HOWTO_slowflight.jpg|thumb|Slowflight in landing configuration with left turn]]<br />
At the present altitude of 3000ft and heading 090 reduce the power to 18" manifold pressure. While maintaining altitude 3000ft, the aircraft slows down. At 129 knots or below, lower the landing gear. At 105 knots (white arc begins) lower flaps one, than two and finally three notches to full extension. Let the speed reduce to 80 knots. You now fly a big, clumsy tanker. To maintain your speed and altitude adjust the powersetting by 3 to 4 inches and be careful with the yoke, don't pull to hard - the stall is just around the corner. Try to further reduce speed to 70 knots. Now go for a heading change - turn left heading north. Be very careful, make it shallow and smooth. Only small corrections with the ailerons are allowed and using the rudder is strongly recommended. <br />
Its easy to get a stall and end up in a spin. <br />
After establishing on heading north, turn right again heading 090, still in slow flight. Is your altitude 3000 ft?<br />
<br />
Proceed with a stall in the next section...<br />
<br clear="all"><br />
<br />
=== Stalls ===<br />
==== Approach Stall ====<br />
[[File:SenecaII_HOWTO_approach_stall.jpg|thumb|The approach stall]]<br />
The first stall to achieve is the approach stall. This is done in approach configuration: gear down, flaps fully set and low power. The goal is to recover from this stall without any altitude loss, because there is no altitude to loose when approaching a runway and getting into a stall 300ft above ground. The stall is indicated by either<br />
* end of white arc on airspeed indicator<br />
* stall warning<br />
* buffeting<br />
whichever is first.<br />
<br />
Since neither stall warning nor buffeting is currently implemented assume a stall at the end of the white arc (61 knots).<br />
To recover from the approach stall<br />
# Don't reduce pitch!<br />
# full power (40" manifold pressure, 2575 RPM)<br />
# reduce drag<br />
## gear up<br />
## flaps up to first notch<br />
## when stall is broken: flaps up<br />
# accelerate to best rate of climb speed<br />
# reduce power to climb power<br />
<br clear="all"><br />
<br />
==== Clean Stall ====<br />
[[File:SenecaII_HOWTO_clean_stall.jpg|thumb|The approach stall]]<br />
Clean stalls happen in clean configuration - flaps up and gear up and reduced power. A altitude loss of up to 100ft is acceptable. Stall indicators are<br />
* end of green arc on airspeed indicator<br />
* stall warning<br />
* buffeting<br />
whichever is first.<br />
<br />
Recovery is done<br />
# reduce pitch<br />
# full power (40" manifold pressure, 2575 RPM)<br />
# when stall is broken, reduce power to cruise power<br />
<br clear="all"><br />
<br />
==== Power On Stall ====<br />
[[File:SenecaII_HOWTO_power_on_stall.jpg|thumb|The approach stall]]<br />
Power on stalls are also in clean configuration but with power either climb or full power. They occur on climbouts on a too high angle of attack. Recovery usually leads to an altitude loss. The stall indicators are<br />
* end of green arc on airspeed indicator<br />
* stall warning<br />
* buffeting<br />
whichever is first.<br />
<br />
There is only one way to recover from this stall<br />
# reduce pitch<br />
# accelerate<br />
# when stall is broken, continue climb with lower pitch<br />
<br clear="all"><br />
<br />
== Approach and Landing ==<br />
So you are still alive and flying? Congratiulations. So it's time for a break - let's go home for a landing at KSFO RWY 28R. Reset all controls now for a normal cruise at 28" manifold pressure and 2400RPM at 3000ft. If you didn't do anything bad, you should be somewhere between KSFO and downtown San Francisco with the bay right in front of you heading east (090).<br />
<br />
When you have the airport in sight, proceed direct to the field descending altitude 1000ft.<br />
<br />
[[File:SenecaII_HOWTO_homing.jpg|thumb|homing to SF ndb]]<br />
To get home if you are lost, tune the NDB radio to 379, hit the <-> button to enable the frequency and press the ADF button. This is the SF ndb standing a few miles from the airport on the extended centerline of RWY 28. The needle of the NDB indicator points directly to this beacon. Now turn in the direction the needle is pointing until the needle show straight up to N. While on your way, descend altitude 2000ft. This is a good moment for reading the approach check from the checklist.<br />
<br />
[[File:SenecaII_HOWTO_turning_final.jpg|thumb|turning to the airport]]<br />
When the ADF needle starts to move quickly maintain you heading until it has passed the E or W marking. Now you have passed the SF beacon. Turn the shortest way to heading 280 and reduce power to 21" manifold pressure and 2300RPM. Descend at a rate of 500 feet per minute to altitude 1000ft. Follow the costline until you can see the airport, proceed to runway intersection and enter right downwind RWY 28R.<br />
<br />
Look out of the right window - when abeam the numbers of the runway, reduce power to 18" manifold pressure, maintain 1000ft. Lower the gear when speed is below 129 knots. Turn on landing lights. Slow down to 105 knots. Look right, when the runway threshold is 45 degrees behind you turn base, set flaps one notch and start descend with 500fpm. You should be at 500ft when turning to final. On final set flaps two notches and reduce to 90 knots. Final check<br />
* gear down and 3 green<br />
* propeller high RPM<br />
* mixture rich<br />
* landing lights on<br />
* speed 90<br />
When sure of making the runway, extend flaps fully. When over the threshold reduce power to idle and level off a few feet above the runway. Pitch up without climbing and let the aircraft settle. Apply breaks to stop and you are done.<br />
<br />
OK - this was not a very common approach and it will scare the controllers in the bay area - but who cares in simuland?<br />
<br clear="all"><br />
<br />
== Timed Traffic Pattern, Touch and Go, Go Around ==<br />
<br />
= Advanced - IFR =<br />
== Preparing ==<br />
== Flying a SID ==<br />
== Entering and flying the holding ==<br />
== Flying the Approach ==<br />
== Flying the Missed Approach ==<br />
<br />
= Abnormal Procedures =<br />
== Engine Failure ==<br />
=== Engine Failure During Takeoff ===<br />
=== Engine Failure Enroute ===<br />
=== Single Engine Go Around ===<br />
<br />
= Related content =<br />
* [[Piper PA34-200T Seneca II]]<br />
* [[Seneca II Checklist]]<br />
* [[Seneca II Panel Reference]]<br />
* [[Joystick Autopilot Bindings]] Snippets for joystick.xml file that allow control of most of the autopilot functions with the joystick<br />
= External Links =<br />
* [http://www.centuryflight.com/manuals/CENTIII.pdf CENTURY III Autopilot POH]<br />
<br />
[[Category:Howto|Seneca II]]<br />
[[Category:Piper PA34-200T Seneca II]]</div>Wonkohttps://wiki.flightgear.org/w/index.php?title=Bendix/King_KAP140_Autopilot&diff=76776Bendix/King KAP140 Autopilot2014-09-27T21:47:01Z<p>Wonko: Add link to autopilot joystick bindings page</p>
<hr />
<div>The '''''Bendix/King KAP 140''''' '''Two Axis/Altitude Preselect Autopilot System''' is the [[autopilot]] of the default [[Cessna 172]], controlling the [[elevator]] and [[aileron]]s.<br />
<br />
== Quick Guide ==<br />
[[File:KAP140.jpg|KAP140 Two Axis with Preselect Altitude]]<br />
<br />
# To activate the autopilot in wings level (ROL) and vertical speed (VS) modes press the AP button. The autopilot will try to keep the wings level by keeping the turn rate at zero. The autopilot will also try to maintain the vertical speed at activation. Use the UP and DN buttons to set the desired vertical speed.<br />
# With the autopilot active you can use the HDG button to toggle between wings level (ROL) and heading select (HDG) modes. In heading select mode the autopilot will try to maintain the heading selected by the heading bug on the directional gyro.<br />
# Use NAV button to toggle between navigation mode (NAV) and wings level (ROL) mode. NAV mode is flying to NAV1 or GPS. That is one of the Heading modes in KAP140 that direction when heading bug OBS operated. Please be careful.<br />
# Toggle other mode and approach (APR) mode when APR button pushed and following marker beacon, VOR, GPS and [[ILS]] (localizer and glide slope) for automatic approach. This mode is recommended for instrument approach.<br />
# The REV button enables the back course mode having the autopilot flying away from the runway. This mode is like APR mode except that the direction is away from the localizer (LOC) and that glide slope (GS) is not used.<br />
# Use the ALT button to toggle between vertical speed (VS) and altitude hold (ALT) modes. In altitude hold mode the UP and DN buttons change the altitude by 20 feet per press.<br />
# The ARM button enables altitude preselect by the rotary knob using procedure below, pushing it again disables altitude preselect.<br />
## Input the current atmospheric pressure using the BARO button and rotary knob<br />
## Check that the display is showing altitude and set your desired altitude, using the rotary knob. <br />
## Set your desired vertical speed using UP and DN button.<br />
## Press the ARM button that is enable ARM mode.<br />
# The BARO button sets the atmospheric pressure. When the BARO button is pushed, enter desired atmospheric pressure using the rotary dial/knob.<br />
# Press the AP button to deactivate the autopilot. The horizontal and vertical modes can not be activated independently.<br />
<br />
Please read the Pilot's Guide for complete instructions on the use of the KAP140 Autopilot system.<br />
<br />
== Related pages ==<br />
* [[Joystick Autopilot Bindings]] Snippets for joystick.xml file that allow control of most of the autopilot functions using the joystick.<br />
== External link ==<br />
* [https://dealer.bendixking.com/servlet/com.honeywell.aes.utility.PDFDownLoadServlet?FileName=/TechPubs/repository/006-18034-0000_3.pdf Bendix/King KAP 140 Pilots Guide] (PDF, 7.1 MB), Honywell, rev. 3, Sep 2005.<br />
<br />
[[Category:Aircraft instruments]]</div>Wonkohttps://wiki.flightgear.org/w/index.php?title=Joystick_autopilot_bindings&diff=76775Joystick autopilot bindings2014-09-27T21:31:44Z<p>Wonko: Minor linguistic improvements</p>
<hr />
<div>== Introduction ==<br />
<br />
Before you start, read [[Input device]] and probably [[Writing Joystick Code: Part 1]].<br />
<br />
Autopilots are often very useful devices, but unfortunately there standard key bindings of Flightgear control the `magic autopilot' rather than the simulated real one, and the only way to control popular GA autopilots is by clicking the corresponding buttons in the 3D-cockpit. This is awkward if there is a need to change mode or turn off the autopilot quickly (at final stage of ILS landing, or if the autopilot does something silly). This page describes joystick bindings, which can be used to control the (simulated) autopilot with a set of joystick buttons.<br />
Every type of autopilot is operated quite differently, such that these keys only work for specific models. Here, key bindings are provided for the [[Bendix/King KAP140 Autopilot]] (in the [[Cessna 172]]) and the [http://www.centuryflight.com/manuals/CENTIII.pdf CENTURY III Autopilot POH] ([[Seneca II]]).<br />
Those were prioritised, as the more complex autopilots in jets usually have a dedicated GUI and therefore maybe less in need of joystick binding. However, it is planned to provide bindings for at least basic functions like AUTOPILOT OFF for other autopilot types in the future. <br />
<br />
== Implementation ==<br />
<br />
The example code provides a setup for six buttons arranged like this:<br />
<br />
4 5 6<br /><br />
9 8 7 <br />
<br />
(this happens to be suitable for the Thrustmaster T16000M but it can be adapted trivially to other button numbers by simply changing the button numbers in the snippets below).<br />
In the following snippets for each functionality are provided - usually one with the actual binding and some corresponding initialisation code (placed between nasal tags at the beginning of the script). You need to copy/paste both into your joystick bindings xml file. In the summary the code of all snippets is provided in one code box for convenience but you learn more if you consider each snippet in turn. Generally, it was attempted to have largely consistent bindings for the different autopilot types, but because they are operated quite differently, this was not entirely possible, and it was attempted to stay close to the mode of operation of the actual instruments. <br />
<br />
=== Generic initialisation code ===<br />
On startup, we need to figure out whether we are dealing with a Bendix KAP 140 or CENTURY III autopilot.<br />
<syntaxhighlight lang="nasal" ><br />
<nasal><br />
<!-- set autopilot type:<br />
1: KAP140 (e.g. c172p)<br />
2: CENTURYIII (e.g. senecaII) --><br />
<script><![CDATA[<br />
var autopilottype=0;<br />
var horizontalmode=0;<br />
if (getprop("sim/aircraft")=="c172p") {<br />
print("JOYSTICK INIT: Found KAP140 autopilot");<br />
autopilottype=1;<br />
} elsif (getprop("autopilot/CENTURYIII/power")>-1) {<br />
print("JOYSTICK INIT: Found CENTURYIII autopilot");<br />
autopilottype=2; <br />
}<br />
....<br />
]]></script><br />
</nasal><br />
<br />
</syntaxhighlight><br />
As you can see it assumes only the Cessna 172 has the KAP-140. If there is another plane with this autopilot the condition should be adjusted.<br />
<br />
=== Major mode selection ===<br />
Button 4 turns the autopilot on or off (toggle switch). <br />
With modifiers:<br /><br />
(SHIFT) HDG mode toggle (the details of this mode are controlled by button 4)<br /><br />
(CTRL) PITCH mode toggle (CENTURYIII only!)<br /><br />
(ALT) ALT mode toggle (KAP140: switches between VS and ALT vertical modes. CENTURYIII: turns on and off ALT mode) <br />
<br />
Button settings:<br />
<syntaxhighlight lang="nasal"><br />
<button n="4"><br />
<repeatable type="bool">false</repeatable><br />
<desc>Autopilot Toggle / HDG mode toggle / PITCH mode / ALT mode </desc><br />
<binding><br />
<condition><property>/autopilot/CENTURYIII/controls/roll/button-state</property></condition><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/disconnect</property><br />
<value>1</value><br />
</binding><br />
<binding><br />
<condition><not><property>/autopilot/CENTURYIII/controls/roll/button-state</property></not></condition><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/roll/button-on</property><br />
<value>1</value><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
if ( autopilottype == 1 ) { <br />
kap140.apButton();<br />
if ( getprop("autopilot/KAP140/locks/roll-mode") == 0 ) {<br />
gui.popupTip("AP off");<br />
} else {<br />
gui.popupTip("AP on");<br />
}<br />
} <br />
</script><br />
</binding><br />
<mod-up><br />
<binding><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/disconnect</property><br />
<value>0</value><br />
</binding><br />
<binding><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/roll/button-on</property><br />
<value>0</value><br />
</binding><br />
<binding><br />
<command>nasal</command><script><br />
if ( autopilottype == 2 ) { <br />
<!-- CENTURYIII --><br />
if ( getprop("autopilot/CENTURYIII/controls/roll/button-state") ) {<br />
gui.popupTip("AP ROLL on");<br />
} else {<br />
gui.popupTip("AP ROLL off");<br />
} <br />
}<br />
</script><br />
</binding><br />
</mod-up> <br />
<mod-shift> <br />
<binding><br />
<condition><property>/autopilot/CENTURYIII/controls/hdg/button-state</property></condition><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/hdg/button-off</property><br />
<value>1</value><br />
</binding><br />
<binding><br />
<condition><not><property>/autopilot/CENTURYIII/controls/hdg/button-state</property></not></condition><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/hdg/button-on</property><br />
<value>1</value><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
if ( autopilottype == 1 ) { <br />
kap140.hdgButton();<br />
if ( getprop("autopilot/KAP140/locks/roll-mode") == 2 ) {<br />
gui.popupTip("AP HDG");<br />
} elsif ( getprop("autopilot/KAP140/locks/roll-mode") == 1 ) {<br />
gui.popupTip("AP ROL");<br />
}<br />
} <br />
</script><br />
</binding><br />
<mod-up><br />
<binding><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/hdg/button-off</property><br />
<value>0</value><br />
</binding><br />
<binding><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/hdg/button-on</property><br />
<value>0</value><br />
</binding><br />
<binding><br />
<command>nasal</command><script><br />
if ( autopilottype == 2 ) { <br />
<!-- CENTURYIII --><br />
if ( getprop("autopilot/CENTURYIII/controls/hdg/button-state") ) {<br />
gui.popupTip("AP HDG on");<br />
} else {<br />
gui.popupTip("AP HDG off");<br />
}<br />
}<br />
</script><br />
</binding><br />
</mod-up> <br />
</mod-shift><br />
<mod-ctrl> <br />
<binding><br />
<condition><property>/autopilot/CENTURYIII/controls/pitch/button-state</property></condition><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/pitch/button-off</property><br />
<value>1</value><br />
</binding><br />
<binding><br />
<condition><not><property>/autopilot/CENTURYIII/controls/pitch/button-state</property></not></condition><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/pitch/button-on</property><br />
<value>1</value><br />
</binding><br />
<mod-up><br />
<binding><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/pitch/button-off</property><br />
<value>0</value><br />
</binding><br />
<binding><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/pitch/button-on</property><br />
<value>0</value><br />
</binding><br />
<binding><br />
<command>nasal</command><script><br />
if ( autopilottype == 2 ) { <br />
<!-- CENTURYIII --><br />
if ( getprop("autopilot/CENTURYIII/controls/pitch/button-state") ) {<br />
gui.popupTip("AP PITCH on");<br />
} else {<br />
gui.popupTip("AP PITCH off");<br />
} <br />
}<br />
</script><br />
</binding><br />
</mod-up> <br />
</mod-ctrl><br />
<mod-alt> <br />
<binding><br />
<command>nasal</command><br />
<script>if (autopilottype==1 ) {<br />
kap140.altButton();<br />
if ( getprop("autopilot/KAP140/locks/pitch-mode") == 2 ) {<br />
gui.popupTip("AP ALT");<br />
} elsif ( getprop("autopilot/KAP140/locks/pitch-mode") == 1 ) {<br />
gui.popupTip("AP VS");<br />
}<br />
}<br />
</script><br />
</binding><br />
<binding><br />
<condition><property>/autopilot/CENTURYIII/controls/alt/button-state</property></condition><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/alt/button-off</property><br />
<value>true</value><br />
</binding><br />
<binding><br />
<condition><not><property>/autopilot/CENTURYIII/controls/alt/button-state</property></not></condition><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/alt/button-on</property><br />
<value>true</value><br />
</binding><br />
<mod-up><br />
<binding><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/alt/button-off</property><br />
<value>false</value><br />
</binding><br />
<binding><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/alt/button-on</property><br />
<value>false</value><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
if(autopilottype==2) {<br />
if ( getprop("autopilot/CENTURYIII/controls/alt/button-state")) {<br />
gui.popupTip("AP ALT on");<br />
} else {<br />
gui.popupTip("AP ALT off");<br />
}<br />
}<br />
</script><br />
</binding><br />
</mod-up> <br />
</mod-alt><br />
</button><br />
</syntaxhighlight><br />
<br />
=== Horizontal mode selection ===<br />
Button 5 controls the source of course selection in HDG mode (for the LOC and APR modes, the vertical mode is also affected, of course). It works quite differently in the two autopilots:<br />
* KAP140: (no modifier) NAV mode: track radial of VOR1 beacon. Press again to go back to follow set heading<br /><br />
(SHIFT) APR mode: track ILS beacon (set radial to runway orientation). If glideslope is approached from below in ALT mode, lock on to localiser <br /><br />
(CTRL) REV mode: track reverse ILS direction<br /><br />
* CENTURYIII: Move mode selector button to the right (clockwise) <br /><br />
(SHIFT) Move mode selector button to the left (anti-clockwise) <br /><br />
Both direction are wrapped, i.e. you can keep pressing the button until you arrive at the selected mode. In turn, the modes selected are: NAV, OMNI, HDG, LOC NORM, LOC REV. Please refer to the CENTURYIII manual for further explanation. <br />
<br />
Initialisation:<br />
<syntaxhighlight lang="nasal"><br />
var showhorizontalmode=func() {<br />
if ( autopilottype == 1 ) {<br />
if ( getprop("autopilot/KAP140/locks/roll-arm") == 1 ) {<br />
gui.popupTip("AP NAV");<br />
} elsif ( getprop("autopilot/KAP140/locks/roll-arm") == 2 ) {<br />
gui.popupTip("AP APR");<br />
} elsif ( getprop("autopilot/KAP140/locks/roll-arm") == 3 ) {<br />
gui.popupTip("AP REV");<br />
}<br />
}<br />
if (autopilottype == 2) {<br />
horizontalmode=getprop("autopilot/CENTURYIII/controls/mode");<br />
if ( horizontalmode==0) {<br />
gui.popupTip("APmode NAV");<br />
} elsif ( horizontalmode==1) {<br />
gui.popupTip("APmode OMNI");<br />
} elsif ( horizontalmode==2) {<br />
gui.popupTip("APmode HDG");<br />
} elsif ( horizontalmode==3) {<br />
gui.popupTip("APmode LOC");<br />
} elsif ( horizontalmode==4) {<br />
gui.popupTip("APmode REV");<br />
} <br />
}<br />
}<br />
</syntaxhighlight><br />
<br />
Button settings:<br />
<syntaxhighlight lang="nasal"><br />
<button n="5"><br />
<repeatable type="bool">false</repeatable><br />
<desc>KAP140: NAV / APR / REV ; CENTURYIII:<br />
Move Hdg select button to the right (wrap)</desc><br />
<binding><br />
<command>property-adjust</command><br />
<property>autopilot/CENTURYIII/controls/mode</property><br />
<step type="double">1</step><br />
<min>0</min><br />
<max>5</max> <br />
<wrap>true</wrap> <br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
if (autopilottype==1) { <br />
kap140.navButton(); }<br />
showhorizontalmode();<br />
</script><br />
</binding><br />
<mod-shift> <br />
<binding><br />
<command>property-adjust</command><br />
<property>autopilot/CENTURYIII/controls/mode</property><br />
<step type="double">-1</step><br />
<min>0</min><br />
<max>5</max> <br />
<wrap>true</wrap> <br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script> <br />
if (autopilottype==1) { kap140.aprButton();}<br />
showhorizontalmode();<br />
</script><br />
</binding><br />
</mod-shift><br />
<mod-ctrl> <br />
<binding><br />
<command>nasal</command><br />
<script> if (autopilottype==1) { kap140.revButton();}<br />
showhorizontalmode();<br />
</script><br />
</binding><br />
</mod-ctrl><br />
</button><br />
</syntaxhighlight><br />
<br />
=== Vertical mode pitch or vertical speed selector ===<br />
Control the vertical mode.<br />
<br />
* KAP140: Button 6 increases target VS by 100 ft/min, button 7 decreases target VS by 100 ft/min<br />
* CENTURYIII: Button 6 smoothly lowers pitch (nose down), button 7 increases pitch (nose up)<br />
<br />
The opposite way these buttons work for the two types of autopilot arises from the arrangement in the cockpit. For the CENTURYIII, the pitch is controlled by a wheel, which needs to be moved up to lower the nose (similar to elevator trim wheels), whereas for the KAP140 two buttons are arranged such that the top button increases target VS. <br />
<br />
Initialisation:<br />
<syntaxhighlight lang="nasal"><br />
var showvertical=func() {if ( autopilottype==1 ) {<br />
if ( getprop("autopilot/KAP140/locks/pitch-mode") == 1 ) {<br />
gui.popupTip(sprintf("AP VS<br />
%d",getprop("autopilot/KAP140/settings/target-pressure-rate")*(-58000)));<br />
}<br />
} elsif ( autopilottype==2 ) {<br />
gui.popupTip(sprintf("AP Pitch:%4.1f",getprop("autopilot/CENTURYIII/settings/pitch-wheel-deg")));<br />
}}<br />
</syntaxhighlight><br />
Button settings:<br />
<syntaxhighlight lang="nasal"><br />
<button n="6"><br />
<repeatable type="bool">false</repeatable><br />
<desc>AP-VS (KAP140:increase VS, CENTURYII: pitch down</desc><br />
<!-- KAP140 --><br />
<binding><br />
<command>nasal</command><br />
<script>if (autopilottype==1) {<br />
kap140.upButton();<br />
}<br />
showvertical(); <br />
</script><br />
</binding><br />
<!-- CENTURYIII --><br />
<binding><br />
<command>property-interpolate</command><br />
<property>/autopilot/CENTURYIII/settings/pitch-wheel-deg</property><br />
<value type="double">-10</value><br />
<rate>4</rate><br />
</binding><br />
<mod-up><br />
<binding><br />
<command>property-interpolate</command><br />
<property>/autopilot/CENTURYIII/settings/pitch-wheel-deg</property><br />
<property>/autopilot/CENTURYIII/settings/pitch-wheel-deg</property><br />
<rate>1</rate><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
if(autopilottype==2) { showvertical(); } <br />
</script><br />
</binding><br />
</mod-up><br />
</button><br />
<br />
<br />
#7: Autopilot VS down<br />
<button n="7"><br />
<repeatable type="bool">false</repeatable><br />
<desc>AP-dn</desc><br />
<!-- KAP140 --><br />
<binding><br />
<command>nasal</command><br />
<script>if (autopilottype==1) {<br />
kap140.downButton();<br />
}<br />
showvertical(); <br />
</script><br />
</binding><br />
<!-- CENTURYIII --><br />
<binding><br />
<command>property-interpolate</command><br />
<property>/autopilot/CENTURYIII/settings/pitch-wheel-deg</property><br />
<value type="double">10</value><br />
<rate>4</rate><br />
</binding><br />
<mod-up><br />
<binding><br />
<command>property-interpolate</command><br />
<property>/autopilot/CENTURYIII/settings/pitch-wheel-deg</property><br />
<property>/autopilot/CENTURYIII/settings/pitch-wheel-deg</property><br />
<rate>1</rate><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
if(autopilottype==2) { showvertical(); } <br />
</script><br />
</binding><br />
</mod-up><br />
</button></syntaxhighlight><br />
=== Horizontal mode direction selector ===<br />
Adjust heading bug (button 8 clockwise and button 9 anti-clockwise).<br />
<br />
With modifiers:<br /><br />
(SHIFT) coarse heading bug adjustment<br /><br />
(CTRL) adjust bank angle (CENTURY III only!)<br /><br />
(ALT) adjust radial of NAV1 (can also be used without autopilot)<br /><br />
<br />
<br />
Initialisation:<br />
<syntaxhighlight lang="nasal" ><br />
var showhdgbug=func() {if ( autopilottype==1 ) {<br />
gui.popupTip(sprintf("Heading Bug:%3d",getprop("autopilot/settings/heading-bug-deg"))); <br />
} elsif ( autopilottype==2 ) {<br />
gui.popupTip(sprintf("Hdg Bug:%3d",getprop("instrumentation/kcs55/ki525/selected-heading-deg")));<br />
}}<br />
var showroll=func() { if ( autopilottype==2 ) {<br />
gui.popupTip(sprintf("AP Roll:%2d",getprop("autopilot/CENTURYIII/settings/roll-knob-deg")));}}<br />
var showcourseselect=func() {<br />
if ( autopilottype==1 ) {<br />
gui.popupTip(sprintf("Course select:%2d",getprop("instrumentation/nav/radials/selected-deg")));<br />
} elsif ( autopilottype==2 ) {<br />
gui.popupTip(sprintf("Course select:%2d",getprop("instrumentation/kcs55/ki525/selected-course-deg")));}}<br />
</syntaxhighlight><br />
<br />
Button definition:<br />
<syntaxhighlight lang="xml" ><br />
<button n="8"><br />
<desc>Heading bug CW / Heading bug CW large steps /<br />
(CENTURYIII:)Roll knob turn right / Course select CW</desc><br />
<repeatable>true</repeatable><br />
<binding><br />
<command>property-adjust</command><br />
<property>/autopilot/settings/heading-bug-deg</property><br />
<step type="double">0.25</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>property-adjust</command><br />
<property>instrumentation/kcs55/ki525/selected-heading-deg</property><br />
<step type="double">0.25</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showhdgbug();<br />
</script><br />
</binding><br />
<mod-shift><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showhdgbug();<br />
</script><br />
</binding><br />
<binding><br />
<command>property-adjust</command><br />
<property>/autopilot/settings/heading-bug-deg</property><br />
<step type="double">2.5</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>property-adjust</command><br />
<property>instrumentation/kcs55/ki525/selected-heading-deg</property><br />
<step type="double">2.5</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showhdgbug();<br />
</script><br />
</binding><br />
</mod-shift><br />
<mod-ctrl><br />
<binding><br />
<command>property-adjust</command><br />
<property>/autopilot/CENTURYIII/settings/roll-knob-deg</property><br />
<step type="double">0.5</step><br />
<max>30</max><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showroll();<br />
</script><br />
</binding><br />
</mod-ctrl><br />
<mod-alt><br />
<binding><br />
<command>property-adjust</command><br />
<property>instrumentation/nav/radials/selected-deg</property><br />
<step type="double">0.25</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>property-adjust</command><br />
<property>instrumentation/kcs55/ki525/selected-course-deg</property><br />
<step type="double">0.25</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showcourseselect();<br />
</script><br />
</binding><br />
</mod-alt><br />
</button><br />
<br />
<br />
<button n="9"><br />
<desc>Heading bug CCW / Heading bug CCW large steps</desc><br />
<repeatable>true</repeatable><br />
<binding><br />
<command>property-adjust</command><br />
<property>/autopilot/settings/heading-bug-deg</property><br />
<step type="double">-0.25</step><br />
</binding><br />
<binding><br />
<command>property-adjust</command><br />
<property>instrumentation/kcs55/ki525/selected-heading-deg</property><br />
<step type="double">-0.25</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showhdgbug();<br />
</script><br />
</binding><br />
<mod-shift><br />
<binding><br />
<command>property-adjust</command><br />
<property>/autopilot/settings/heading-bug-deg</property><br />
<step type="double">-2.5</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>property-adjust</command><br />
<property>instrumentation/kcs55/ki525/selected-heading-deg</property><br />
<step type="double">-2.5</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showhdgbug();<br />
</script><br />
</binding><br />
</mod-shift><br />
<mod-ctrl><br />
<binding><br />
<command>property-adjust</command><br />
<property>/autopilot/CENTURYIII/settings/roll-knob-deg</property><br />
<step type="double">-0.5</step><br />
<min>-30</min><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showroll();<br />
</script><br />
</binding><br />
</mod-ctrl><br />
<mod-alt><br />
<binding><br />
<command>property-adjust</command><br />
<property>instrumentation/nav/radials/selected-deg</property><br />
<step type="double">-0.25</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>property-adjust</command><br />
<property>instrumentation/kcs55/ki525/selected-course-deg</property><br />
<step type="double">-0.25</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showcourseselect();<br />
</script><br />
</binding><br />
</mod-alt><br />
</syntaxhighlight><br />
<br />
== Summary ==<br />
For convenience all of the above bindings are summarised into one file accessible at [http://pastebin.com/2HM9S1df pastebin] (at the time of writing identical to the combination of the snippets above but of course the pastebin might not always keep up with the Wiki - beware)</div>Wonkohttps://wiki.flightgear.org/w/index.php?title=Joystick_autopilot_bindings&diff=76754Joystick autopilot bindings2014-09-26T21:07:44Z<p>Wonko: Completion first draft</p>
<hr />
<div>== Introduction ==<br />
<br />
Before you start, read [[Input device]] and probably [[Writing Joystick Code: Part 1]]<br />
<br />
Autopilots are generally very useful features, but unfortunately there are only key bindings for the `magic autopilot', and the only way to control popular GA autopilots is by clicking the corresponding buttons in the 3D-cockpit. This is awkward if there is a need to change mode or turn off the autopilot quickly (at final stage of ILS landing, autopilot does something silly). This page describes joystick bindings, which can be used to control the (simulated) autopilot with a set of joystick buttons.<br />
Every type of autopilot is operated quite differently, such that these keys only work for specific models. In the current implementation the key bindings work for the [[Bendix/King KAP140 Autopilot]] (in the [[Cessna 172]]) and the [http://www.centuryflight.com/manuals/CENTIII.pdf CENTURY III Autopilot POH] ([[Seneca II]]).<br />
Those were prioritised, as the more complex autopilots in jets usually have a dedicated GUI but it is planned to provide bindings for at least basic functions like AUTOPILOT OFF in the future. <br />
<br />
== Implementation ==<br />
<br />
The example code provides a nice setup for six buttons arranged like this (this happens to be suitable for the Thrustmaster T16000M but it can be adapted trivially to other button numbers by simply changing the button numbers in the snippets below. THis is the arrangement of buttons in the T16000M:<br />
<br />
4 5 6<br /><br />
9 8 7 <br />
<br />
In the following snippets for each functionality are given - usually one with the actual binding and some corresponding initialisation code (put between nasal tags at the beginning of the script). You need to copy/paste both into your joystick bindings xml file. In the summary the code of all snippets is provided in one code box for convenience but you learn more if you consider each snippet in turn. Generally, it was attempted to have somewhat consistent bindings between the different autopilot types, but because they are operated quite differently, this was not entirely possible, and it was attempted to stay close to the mode of operation of the actual instruments. <br />
<br />
=== Generic initialisation code ===<br />
On startup, we need to figure out whether we are dealing with a Bendix KAP 140 or CENTURY II autopilot.<br />
<syntaxhighlight lang="nasal" ><br />
<nasal><br />
<!-- set autopilot type:<br />
1: KAP140 (e.g. c172p)<br />
2: CENTURYIII (e.g. senecaII) --><br />
<script><![CDATA[<br />
var autopilottype=0;<br />
var horizontalmode=0;<br />
if (getprop("sim/aircraft")=="c172p") {<br />
print("FOUND KAP140 autopilot");<br />
autopilottype=1;<br />
} elsif (getprop("autopilot/CENTURYIII/power")>-1) {<br />
print("Using CENTURYIII autopilot joystick binding");<br />
autopilottype=2; <br />
}<br />
....<br />
]]></script><br />
</nasal><br />
<br />
</syntaxhighlight><br />
As you can see it assumes only the Cessna 172 has the KAP-140. If there is another plane with this autopilot the condition should be adjusted.<br />
<br />
=== Major mode selection ===<br />
Button 4 turns the autopilot on or off (toggle switch). <br />
With modifiers:<br /><br />
(SHIFT) HDG mode toggle (the details of this mode are controlled by button 4)<br /><br />
(CTRL) PITCH mode toggle (CENTURYIII only!)<br /><br />
(ALT) ALT mode toggle (KAP140: switches between VS and ALT vertical modes. CENTURYIII: turns on and off ALT mode) <br />
<br />
Button settings:<br />
<syntaxhighlight lang="nasal"><br />
<button n="4"><br />
<repeatable type="bool">false</repeatable><br />
<desc>Autopilot Toggle / HDG mode toggle / PITCH mode / ALT mode </desc><br />
<binding><br />
<condition><property>/autopilot/CENTURYIII/controls/roll/button-state</property></condition><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/disconnect</property><br />
<value>1</value><br />
</binding><br />
<binding><br />
<condition><not><property>/autopilot/CENTURYIII/controls/roll/button-state</property></not></condition><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/roll/button-on</property><br />
<value>1</value><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
if ( autopilottype == 1 ) { <br />
kap140.apButton();<br />
if ( getprop("autopilot/KAP140/locks/roll-mode") == 0 ) {<br />
gui.popupTip("AP off");<br />
} else {<br />
gui.popupTip("AP on");<br />
}<br />
} <br />
</script><br />
</binding><br />
<mod-up><br />
<binding><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/disconnect</property><br />
<value>0</value><br />
</binding><br />
<binding><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/roll/button-on</property><br />
<value>0</value><br />
</binding><br />
<binding><br />
<command>nasal</command><script><br />
if ( autopilottype == 2 ) { <br />
<!-- CENTURYIII --><br />
if ( getprop("autopilot/CENTURYIII/controls/roll/button-state") ) {<br />
gui.popupTip("AP ROLL on");<br />
} else {<br />
gui.popupTip("AP ROLL off");<br />
} <br />
}<br />
</script><br />
</binding><br />
</mod-up> <br />
<mod-shift> <br />
<binding><br />
<condition><property>/autopilot/CENTURYIII/controls/hdg/button-state</property></condition><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/hdg/button-off</property><br />
<value>1</value><br />
</binding><br />
<binding><br />
<condition><not><property>/autopilot/CENTURYIII/controls/hdg/button-state</property></not></condition><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/hdg/button-on</property><br />
<value>1</value><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
if ( autopilottype == 1 ) { <br />
kap140.hdgButton();<br />
if ( getprop("autopilot/KAP140/locks/roll-mode") == 2 ) {<br />
gui.popupTip("AP HDG");<br />
} elsif ( getprop("autopilot/KAP140/locks/roll-mode") == 1 ) {<br />
gui.popupTip("AP ROL");<br />
}<br />
} <br />
</script><br />
</binding><br />
<mod-up><br />
<binding><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/hdg/button-off</property><br />
<value>0</value><br />
</binding><br />
<binding><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/hdg/button-on</property><br />
<value>0</value><br />
</binding><br />
<binding><br />
<command>nasal</command><script><br />
if ( autopilottype == 2 ) { <br />
<!-- CENTURYIII --><br />
if ( getprop("autopilot/CENTURYIII/controls/hdg/button-state") ) {<br />
gui.popupTip("AP HDG on");<br />
} else {<br />
gui.popupTip("AP HDG off");<br />
}<br />
}<br />
</script><br />
</binding><br />
</mod-up> <br />
</mod-shift><br />
<mod-ctrl> <br />
<binding><br />
<condition><property>/autopilot/CENTURYIII/controls/pitch/button-state</property></condition><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/pitch/button-off</property><br />
<value>1</value><br />
</binding><br />
<binding><br />
<condition><not><property>/autopilot/CENTURYIII/controls/pitch/button-state</property></not></condition><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/pitch/button-on</property><br />
<value>1</value><br />
</binding><br />
<mod-up><br />
<binding><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/pitch/button-off</property><br />
<value>0</value><br />
</binding><br />
<binding><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/pitch/button-on</property><br />
<value>0</value><br />
</binding><br />
<binding><br />
<command>nasal</command><script><br />
if ( autopilottype == 2 ) { <br />
<!-- CENTURYIII --><br />
if ( getprop("autopilot/CENTURYIII/controls/pitch/button-state") ) {<br />
gui.popupTip("AP PITCH on");<br />
} else {<br />
gui.popupTip("AP PITCH off");<br />
} <br />
}<br />
</script><br />
</binding><br />
</mod-up> <br />
</mod-ctrl><br />
<mod-alt> <br />
<binding><br />
<command>nasal</command><br />
<script>if (autopilottype==1 ) {<br />
kap140.altButton();<br />
if ( getprop("autopilot/KAP140/locks/pitch-mode") == 2 ) {<br />
gui.popupTip("AP ALT");<br />
} elsif ( getprop("autopilot/KAP140/locks/pitch-mode") == 1 ) {<br />
gui.popupTip("AP VS");<br />
}<br />
}<br />
</script><br />
</binding><br />
<binding><br />
<condition><property>/autopilot/CENTURYIII/controls/alt/button-state</property></condition><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/alt/button-off</property><br />
<value>true</value><br />
</binding><br />
<binding><br />
<condition><not><property>/autopilot/CENTURYIII/controls/alt/button-state</property></not></condition><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/alt/button-on</property><br />
<value>true</value><br />
</binding><br />
<mod-up><br />
<binding><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/alt/button-off</property><br />
<value>false</value><br />
</binding><br />
<binding><br />
<command>property-assign</command><br />
<property>autopilot/CENTURYIII/controls/alt/button-on</property><br />
<value>false</value><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
if(autopilottype==2) {<br />
if ( getprop("autopilot/CENTURYIII/controls/alt/button-state")) {<br />
gui.popupTip("AP ALT on");<br />
} else {<br />
gui.popupTip("AP ALT off");<br />
}<br />
}<br />
</script><br />
</binding><br />
</mod-up> <br />
</mod-alt><br />
</button><br />
</syntaxhighlight><br />
<br />
=== Horizontal mode selection ===<br />
Button 5 controls the source of course selection in HDG mode. It works quite differently in the two autopilots:<br />
* KAP140: (no modifier) NAV track radial of VOR1 beacon. Press again to go back to follow set heading<br /><br />
(SHIFT) APR mode: track ILS beacon (set radial to runway orientation). If glideslope is approached from below in ALT mode, lock on to localiser <br /><br />
(CTRL) REV mode: track reverse ILS direction<br /><br />
* CENTURYIII: Move mode selector button to the right (clockwise) <br /><br />
(SHIFT) Move mode selector button to the left (anti-clockwise) <br /><br />
Both direction are wrapped, i.e. you can keep pressing the button until you arrive at the selected mode. In turn the modes selected are: NAV, OMNI, HDG, LOC NORM, LOC REV. Please refer to the CENTURYIII manual for further explanation.<br />
<br />
Initialisation:<br />
<syntaxhighlight lang="nasal"><br />
var showhorizontalmode=func() {<br />
if ( autopilottype == 1 ) {<br />
if ( getprop("autopilot/KAP140/locks/roll-arm") == 1 ) {<br />
gui.popupTip("AP NAV");<br />
} elsif ( getprop("autopilot/KAP140/locks/roll-arm") == 2 ) {<br />
gui.popupTip("AP APR");<br />
} elsif ( getprop("autopilot/KAP140/locks/roll-arm") == 3 ) {<br />
gui.popupTip("AP REV");<br />
}<br />
}<br />
if (autopilottype == 2) {<br />
horizontalmode=getprop("autopilot/CENTURYIII/controls/mode");<br />
if ( horizontalmode==0) {<br />
gui.popupTip("APmode NAV");<br />
} elsif ( horizontalmode==1) {<br />
gui.popupTip("APmode OMNI");<br />
} elsif ( horizontalmode==2) {<br />
gui.popupTip("APmode HDG");<br />
} elsif ( horizontalmode==3) {<br />
gui.popupTip("APmode LOC");<br />
} elsif ( horizontalmode==4) {<br />
gui.popupTip("APmode REV");<br />
} <br />
}<br />
}<br />
</syntaxhighlight><br />
<br />
Button settings:<br />
<syntaxhighlight lang="nasal"><br />
<button n="5"><br />
<repeatable type="bool">false</repeatable><br />
<desc>KAP140: NAV / APR / REV ; CENTURYIII:<br />
Move Hdg select button to the right (wrap)</desc><br />
<binding><br />
<command>property-adjust</command><br />
<property>autopilot/CENTURYIII/controls/mode</property><br />
<step type="double">1</step><br />
<min>0</min><br />
<max>5</max> <br />
<wrap>true</wrap> <br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
if (autopilottype==1) { <br />
kap140.navButton(); }<br />
showhorizontalmode();<br />
</script><br />
</binding><br />
<mod-shift> <br />
<binding><br />
<command>property-adjust</command><br />
<property>autopilot/CENTURYIII/controls/mode</property><br />
<step type="double">-1</step><br />
<min>0</min><br />
<max>5</max> <br />
<wrap>true</wrap> <br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script> <br />
if (autopilottype==1) { kap140.aprButton();}<br />
showhorizontalmode();<br />
</script><br />
</binding><br />
</mod-shift><br />
<mod-ctrl> <br />
<binding><br />
<command>nasal</command><br />
<script> if (autopilottype==1) { kap140.revButton();}<br />
showhorizontalmode();<br />
</script><br />
</binding><br />
</mod-ctrl><br />
</button><br />
</syntaxhighlight><br />
<br />
=== Vertical mode pitch or vertical speed selector ===<br />
Control the vertical mode.<br />
<br />
* KAP140: Button 6 increases target VS by 100 ft/min, button 7 decreases target VS by 100 ft/min<br />
* CENTURYIII: Button 6 smoothly lowers pitch (nose down), button 7 increases pitch (nose up)<br />
<br />
The opposite way these buttons work for the two types of autopilot arises from the arrangement in the cockpit. For the CENTURYIII, the pitch is controlled by a wheel, which needs to be moved up to lower the nose (similar to elevator trim wheels), whereas for the KAP140 the top button increases VS. <br />
<br />
Initialisation:<br />
<syntaxhighlight lang="nasal"><br />
var showvertical=func() {if ( autopilottype==1 ) {<br />
if ( getprop("autopilot/KAP140/locks/pitch-mode") == 1 ) {<br />
gui.popupTip(sprintf("AP VS<br />
%d",getprop("autopilot/KAP140/settings/target-pressure-rate")*(-58000)));<br />
}<br />
} elsif ( autopilottype==2 ) {<br />
gui.popupTip(sprintf("AP Pitch:%4.1f",getprop("autopilot/CENTURYIII/settings/pitch-wheel-deg")));<br />
}}<br />
</syntaxhighlight><br />
Button settings:<br />
<syntaxhighlight lang="nasal"><br />
<button n="6"><br />
<repeatable type="bool">false</repeatable><br />
<desc>AP-VS (KAP140:increase VS, CENTURYII: pitch down</desc><br />
<!-- KAP140 --><br />
<binding><br />
<command>nasal</command><br />
<script>if (autopilottype==1) {<br />
kap140.upButton();<br />
}<br />
showvertical(); <br />
</script><br />
</binding><br />
<!-- CENTURYIII --><br />
<binding><br />
<command>property-interpolate</command><br />
<property>/autopilot/CENTURYIII/settings/pitch-wheel-deg</property><br />
<value type="double">-10</value><br />
<rate>4</rate><br />
</binding><br />
<mod-up><br />
<binding><br />
<command>property-interpolate</command><br />
<property>/autopilot/CENTURYIII/settings/pitch-wheel-deg</property><br />
<property>/autopilot/CENTURYIII/settings/pitch-wheel-deg</property><br />
<rate>1</rate><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
if(autopilottype==2) { showvertical(); } <br />
</script><br />
</binding><br />
</mod-up><br />
</button><br />
<br />
<br />
#7: Autopilot VS down<br />
<button n="7"><br />
<repeatable type="bool">false</repeatable><br />
<desc>AP-dn</desc><br />
<!-- KAP140 --><br />
<binding><br />
<command>nasal</command><br />
<script>if (autopilottype==1) {<br />
kap140.downButton();<br />
}<br />
showvertical(); <br />
</script><br />
</binding><br />
<!-- CENTURYIII --><br />
<binding><br />
<command>property-interpolate</command><br />
<property>/autopilot/CENTURYIII/settings/pitch-wheel-deg</property><br />
<value type="double">10</value><br />
<rate>4</rate><br />
</binding><br />
<mod-up><br />
<binding><br />
<command>property-interpolate</command><br />
<property>/autopilot/CENTURYIII/settings/pitch-wheel-deg</property><br />
<property>/autopilot/CENTURYIII/settings/pitch-wheel-deg</property><br />
<rate>1</rate><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
if(autopilottype==2) { showvertical(); } <br />
</script><br />
</binding><br />
</mod-up><br />
</button></syntaxhighlight><br />
=== Horizontal mode direction selector ===<br />
Adjust heading bug (button 8 clockwise and button 9 anti-clockwise)<br />
<br />
With modifiers:<br /><br />
(SHIFT) coarse heading bug adjustment<br /><br />
(CTRL) adjust bank angle (CENTURY II only!)<br /><br />
(ALT) adjust radial of NAV1 (can also be used without autopilot)<br /><br />
<br />
<br />
Initialisation:<br />
<syntaxhighlight lang="nasal" ><br />
var showhdgbug=func() {if ( autopilottype==1 ) {<br />
gui.popupTip(sprintf("Heading Bug:%3d",getprop("autopilot/settings/heading-bug-deg"))); <br />
} elsif ( autopilottype==2 ) {<br />
gui.popupTip(sprintf("Hdg Bug:%3d",getprop("instrumentation/kcs55/ki525/selected-heading-deg")));<br />
}}<br />
var showroll=func() { if ( autopilottype==2 ) {<br />
gui.popupTip(sprintf("AP Roll:%2d",getprop("autopilot/CENTURYIII/settings/roll-knob-deg")));}}<br />
var showcourseselect=func() {<br />
if ( autopilottype==1 ) {<br />
gui.popupTip(sprintf("Course select:%2d",getprop("instrumentation/nav/radials/selected-deg")));<br />
} elsif ( autopilottype==2 ) {<br />
gui.popupTip(sprintf("Course select:%2d",getprop("instrumentation/kcs55/ki525/selected-course-deg")));}}<br />
</syntaxhighlight><br />
<br />
Button definition:<br />
<syntaxhighlight lang="xml" ><br />
<button n="8"><br />
<desc>Heading bug CW / Heading bug CW large steps /<br />
(CENTURYIII:)Roll knob turn right / Course select CW</desc><br />
<repeatable>true</repeatable><br />
<binding><br />
<command>property-adjust</command><br />
<property>/autopilot/settings/heading-bug-deg</property><br />
<step type="double">0.25</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>property-adjust</command><br />
<property>instrumentation/kcs55/ki525/selected-heading-deg</property><br />
<step type="double">0.25</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showhdgbug();<br />
</script><br />
</binding><br />
<mod-shift><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showhdgbug();<br />
</script><br />
</binding><br />
<binding><br />
<command>property-adjust</command><br />
<property>/autopilot/settings/heading-bug-deg</property><br />
<step type="double">2.5</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>property-adjust</command><br />
<property>instrumentation/kcs55/ki525/selected-heading-deg</property><br />
<step type="double">2.5</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showhdgbug();<br />
</script><br />
</binding><br />
</mod-shift><br />
<mod-ctrl><br />
<binding><br />
<command>property-adjust</command><br />
<property>/autopilot/CENTURYIII/settings/roll-knob-deg</property><br />
<step type="double">0.5</step><br />
<max>30</max><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showroll();<br />
</script><br />
</binding><br />
</mod-ctrl><br />
<mod-alt><br />
<binding><br />
<command>property-adjust</command><br />
<property>instrumentation/nav/radials/selected-deg</property><br />
<step type="double">0.25</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>property-adjust</command><br />
<property>instrumentation/kcs55/ki525/selected-course-deg</property><br />
<step type="double">0.25</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showcourseselect();<br />
</script><br />
</binding><br />
</mod-alt><br />
</button><br />
<br />
<br />
<button n="9"><br />
<desc>Heading bug CCW / Heading bug CCW large steps</desc><br />
<repeatable>true</repeatable><br />
<binding><br />
<command>property-adjust</command><br />
<property>/autopilot/settings/heading-bug-deg</property><br />
<step type="double">-0.25</step><br />
</binding><br />
<binding><br />
<command>property-adjust</command><br />
<property>instrumentation/kcs55/ki525/selected-heading-deg</property><br />
<step type="double">-0.25</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showhdgbug();<br />
</script><br />
</binding><br />
<mod-shift><br />
<binding><br />
<command>property-adjust</command><br />
<property>/autopilot/settings/heading-bug-deg</property><br />
<step type="double">-2.5</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>property-adjust</command><br />
<property>instrumentation/kcs55/ki525/selected-heading-deg</property><br />
<step type="double">-2.5</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showhdgbug();<br />
</script><br />
</binding><br />
</mod-shift><br />
<mod-ctrl><br />
<binding><br />
<command>property-adjust</command><br />
<property>/autopilot/CENTURYIII/settings/roll-knob-deg</property><br />
<step type="double">-0.5</step><br />
<min>-30</min><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showroll();<br />
</script><br />
</binding><br />
</mod-ctrl><br />
<mod-alt><br />
<binding><br />
<command>property-adjust</command><br />
<property>instrumentation/nav/radials/selected-deg</property><br />
<step type="double">-0.25</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>property-adjust</command><br />
<property>instrumentation/kcs55/ki525/selected-course-deg</property><br />
<step type="double">-0.25</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showcourseselect();<br />
</script><br />
</binding><br />
</mod-alt><br />
</syntaxhighlight><br />
<br />
=== Summary ===<br />
For convenience all of the above bindings are summarised into one file accessible at [http://pastebin.com/2HM9S1df pastebin] (at the time of writing identical to the combination of the snippets above but of course the pastebin might not always keep up with the Wiki - beware)</div>Wonkohttps://wiki.flightgear.org/w/index.php?title=Joystick_autopilot_bindings&diff=76731Joystick autopilot bindings2014-09-24T22:01:14Z<p>Wonko: /* Generic initialisation code */</p>
<hr />
<div>'''This page is under construction!'''<br />
<br />
== Introduction ==<br />
<br />
Before you start, read [[Input device]] and probably [[Writing Joystick Code: Part 1]]<br />
<br />
Autopilots are generally very useful features, but unfortunately there are only key bindings for the `magic autopilot', and the only way to control popular GA autopilots is by clicking the corresponding buttons in the 3D-cockpit. This is awkward if there is a need to change mode or turn off the autopilot quickly (at final stage of ILS landing, autopilot does something silly). This page describes joystick bindings, which can be used to control the (simulated) autopilot with a set of joystick buttons.<br />
Every type of autopilot is operated quite differently, such that these keys only work for specific models. In the current implementation the key bindings work for the [[Bendix/King KAP140 Autopilot]] (in the [[Cessna 172]]) and the [http://www.centuryflight.com/manuals/CENTIII.pdf CENTURY III Autopilot POH] ([[Seneca II]]).<br />
Those were prioritised, as the more complex autopilots in jets usually have a dedicated GUI but it is planned to provide bindings for at least basic functions like AUTOPILOT OFF in the future. <br />
<br />
== Implementation ==<br />
<br />
The example code provides a nice setup for six buttons arranged like this (this happens to be suitable for the Thrustmaster T16000M but it can be adapted trivially to other button numbers by simply changing the button numbers in the snippets below<br />
<br />
4 5 6<br />
9 8 7 <br />
<br />
In the following snippets for each functionality are given - usually one with the actual binding and some corresponding initialisation code (put between nasal tags at the beginning of the script). You need to copy/paste both into your joystick bindings xml file. In a [[Joystick Autopilot Bindings#Summary]] the code of all snippets is provided in one code box for convenience. Generally, it was attempted to have somewhat consistent bindings between the different autopilot types, but because they are operated quite differently, this was not entirely possible, and it was attempted to stay close to the mode of operation of the actual instruments. <br />
<br />
=== Generic initialisation code ===<br />
On startup, we need to figure out whether we are dealing with a Bendix KAP 140 or CENTURY II autopilot.<br />
<syntaxhighlight lang="nasal" ><br />
<nasal><br />
<!-- set autopilot type:<br />
1: KAP140 (e.g. c172p)<br />
2: CENTURYIII (e.g. senecaII) --><br />
<script><![CDATA[<br />
var autopilottype=0;<br />
var horizontalmode=0;<br />
if (getprop("sim/aircraft")=="c172p") {<br />
print("FOUND KAP140 autopilot");<br />
autopilottype=1;<br />
} elsif (getprop("autopilot/CENTURYIII/power")>-1) {<br />
print("Using CENTURYIII autopilot joystick binding");<br />
autopilottype=2; <br />
}<br />
....<br />
]]></script><br />
</nasal><br />
<br />
</syntaxhighlight><br />
As you can see it assumes only the Cessna 172 has the KAP-140. If there is another plane with this autopilot the condition should be adjusted<br />
<br />
=== Major mode selection ===<br />
<br />
=== Horizontal mode selection ===<br />
<br />
=== Vertical mode pitch or vertical speed selector ===<br />
<br />
=== Horizontal mode direction selector ===<br />
Adjust heading bug (button 8 clockwise and button 9 anti-clockwise)<br />
<br />
With modifiers:<br /><br />
(SHIFT) coarse heading bug adjustment<br /><br />
(CTRL) adjust bank angle (CENTURY II only!)<br /><br />
(ALT) adjust radial of NAV1 (can also be used without autopilot)<br /><br />
<br />
<br />
Initialisation:<br />
<syntaxhighlight lang="nasal" ><br />
var showhdgbug=func() {if ( autopilottype==1 ) {<br />
gui.popupTip(sprintf("Heading Bug:%3d",getprop("autopilot/settings/heading-bug-deg"))); <br />
} elsif ( autopilottype==2 ) {<br />
gui.popupTip(sprintf("Hdg Bug:%3d",getprop("instrumentation/kcs55/ki525/selected-heading-deg")));<br />
}}<br />
</syntaxhighlight><br />
<br />
Button definition:<br />
<syntaxhighlight lang="xml" ><br />
<button n="8"><br />
<desc>Heading bug CW / Heading bug CW large steps /<br />
(CENTURYIII:)Roll knob turn right / Course select CW</desc><br />
<repeatable>true</repeatable><br />
<binding><br />
<command>property-adjust</command><br />
<property>/autopilot/settings/heading-bug-deg</property><br />
<step type="double">0.25</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>property-adjust</command><br />
<property>instrumentation/kcs55/ki525/selected-heading-deg</property><br />
<step type="double">0.25</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showhdgbug();<br />
</script><br />
</binding><br />
<mod-shift><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showhdgbug();<br />
</script><br />
</binding><br />
<binding><br />
<command>property-adjust</command><br />
<property>/autopilot/settings/heading-bug-deg</property><br />
<step type="double">2.5</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>property-adjust</command><br />
<property>instrumentation/kcs55/ki525/selected-heading-deg</property><br />
<step type="double">2.5</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showhdgbug();<br />
</script><br />
</binding><br />
</mod-shift><br />
<mod-ctrl><br />
<binding><br />
<command>property-adjust</command><br />
<property>/autopilot/CENTURYIII/settings/roll-knob-deg</property><br />
<step type="double">0.5</step><br />
<max>30</max><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showroll();<br />
</script><br />
</binding><br />
</mod-ctrl><br />
<mod-alt><br />
<binding><br />
<command>property-adjust</command><br />
<property>instrumentation/nav/radials/selected-deg</property><br />
<step type="double">0.25</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>property-adjust</command><br />
<property>instrumentation/kcs55/ki525/selected-course-deg</property><br />
<step type="double">0.25</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showcourseselect();<br />
</script><br />
</binding><br />
</mod-alt><br />
</button><br />
<br />
<br />
<button n="9"><br />
<desc>Heading bug CCW / Heading bug CCW large steps</desc><br />
<repeatable>true</repeatable><br />
<binding><br />
<command>property-adjust</command><br />
<property>/autopilot/settings/heading-bug-deg</property><br />
<step type="double">-0.25</step><br />
</binding><br />
<binding><br />
<command>property-adjust</command><br />
<property>instrumentation/kcs55/ki525/selected-heading-deg</property><br />
<step type="double">-0.25</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showhdgbug();<br />
</script><br />
</binding><br />
<mod-shift><br />
<binding><br />
<command>property-adjust</command><br />
<property>/autopilot/settings/heading-bug-deg</property><br />
<step type="double">-2.5</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>property-adjust</command><br />
<property>instrumentation/kcs55/ki525/selected-heading-deg</property><br />
<step type="double">-2.5</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showhdgbug();<br />
</script><br />
</binding><br />
</mod-shift><br />
<mod-ctrl><br />
<binding><br />
<command>property-adjust</command><br />
<property>/autopilot/CENTURYIII/settings/roll-knob-deg</property><br />
<step type="double">-0.5</step><br />
<min>-30</min><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showroll();<br />
</script><br />
</binding><br />
</mod-ctrl><br />
<mod-alt><br />
<binding><br />
<command>property-adjust</command><br />
<property>instrumentation/nav/radials/selected-deg</property><br />
<step type="double">-0.25</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>property-adjust</command><br />
<property>instrumentation/kcs55/ki525/selected-course-deg</property><br />
<step type="double">-0.25</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showcourseselect();<br />
</script><br />
</binding><br />
</mod-alt><br />
</syntaxhighlight></div>Wonkohttps://wiki.flightgear.org/w/index.php?title=Joystick_autopilot_bindings&diff=76730Joystick autopilot bindings2014-09-24T21:54:49Z<p>Wonko: Begin work on this page. Done: intro, initialisation, horizontal mode direction selection</p>
<hr />
<div>'''This page is under construction!'''<br />
<br />
== Introduction ==<br />
<br />
Before you start, read [[Input device]] and probably [[Writing Joystick Code: Part 1]]<br />
<br />
Autopilots are generally very useful features, but unfortunately there are only key bindings for the `magic autopilot', and the only way to control popular GA autopilots is by clicking the corresponding buttons in the 3D-cockpit. This is awkward if there is a need to change mode or turn off the autopilot quickly (at final stage of ILS landing, autopilot does something silly). This page describes joystick bindings, which can be used to control the (simulated) autopilot with a set of joystick buttons.<br />
Every type of autopilot is operated quite differently, such that these keys only work for specific models. In the current implementation the key bindings work for the [[Bendix/King KAP140 Autopilot]] (in the [[Cessna 172]]) and the [http://www.centuryflight.com/manuals/CENTIII.pdf CENTURY III Autopilot POH] ([[Seneca II]]).<br />
Those were prioritised, as the more complex autopilots in jets usually have a dedicated GUI but it is planned to provide bindings for at least basic functions like AUTOPILOT OFF in the future. <br />
<br />
== Implementation ==<br />
<br />
The example code provides a nice setup for six buttons arranged like this (this happens to be suitable for the Thrustmaster T16000M but it can be adapted trivially to other button numbers by simply changing the button numbers in the snippets below<br />
<br />
4 5 6<br />
9 8 7 <br />
<br />
In the following snippets for each functionality are given - usually one with the actual binding and some corresponding initialisation code (put between nasal tags at the beginning of the script). You need to copy/paste both into your joystick bindings xml file. In a [[Joystick Autopilot Bindings#Summary]] the code of all snippets is provided in one code box for convenience. Generally, it was attempted to have somewhat consistent bindings between the different autopilot types, but because they are operated quite differently, this was not entirely possible, and it was attempted to stay close to the mode of operation of the actual instruments. <br />
<br />
=== Generic initialisation code ===<br />
On startup, we need to figure out whether we are dealing with a Bendix KAP 140 or CENTURY II autopilot.<br />
<syntaxhighlight lang="nasal" ><br />
<nasal><br />
<!-- set autopilot type:<br />
1: KAP140 (e.g. c172p)<br />
2: CENTURYIII (e.g. senecaII) --><br />
<script><![CDATA[<br />
var autopilottype=0;<br />
var horizontalmode=0;<br />
if (getprop("sim/aircraft")=="c172p") {<br />
print("FOUND KAP140 autopilot");<br />
autopilottype=1;<br />
} elsif (getprop("autopilot/CENTURYIII/power")>-1) {<br />
print("Using CENTURYIII autopilot joystick binding");<br />
autopilottype=2; <br />
}<br />
</syntaxhighlight><br />
As you can see it assumes only the Cessna 172 has the KAP-140. If there is another plane with this autopilot the condition should be adjusted<br />
<br />
=== Major mode selection ===<br />
<br />
=== Horizontal mode selection ===<br />
<br />
=== Vertical mode pitch or vertical speed selector ===<br />
<br />
=== Horizontal mode direction selector ===<br />
Adjust heading bug (button 8 clockwise and button 9 anti-clockwise)<br />
<br />
With modifiers:<br /><br />
(SHIFT) coarse heading bug adjustment<br /><br />
(CTRL) adjust bank angle (CENTURY II only!)<br /><br />
(ALT) adjust radial of NAV1 (can also be used without autopilot)<br /><br />
<br />
<br />
Initialisation:<br />
<syntaxhighlight lang="nasal" ><br />
var showhdgbug=func() {if ( autopilottype==1 ) {<br />
gui.popupTip(sprintf("Heading Bug:%3d",getprop("autopilot/settings/heading-bug-deg"))); <br />
} elsif ( autopilottype==2 ) {<br />
gui.popupTip(sprintf("Hdg Bug:%3d",getprop("instrumentation/kcs55/ki525/selected-heading-deg")));<br />
}}<br />
</syntaxhighlight><br />
<br />
Button definition:<br />
<syntaxhighlight lang="xml" ><br />
<button n="8"><br />
<desc>Heading bug CW / Heading bug CW large steps /<br />
(CENTURYIII:)Roll knob turn right / Course select CW</desc><br />
<repeatable>true</repeatable><br />
<binding><br />
<command>property-adjust</command><br />
<property>/autopilot/settings/heading-bug-deg</property><br />
<step type="double">0.25</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>property-adjust</command><br />
<property>instrumentation/kcs55/ki525/selected-heading-deg</property><br />
<step type="double">0.25</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showhdgbug();<br />
</script><br />
</binding><br />
<mod-shift><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showhdgbug();<br />
</script><br />
</binding><br />
<binding><br />
<command>property-adjust</command><br />
<property>/autopilot/settings/heading-bug-deg</property><br />
<step type="double">2.5</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>property-adjust</command><br />
<property>instrumentation/kcs55/ki525/selected-heading-deg</property><br />
<step type="double">2.5</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showhdgbug();<br />
</script><br />
</binding><br />
</mod-shift><br />
<mod-ctrl><br />
<binding><br />
<command>property-adjust</command><br />
<property>/autopilot/CENTURYIII/settings/roll-knob-deg</property><br />
<step type="double">0.5</step><br />
<max>30</max><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showroll();<br />
</script><br />
</binding><br />
</mod-ctrl><br />
<mod-alt><br />
<binding><br />
<command>property-adjust</command><br />
<property>instrumentation/nav/radials/selected-deg</property><br />
<step type="double">0.25</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>property-adjust</command><br />
<property>instrumentation/kcs55/ki525/selected-course-deg</property><br />
<step type="double">0.25</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showcourseselect();<br />
</script><br />
</binding><br />
</mod-alt><br />
</button><br />
<br />
<br />
<button n="9"><br />
<desc>Heading bug CCW / Heading bug CCW large steps</desc><br />
<repeatable>true</repeatable><br />
<binding><br />
<command>property-adjust</command><br />
<property>/autopilot/settings/heading-bug-deg</property><br />
<step type="double">-0.25</step><br />
</binding><br />
<binding><br />
<command>property-adjust</command><br />
<property>instrumentation/kcs55/ki525/selected-heading-deg</property><br />
<step type="double">-0.25</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showhdgbug();<br />
</script><br />
</binding><br />
<mod-shift><br />
<binding><br />
<command>property-adjust</command><br />
<property>/autopilot/settings/heading-bug-deg</property><br />
<step type="double">-2.5</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>property-adjust</command><br />
<property>instrumentation/kcs55/ki525/selected-heading-deg</property><br />
<step type="double">-2.5</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showhdgbug();<br />
</script><br />
</binding><br />
</mod-shift><br />
<mod-ctrl><br />
<binding><br />
<command>property-adjust</command><br />
<property>/autopilot/CENTURYIII/settings/roll-knob-deg</property><br />
<step type="double">-0.5</step><br />
<min>-30</min><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showroll();<br />
</script><br />
</binding><br />
</mod-ctrl><br />
<mod-alt><br />
<binding><br />
<command>property-adjust</command><br />
<property>instrumentation/nav/radials/selected-deg</property><br />
<step type="double">-0.25</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>property-adjust</command><br />
<property>instrumentation/kcs55/ki525/selected-course-deg</property><br />
<step type="double">-0.25</step><br />
<min>000</min> <!-- the property will never be allowed to go below 0 --><br />
<max>360</max> <!-- ...or above 360 --><br />
<wrap>true</wrap> <!-- when we hit 361, wrap back to 0 and vice-versa --><br />
</binding><br />
<binding><br />
<command>nasal</command><br />
<script><br />
showcourseselect();<br />
</script><br />
</binding><br />
</mod-alt><br />
</syntaxhighlight></div>Wonkohttps://wiki.flightgear.org/w/index.php?title=Input_device&diff=75595Input device2014-08-25T21:17:51Z<p>Wonko: Calibration (Linux only)</p>
<hr />
<div>Could you imagine a pilot in his or her [[:Category:Cessna|Cessna]] controlling the machine with a keyboard alone? For getting the proper feeling of flight you will need a '''joystick/yoke''' plus [[rudder]] pedals, right? <br />
<br />
FlightGear has integrated joystick support, which automatically detects any joystick, yoke, or pedals attached. Just try it! If this does work for you, lean back and be happy! You can see what FlightGear has detected your joystick as in the Help > Joystick Information dialog from the [[menu]]. <br />
<br />
Unfortunately, for the above mentioned versatility, chances are your joystick does not work out of the box. This article explains you how to make FlightGear recognise your device<br />
<br />
== Joystick or yoke? ==<br />
{| cellpadding="4" cellspacing="0" align="right" style="clear:right; background:#fafafa; font-size: 85%; border: 1px solid #CCCCCC;" <br />
|-<br />
| [[File:CH Products Fighterstick USB.jpg|x199px|CH Products Fighterstick USB]]<br />
| [[File:Saitek Pro Flight Cessna Yoke front.jpg|300px|Saitek Pro Flight Cessna Yoke]]<br />
|-<br />
| CH Products Fighterstick USB<br />
| Saitek Pro Flight Cessna Yoke<br />
|}<br />
The two most common control devices on aircraft are the joystick (left picture) and yoke (right picture). Joysticks can be found on military fighters, helicopters and Airbus [[airliner]]s, while yokes are used on almost all other fixed wing aircraft, including Boeing airliners.<br />
<br />
Joysticks are generally a lot cheaper, starting at $10. Yokes start at $100. When you are new to flightsimming, buying a cheap (ca. $20) joystick might be a good way to find out if it's something for you.<br />
<br />
The following table should help you decide which one is best suited for you:<br />
{| class="wikitable"<br />
!<br />
! Joystick<br />
! Yoke<br />
|-<br />
! style="text-align:left;" | Price<br />
| $10+<br />
| $100+<br />
|-<br />
! style="text-align:left;" | General aviation<br />
| {{no}}<br />
| {{yes}}<br />
|-<br />
! style="text-align:left;" | Helicopter<br />
| {{yes}}<br />
| {{no}}<br />
|-<br />
! style="text-align:left;" | Fighters<br />
| {{yes}}<br />
| {{no}}<br />
|-<br />
! style="text-align:left;" | Airbus<br />
| {{yes}}<br />
| {{no}}<br />
|-<br />
! style="text-align:left;" | Boeing<br />
| {{no}}<br />
| {{yes}}<br />
|}<br />
<br />
Some reviews of flight simulation hardware can be found in [[:Category:Hardware reviews]].<br />
<br />
== Built-in joystick support ==<br />
In order for joystick auto-detection to work, a joystick bindings xml file must exist for each joystick. This file describes what axes and buttons are to be used to control which functions in FlightGear. The associations between functions and axes or buttons are called "bindings".<br />
<br />
FlightGear includes a large number of such bindings files for a variety of manufacturers. Chances are high that your joystick will be recognised straight away, so let's try that first. You can confirm whether it was recognised by looking in the <tt>Help > Joystick Information</tt> dialog. "Used for" should contain a name/description of your joystick. It will contain "default" when FlightGear did not recognise your joystick.<br />
<br />
Most of the time when your joystick is not recognised, it is because of a missing name definition in the respective bindings file. Because FlightGear is used on all kind of operating systems, names vary a lot. You can find the files under <tt>[[$FG_ROOT]]/Input/Joysticks/</tt> (despite the name, yokes and pedals are also found here!). For example, if you have a CH Products joystick, look in the folder <tt>[[$FG_ROOT]]/Input/Joysticks/CH</tt> for a file that might work for your joystick. When such a file exists, do the following:<br />
# Launch FlightGear with the joystick connected.<br />
# Look under Help > Joystick Information and check the name behind "Joystick #0:". <br />
# Open your joystick's bindings file in a XML editor and add the following code to the file, below the already-present <code><name></code> tags.<br />
# <syntaxhighlight lang="xml"><name>The EXACT name you found under step 2; including spaces, capitals etc.</name></syntaxhighlight><br />
# Please report this name [http://forum.flightgear.org/viewforum.php?f=24 at our forum], so it can be added to the official file (and next releases).<br />
<br />
Please note that the latest config files are always to be found at https://gitorious.org/fg/fgdata/trees/master/Input/Joysticks. This link may contain additional binding files that were not included in the latest stable release.<br />
<br />
If there is no file for your joystick, you will have to create such a file. We will discuss that in [[Joystick#Writing or editing joystick binding xml files|a later section]], by cutting and pasting bindings from the examples that are included with FlightGear.<br />
<br />
=== Multiple devices on Windows ===<br />
In case you have two USB devices (for instance a yoke plus pedals) to a Windows computer, there may be cases, where the same driver name is reported twice. In this case, you can get at least the yoke to work by assigning it number 0 (out of 0 and 1), by adding a line to <tt>[[$FG_ROOT]]/joystick.xml</tt> like:<br />
<syntaxhighlight lang="xml"><js n="0" include="Input/Joysticks/Saitek/ST290-Pro.xml"/></syntaxhighlight><br />
if you also have pedals (or another joystick), just add more lines, similar to:<br />
<syntaxhighlight lang="xml"><js n="1" include="Input/Joysticks/Saitek/Pro-Flight-Rudder-Pedals.xml"/></syntaxhighlight><br />
<br />
To make sure that the first input device is indeed the yoke, rotate the yoke ([[aileron]] control) and observe the Help > Joystick Information dialog. If the aileron value does not change, you have to make the yoke the preferred device first. For doing so, enter the Windows "Control panel", open "Game controllers" and select the "Advanced" button. Here you can select the yoke as the "Preferred" device. Afterwards you can check that assignment by restarting FlightGear. The yoke should now control the aileron.<br />
<br />
== Adding support for your joystick ==<br />
=== Verifying your joystick is working ===<br />
==== Linux ====<br />
Reboot your system and immediately enter on the [[command line]] <br />
<br />
<syntaxhighlight lang="bash"><br />
dmesg | grep Joystick <br />
</syntaxhighlight><br />
<br />
which pipes the boot message to grep which then prints every line in the boot message that contains the string “Joystick”. When you do this with a Saitek joystick attached, you will see a line similar to this one: <br />
<br />
<syntaxhighlight><br />
input0: USB HID v1.00 Joystick [SAITEK CYBORG 3D USB] on usb2:3.0 <br />
</syntaxhighlight><br />
<br />
This line tells us that a joystick has identified itself as SAITEK CYBORG 3D USB to the operating system. It does not tell us that the joystick driver sees your joystick. You can verify that the joystick driver sees the joystick by entering:<br />
<br />
<syntaxhighlight><br />
js_demo <br />
</syntaxhighlight><br />
<br />
If your joystick is not recognized by the driver, you may have to manually load the joystick device module with the command:<br />
<br />
<syntaxhighlight><br />
modprobe joydev<br />
</syntaxhighlight><br />
<br />
==== Windows ====<br />
Go to <tt>Start > Control Panel > Game Controller</tt> and see whether the dialog displays (and responses) on your joystick. <br />
<br />
=== Confirming that the driver recognizes your joystick ===<br />
FlightGear ships with a utility called js_demo. It will report the number of joysticks attached to a system, their respective "names" and their capabilities. Under Linux, you can run js_demo from the folder /FlightGear/bin as follows: <br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /usr/local/FlightGear/bin <br />
$ js_demo<br />
</syntaxhighlight><br />
<br />
Under Windows, open a command shell (<tt>Start > All Programs > Accessories > Command Prompt</tt>), go to the FlightGear binary folder and start the program as follows (given FlightGear is installed under <tt>C:/Program Files/Flightgear</tt>) <br />
<br />
<syntaxhighlight lang="dos"><br />
C:<br />
cd /Program Files/FlightGear/bin/win32 <br />
js_demo.exe <br />
</syntaxhighlight><br />
<br />
<!--If js_demo.exe is not included in your version, download it [http://fgfs.beggabaur.de/forum/js_demo.exe here].--><br />
<br />
On our system, the first few lines of output are (stop the program with C if it is quickly scrolling past your window!) as follows: <br />
<br />
<syntaxhighlight><br />
Joystick test program. <br />
Joystick 0: “CH PRODUCTS CH FLIGHT SIM YOKE USB ” <br />
Joystick 1: “CH PRODUCTS CH PRO PEDALS USB” <br />
Joystick 2 not detected <br />
Joystick 3 not detected <br />
Joystick 4 not detected <br />
Joystick 5 not detected <br />
Joystick 6 not detected <br />
Joystick 7 not detected <br />
+——————–JS.0———————-+——————–JS.1———————-+ <br />
| Btns Ax:0 Ax:1 Ax:2 Ax:3 Ax:4 Ax:5 Ax:6 | Btns Ax:0 Ax:1 Ax:2 | <br />
+———————————————-+———————————————-+ <br />
| 0000 +0.0 +0.0 +1.0 -1.0 -1.0 +0.0 +0.0 . | 0000 -1.0 -1.0 -1.0 . . . . . | <br />
</syntaxhighlight><br />
<br />
First note that js demo reports which number is assigned to each joystick recognized by the driver. Also, note that the “name” each joystick reports is also included between quotes. We will need the names for each bindings file when we begin writing the binding xml files for each joystick.<br />
<br />
=== Identifying the numbering of axes and buttons ===<br />
Axis and button numbers can be identified using js demo as follows. By observing the output of js demo while working your joystick axes and buttons you can determine what axis and button numbers are assigned to each joystick axis and button. It should be noted that numbering generally starts with zero. <br />
<br />
The buttons are handled internally as a binary number in which bit 0 (the least significant bit) represents button 0, bit 1 represents button 1, etc., but this number is displayed on the screen in hexadecimal notation, so: <br />
<br />
* 0001 ⇒ button 0 pressed <br />
* 0002 ⇒ button 1 pressed <br />
* 0004 ⇒ button 2 pressed <br />
* 0008 ⇒ button 3 pressed <br />
* 0010 ⇒ button 4 pressed <br />
* 0020 ⇒ button 5 pressed <br />
* 0040 ⇒ button 6 pressed <br />
* ... etcp to ... <br />
* 8000 ⇒ button 15 pressed <br />
* ... and ... <br />
* 0014 ⇒ buttons 2 and 4 pressed simultaneously <br />
* ... etc. <br />
<br />
For Linux users, there is another option for identifying the “name” and the numbers assigned to each axis and button. Most Linux distributions include a very handy program, “jstest”. With a CH Product Yoke plugged into the system, the following output lines are displayed by jstest: <br />
<br />
<syntaxhighlight lang="bash"><br />
jstest /dev/js3 <br />
Joystick (CH PRODUCTS CH FLIGHT SIM YOKE USB ) has 7 axes and 12 buttons. Driver version is 2.1.0 <br />
Testing…(interrupt to exit) <br />
Axes: 0: 0 1: 0 2: 0 3: 0 4: 0 5: 0 6: 0 Buttons: 0:off 1:off 2:off 3:on 4:off 5:off 6:off 7:off 8:off 9:off 10:off 11:off <br />
</syntaxhighlight><br />
<br />
Note the “name” between parentheses. This is the name the system associates with your joystick. <br />
<br />
When you move any control, the numbers change after the axis number corresponding to that moving control and when you depress any button, the “off” after the button number corresponding to the button pressed changes to “on”. In this way, you can quickly write down the axes numbers and button numbers for each function without messing with binary.<br />
<br />
In most modern repositories, there is a graphical version of this program, called "jstest-gtk", where you are given a list of attached devices to choose from, and then get a graphical representation of all axes and buttons.<br />
<br />
=== Calibration ===<br />
For many/most joysticks this step might not be necessary. If either, the centre position of the joystick does not yield near-zero values for relevant axes, or if the maximum value for an axis cannot be reached, or is reached too early, you need to calibrate the joystick. (Note that some calibration problems can be fixed with the flighgear joystick configuration files, but not all, e.g. if the maximum value is reached too early)<br />
<br />
==== Linux ====<br />
The program "jscal" (install from repositories if not already available on your system) provides a calibration routine for joysticks. You need to know or find out the device name of your joystick (usually /dev/js0 or /dev/input/js0 - instead of 0 a different number might need to be used, look at output of js_demo to figure out which). For example to calibrate the joystick with device name /dev/input/js0, execute<br />
<syntaxhighlight lang="bash">jscal -c /dev/input/js0<br />
</syntaxhighlight><br />
and follow instructions.<br />
The calibration is retained until the joystick is unplugged, or the computer rebooted. In order to save it for future use, execute <br />
<syntaxhighlight lang="bash">jscal -p /dev/input/js0<br />
</syntaxhighlight><br />
which will print the command that needs to be entered to restore the calibration, for example<br />
<syntaxhighlight lang="bash">jscal -s 6,1,0,8171,8171,65936,65374,1,0,8166,8166,65928,65494,1,0,128,128,4194176,4227201,1,0,128,128,4194176,4227201,1,0,0,0,536854528,536854528,1,0,0,0,536854528,536854528 /dev/input/js0<br />
</syntaxhighlight><br />
Copy the command you obtained into your startup script in order to restore calibration automatically. <br />
<br />
The calibration is even more comfortable using the program "jstest-gtk", also available from most repositories. Starting this you are given a list of all attached joysticks with their device names. Pick the one you wish to inspect or calibrate and click 'Properties', then calibrate. This calibration tool offers the possibility to fine-tune the calibration by editing the numbers. The program manipulates the same internals as jscal so you can use jscal to save the calibration information for later use, as before.<br />
<br />
=== Writing or editing joystick binding xml files ===<br />
At this point, you have confirmed that the operating system and the joystick driver both recognize your joystick(s). You also know of several ways to identify the joystick “name” your joystick reports to the driver and operating system. You will need a written list of what control functions you wish to have assigned to which axis and button and the corresponding numbers. <br />
<br />
Make the following table from what you learned from js demo or jstest above (pencil and paper is fine). Here we assume there are 5 axes including 2 axes associated with the hat. <br />
<br />
{| class="prettytable"<br />
! align="center" bgcolor="#EFEFEF" | Axis<br />
! align="center" bgcolor="#EFEFEF" | Button<br />
|- <br />
|elevator = 0 <br />
|view cycle = 0 <br />
|- <br />
|rudder = 1 <br />
|all brakes = 1 <br />
|- <br />
|aileron = 2 <br />
|up trim = 2 <br />
|- <br />
|throttle = 3 <br />
|down trim = 3 <br />
|-<br />
|leftright hat = 4 <br />
|extend flaps = 4 <br />
|- <br />
|foreaft hat = 5 <br />
|retract flaps = 5 <br />
|-<br />
| <br />
|decrease RPM = 6 <br />
|-<br />
|<br />
|increase RPM = 7 <br />
|}<br />
<br />
We will assume that our hypothetical joystick supplies the “name” QUICK STICK 3D USB to the system and driver. With all the examples included with FlightGear, the easiest way to get a so far unsupported joystick to be auto detected, is to edit an existing binding xml file. Look at the xml files in the sub-folders of '''/FlightGear/Input/Joysticks/'''. After evaluating several of the xml binding files supplied with FlightGear, we decide to edit the file <tt>[[$FG_ROOT]]/Input/Joysticks/Saitek/Cyborg-Gold-3d-USB.xml</tt>.<br />
<br />
This file has all the axes functions above assigned to axes and all the button functions above assigned to buttons. This makes our editing almost trivial. <br />
<br />
Before we begin to edit, we need to choose a name for our bindings xml file, create the folder for the QS joysticks, and copy the original xml file into this directory with this name. <br />
<br />
<syntaxhighlight lang="bash"><br />
$ cd /usr/local/FlightGear/Input/Joysticks <br />
$ mkdir QS <br />
$ cd QS <br />
$ cp /usr/local/FlightGear/Input/Joysticks/Saitek/ <br />
Cyborg-Gold-3d-USB.xml QuickStick.xml <br />
</syntaxhighlight><br />
<br />
Here, we obviously have supposed a Linux/UNIX system with FlightGear being installed under '''/usr/local/FlightGear'''. For a similar procedure under Windows with FlightGear being installed under C:/Program Files/FlightGear, open a command shell and type <br />
<br />
<syntaxhighlight lang="dos"><br />
C: <br />
cd /Program Files/FlightGear/Input/Joysticks <br />
mkdir QS <br />
cd QS <br />
copy /FlightGear/Input/Joysticks/Saitek/ <br />
Cyborg-Gold-3d-USB.xml QuickStick.xml <br />
</syntaxhighlight><br />
<br />
Next, open QuickStick.xml with your favorite editor. Before we forget to change the joystick name, search for the line containing <name>. You should find the line <br />
<br />
<syntaxhighlight lang="xml"><name>SAITEK CYBORG 3D USB</name></syntaxhighlight><br />
<br />
and change it to <br />
<br />
<syntaxhighlight lang="xml"><name>QUICK STICK 3D USB</name></syntaxhighlight><br />
<br />
This line illustrates a key feature of xml statements. They begin with a <tag> and end with a </tag>. <br />
<br />
You can now compare your table to the comment table at the top of your file copy. Note that the comments tell us that the Saitek elevator was assigned to axis 1. Search for the string <br />
<br />
<syntaxhighlight lang="xml"><axis n="1"></syntaxhighlight><br />
<br />
and change this to <br />
<br />
<syntaxhighlight lang="xml"><axis n="0"></syntaxhighlight><br />
<br />
Next, note that the Saitek rudder was assigned to axis 2. Search for the string <br />
<br />
<syntaxhighlight lang="xml"><axis n="2"></syntaxhighlight><br />
<br />
and change this to <br />
<br />
<syntaxhighlight lang="xml"><axis n="1"></syntaxhighlight><br />
<br />
Continue comparing your table with the comment table for the Saitek and changing the axis numbers and button numbers accordingly. Since QUICKSTICK USB and the Saitek have the same number of axes but different number of buttons, you must delete the buttons left over. Just remember to double check that you have a closing tag for each opening tag or you will get an error using the file. <br />
<br />
Finally, be good to yourself (and others when you submit your new binding file to a FlightGear developers or users archive!), take the time to change the comment table in the edited file to match your changed axis and button assignments. The new comments should match the table you made from the js demo output. Save your edits. <br />
<br />
Several users have reported that the numbers of axes and buttons assigned to functions may be different with the same joystick under Windows and Linux. The above procedure should allow one to easily change a binding xml file created for a different operating system for use by their operating system.<br />
<br />
You can tell how FlightGear has interpretted your joystick setup by selecting <tt>Help > Joystick Information</tt> from the menu.<br />
<br />
== Joystick support via .fgfsrc entries ==<br />
Fortunately, there is a tool available now, which takes most of the burden from the average user who, maybe, is not that experienced with XML, the language which these files are written in. <br />
<br />
For configuring your joystick using this approach, open a command shell (command prompt under windows, to be found under Start|All programs|Accessories). Change to the directory <tt>[[$FG_ROOT]]/bin</tt> via e.g. (modify to your path) <br />
<br />
<syntaxhighlight lang="dos">cd C:/Program Files/FlightGear/bin</syntaxhighlight><br />
<br />
and invoke the tool fgjs via <br />
<br />
<syntaxhighlight lang="bash">./fgjs --fg-root=$FG_ROOT</syntaxhighlight><br />
<br />
on a UNIX/Linux machine, or via <br />
<br />
<syntaxhighlight lang="dos">fgjs --fg-root=$FG_ROOT</syntaxhighlight><br />
<br />
on a Windows machine. The program will tell you which joysticks, if any, were detected. Now follow the commands given on screen, i.eṁove the axis and press the buttons as required. Be careful, a minor touch already “counts” as a movement. Check the reports on screen. If you feel something went wrong, just re-start the program. <br />
<br />
After you are done with all the axis and switches, the directory above will hold a file called fgfsrc.js. If the FlightGear base directory FlightGear does not already contain an options file .fgfsrc (under UNIX)/system.fgfsrc (under Windows) mentioned above, just copy <br />
<br />
'''fgfsrc.js''' into '''.fgfsrc''' (UNIX)/'''system.fgfsrc''' (Windows) <br />
<br />
and place it into the directory FlightGear base directory FlightGear. In case you already wrote an options file, just open it as well as fgfsrc.js with an editor and copy the entries from fgfsrc.js into .fgfsrc/system.fgfsrc. One hint: The output of fgjs is UNIX formatted. As a result, Windows Editor may not display it the proper way. I suggest getting an editor being able to handle UNIX files as well. My favorite freeware file editor for that purpose, although somewhat dated, is still PFE, to be obtained from http://www.lancs.ac.uk/people/cpaap/pfe/. <br />
<br />
The the axis/button assignment of fgjs should, at least, get the axis assignments right, its output may need some tweaking. There may be axes moving the opposite way they should, the dead zones may be too small etc. For instance, I had to change <br />
<br />
<syntaxhighlight><br />
--prop:/input/joysticks/js[1]/axis[1]/binding/factor=-1.0<br />
</syntaxhighlight><br />
<br />
into <br />
<br />
<syntaxhighlight><br />
--prop:/input/joysticks/js[1]/axis[1]/binding/factor=1.0<br />
</syntaxhighlight><br />
<br />
(USB CH Flightsim Yoke under Windows XP). Thus, here is a short introduction into the assignments of joystick properties. <br />
<br />
Basically, all axes settings are specified via lines having the following structure: <br />
<br />
<syntaxhighlight><br />
--prop:/input/joysticks/js[n]/axis[m]/binding/command=property-scale <br />
--prop:/input/joysticks/js[n]/axis[m]/binding/property=/controls/steering option<br />
--prop:/input/joysticks/js[n]/axis[m]/binding/dead-band=db<br />
--prop:/input/joysticks/js[n]/axis[m]/binding/offset=os<br />
--prop:/input/joysticks/js[n]/axis[m]/binding/factor=fa<br />
</syntaxhighlight><br />
<br />
where <br />
<br />
{| class="prettytable"<br />
! align="center" bgcolor="#EFEFEF" | <br />
! align="center" bgcolor="#EFEFEF" | <br />
|- <br />
|n<br />
|number of device (usually starting with 0) <br />
|-<br />
|m<br />
|number of axis (usually starting with 0)<br />
|-<br />
|steering option<br />
|elevator, aileron, rudder, throttle, mixture, pitch <br />
|-<br />
|dead-band<br />
|range, within which signals are discarded; useful to avoid jittering for minor yoke movements<br />
|-<br />
|offset<br />
|specifies, if device not centered in its neutral position <br />
|-<br />
|factor<br />
|controls sensitivity of that axis; defaults to +1, with a value of -1 reversing the behavior <br />
|}<br />
<br />
You should be able to at least get your joystick working along these lines. Concerning all the finer points, for instance, getting the joystick buttons working, John Check has written a very useful README being included in the base package to be found under '''FlightGear/Docs/Readme/Joystick.html'''. In case of any trouble with your input device, it is highly recommended to have a look into this document.<br />
<br />
== More about programming joystick XML files ==<br />
=== General tips ===<br />
* When testing a new xml file it is best to start FlightGear via a command window (rather than the GUI interface). Any error messages will then be displayed in the terminal. Error messages will give both a message and a line number, helping you pinpoint any errors.<br />
* Errors can be detected on initial startup or at runtime. Both types of errors will be displayed in the terminal.<br />
* One of the most common errors is including a character that makes XML choke. Such characters include<br>& < --<br>These characters will cause problems even if simply included in comments or within scripts.<br />
* If your scripts contain any of these characters, you have to enclose the scripts in <script><![CDATA[...]]></script>. Alternatively, you can 'escape' the characters, ie "<" becomes "&amp;lt;".<br />
* You can reload your edited joystick file without restarting FlightGear by selecting "Debug" &gt; "Reload Input" from the main simulator window.<br />
* You can find many examples of different ways to program joysticks simply by examining the joystick xml files that are packaged with FlightGear. See the directory FlightGear/data/input/joysticks<br />
* Many advanced functions can be programmed using the Nasal scripting language. These scripts are enclosed in <script></script> tags in the XML file. Helpful:<br />
** A guide to the [[Nasal scripting language]] in FlightGear <br />
** [[Nasal FAQ]]<br />
** [[Howto: Write simple scripts in Nasal]]<br />
* You can explore the internal property tree to see many variables that can be altered using joystick buttons or axes (File/Browse Internal Properties)<br />
* You can test bits of Nasal code and do some other useful things using the Nasal Console (Debug/Nasal Console).<br />
* All Nasal code shares a common namespace, so it's possible to set a variable in one nasal binding, and to read it in another.<br />
<br />
=== Useful hints for scripts ===<br />
Some particularly useful ideas for programming scripts within joystick XML files:<br />
* getprop and setprop can be used for getting & setting properties from the internal properties tree:<br />
<syntaxhighlight lang="nasal"><br />
var brake = !getprop("/controls/gear/brake-parking");<br />
setprop("/controls/gear/brake-parking", brake);<br />
</syntaxhighlight><br />
* You can also make your own values on the property tree:<br />
<syntaxhighlight lang="nasal"><br />
setprop("/input/joysticks/js[0]/myjoystick-modifier", 1);<br />
var mod = getprop("/input/joysticks/js[0]/myjoystick-modifier");<br />
</syntaxhighlight><br />
* You can print to terminal using the print function. This is very useful for debugging.<br />
<syntaxhighlight lang="nasal"><br />
print("Just", " a ", "test");<br />
</syntaxhighlight><br />
* You can display info in FlightGear via a popup. This is useful for giving the user feedback about changes that may not be obvious via the panel. It can also be useful for debugging. Example:<br />
<br />
<syntaxhighlight lang="nasal"><br />
gui.popupTip("Parking Brake ON");<br />
</syntaxhighlight><br />
<br />
Arguments for gui.popupTip must be strings, so if you want to display other types of variables they should be formatted with something like sprintf:<br />
<br />
<syntaxhighlight lang="nasal"><br />
gui.popupTip(sprintf("Elevator trim: %d", 100 * getprop("/controls/flight/elevator-trim")));<br />
</syntaxhighlight><br />
<br />
Or<br />
<br />
<syntaxhighlight lang="nasal"><br />
thv = getprop("/controls/engines/engine[0]/mixture");<br />
gui.popupTip("Thrust vector " ~ int(thv * 120 - 20));<br />
</syntaxhighlight><br />
<br />
* You can just start using variables, ie,<br />
<syntaxhighlight lang="nasal"><br />
x = 10;<br />
</syntaxhighlight><br />
<br />
But [http://wiki.flightgear.org/index.php/Nasal_scripting_language#Variables for various reasons] it is generally better to declare variables with the "var" statement:<br />
<syntaxhighlight lang="nasal"><br />
var x = 10;<br />
</syntaxhighlight><br />
<br />
Note that "var" creates variables that are local in scope, but since all bindings for a joystick share the same scope, it will be seen across each script in the joystick file.<br />
<br />
* You can include a section of script that runs on startup to initialize variables, create functions, etc. Example:<br />
<syntaxhighlight lang="xml"><br />
<PropertyList><br />
<name type="string">My joystick name</name><br />
<name type="string">My joystick name #2</name><br />
<nasal><br />
<script><br />
#initialize variables<br />
f1 = f2 = 0;<br />
left_brake = right_brake = 0;<br />
# create a function to be used with all buttons<br />
getmod = func { getprop("/input/joysticks/js[0]/t-flight-hotas-x-modifier" ) }<br />
</script><br />
</nasal><br />
</syntaxhighlight><br />
<br />
* Sample code for firing weapons with the joystick is found on the [[Gun Effects]] page.<br />
<br />
== Related content ==<br />
{{Forum|24|Hardware}}<br />
* [[Troubleshooting input devices]]<br />
* [[Force feedback]]<br />
* [[Writing Joystick Code: Part 1]]<br />
<br />
=== External links ===<br />
* [http://www.flightgear.org/Docs/getstart/getstartch3.html#x8-360003.6 The FlightGear Manual]<br />
* [http://sourceforge.net/projects/hapticsforfg/ Force Feedback]<br />
<br />
[[Category:Hardware]]<br />
<br />
[[de:Joystick]]<br />
[[es:Joystick]]</div>Wonkohttps://wiki.flightgear.org/w/index.php?title=Douglas_C-47_Skytrain&diff=66103Douglas C-47 Skytrain2013-12-31T09:54:40Z<p>Wonko: Translation of last remaining French - add a comment about mixing lever bug</p>
<hr />
<div>{{infobox Aircraft<br />
|ready = dualcontrol<br />
|name = Douglas DC-3 C-47<br />
|image = Dc-3-splash.png<br />
|alt =<br />
|type = Civilian / Military Aircraft<br />
|livery = <br />
|authors = PAF team (FDM, Hydraulic, Electric, Dual Control, Instruments, 3D)<br /> Emmanuel Baranger (Exterior/interior 3D model)<br />
|status-fdm = 4<br />
|status-systems = 4<br />
|status-cockpit = 4<br />
|status-model = 4<br />
|fdm = YASIM<br />
|fgname = dc-3 (wheels)<br />dc-3A (Amphibius)<br />dc-3-copilot<br />dc-3-psg1<br />dc-3-psg2<br />dc-3-psg3<br />dc-3-psg4<br />
|download = http://clement.delhamaide.free.fr/PAF/Douglas-Dc3.tar.gz<br />
|development = http://equipe-flightgear.forumactif.com/t756-douglas-dc-3-c-47-part-2-2<br />
}}<br />
<br />
<br />
[[File:Dualcontrolready.png]]<br />
<br/><br />
<br/><br />
<br />
The '''Douglas DC3 C-47''' is the military version of the famous DC3 transport aircraft. Shortly before the Allied invasion, the factories of the Douglas Aircraft Company produced two of them, every hour. At the end of World War II, over 10,000 C-47 rolled from the factory.<br />
<br />
With its strength and its exceptional flight characteristics, the Douglas DC-3 has transcended time and needed to be present in Flightgear. Started by Emmanuel Baranger, members of the PAF have done great work on this aircraft. Following different orientations about the aircraft development, members of the PAF have decided to continue the development of the aircraft independently of Mr. Baranger. There is currently two versions of the DC-3 and there are differences. This page is about the presentation of PAF developed version.<br />
<center>[[File:Dc3c47-01.png|300px]] [[File:Dc3c47-02.png|300px]] [[File:Dc3c47-03.jpg||300px]]</center><br />
<br />
<center>[[File:DC3Swissairlines.png|300px]] [[File:DC3engineout.png|300px]]</center><br />
<br />
''As of 22/12/2013 the version distributed through the Flightgear Aircraft download page (Douglas-Dc3_20130107.zip) crashes on at least some computers when trying to operate mixing and propeller levers using the mouse (see [https://code.google.com/p/flightgear-bugs/issues/detail?id=1260] bug report). For the version available from the download link the levers can be operated using the typical keys ('m/M' and 'n/N') and so is flyable even though I have still experienced short freezes of a few seconds when looking around too much in the area of the levers.''<br />
<br />
== Features ==<br />
<br />
=== Dual Control ===<br />
With the DC-3, dual control is highly developed. It allows to many users to connect to one aircraft in same time.<br />
There is one place for copilot (--aircraft=dc-3-copilot) which allows to control <u>entirely</u> the DC-3. All switches and controls are available for the copilot.<br />
Then there is 4 places for passenger (--aircraft=dc-3-psg1, --aircraft=dc-3-psg2, --aircraft=dc-3-psg3, --aircraft=dc-3-psg4) which doesn't allows control of the DC-3. You are just onboard et fly with him.<br />
<br />
=== Hydraulic system ===<br />
[[File:dc3c47-hydraulic.png|160px|right|thumb|Le groupe hydraulique]]<br />
<br />
Hydraulic system of the DC-3 is very complete. He has been create as closely respecting the constructor documentation. The hydraulic system is used for these equipments :<br />
* Brakes<br />
* Landing gears<br />
* Cowl-Flaps<br />
* Flaps<br />
* Wipers<br />
<br />
In order to use one of these equipment, you need to have at least one engine running in order to have an hydraulic pressure.<br />
<br />
=== Fuel system ===<br />
The DC-3 is equipped with 2 main tanks and two auxiliary tanks. As in reality, the two auxiliary tanks are not connected to the main tanks. So if you run out of fuel in the main you can switch to the auxiliary tanks with the fuel selector located on the pedestal. You can see the amount of fuel remaining in each tank with fuel gauge and a switch located next to co-pilot.<br />
<br />
=== Electric system ===<br />
The electric system simule the charge and discharge of battery. When engines are running, batteries are charging. More you use electric equipment, more batteries are discharging.<br />
<br />
=== Paratroopers ===<br />
The DC-3 has long been used for skydiving, so it is important that they be present. To drop the paratroopers the pilot must open the cargo door (Ctrl + D) then engage the switch "Parachute signal" located on the driver side overhead.<br />
<br />
=== Options ===<br />
[[File:Dc3c47-options.png|300px|right|thumb|Le menu du DC-3 C47]]<br />
<br />
The DC-3 has a menu of options to customize it to your liking. To make it appear click on "Douglas DC3/C47" menu, then "Options."<br />
Options are :<br />
*Show Yokes = Show/hide Yokes<br />
*Show Pilot = Show/hide pilot<br />
*Show Copilot = Show/hide copilot<br />
*Details High = Show/hide 3D details (rideaux, engines, lights, extincteurs...)<br />
*Glass reflection = Show/hide reflect shader of windshield<br />
*Landing light cone = Switch between light cone and plane light about landing light<br />
*Autostart = Setup DC-3 to start engines. Click on "Autostart" then press key "s" in order to start engines<br />
*Select version = Choose interior themes<br />
*Immatriculation = Set aircraft immatriculation<br />
<br />
=== Divers ===<br />
* Many animation<br />
* 3D Cabine<br />
* Tutorials<br />
* Real sound of DC-3<br />
* More than 25 liveries<br />
<br />
<br />
== Aircraft help ==<br />
=== Startup ===<br />
# Turn Master Battery ON (situated on the left of the overhead)<br />
# Set selectors tanks on their respective main tank (rotate switch situated on the pedestal)<br />
# Engage Boost Pump left and right (situated on the right of the overhead)<br />
# Set magneto at "both" (situated at the middle of the overhead)<br />
# Engage left starter switch then right starter switch (situated on the right of the overhead)<br />
# Desengage break parking (Shift + b)<br />
<br />
You are now ready to align yourself on the runway.<br />
<br />
<br />
=== Take-off ===<br />
<br />
# Go to the runway threshold<br />
# Make sure the flaps are retracted<br />
# Set Cowl-Flaps valves on "Trail" (to the right of copilot)<br />
# Release the parking brake (Shift + b)<br />
# Align yourself with the track -''Make sure you're aligned face to the wind!''-. You can unlock the tail wheel by flipping the lever at the bottom of the pedestal from right to left ( l )<br />
# Lock the tail wheel by flipping the lever at the bottom of the pedestal from left to right ( l )<br />
# Set the mixture on "Auto Rich"<br />
# Increase to maximum the propeller pitch<br />
# Set full throttle<br />
# Gently pull the stick so that the tail of the aircraft stays on the ground a few seconds to the lead in the first few meters of acceleration.<br />
# During taking speed you will be very focused to correct the path of the DC-3.<br />
# Arrived at 55/60 kts release the handle, the tail will rise.<br />
# Now the tail is lifted be extremely focussed on keeping the plane centred on the runway line. Use the rudder and, if necessary, the left and right brake. ''This part is very tricky but with a little practice it can be done''<br />
<!-- Maintenant que la queue est levée soyez extrêmement concentré sur la trajectoire à suivre et corrigez la moindre petite déviation. Utilisez le palonnier pour cela, et si besoin le frein gauche ou droit. - ''Cette étape est très délicate mais avec un peu d’entraînement c'est réalisable'' - --><br />
# Continue to take speed to 70-80 kts and then gently pull on the handle.<br />
# You begin to leave the ground, begin immediately to increase the trim to facilitate your ascension<br />
<br />
=== Climb ===<br />
<br />
=== Cruising ===<br />
<br />
=== Landing ===<br />
<br />
=== Speeds & limits ===<br />
<br />
''Speeds in KIAS (Knots indicated airspeed) : airspeed indicated''<br />
<br />
{| class="speds"<br />
|-<br />
| '''V<sub>SO</sub>''' || Stall speed in landing configuration || '''64 KIAS'''<br />
|-<br />
| '''V<sub>S1</sub>''' || Stall speed || '''68 KIAS'''<br />
|-<br />
| '''V<sub>MC</sub>''' || Min. control speed with Critical engine inoperative || '''76 KIAS'''<br />
|-<br />
| '''V<sub>1</sub>/V<sub>2</sub>''' || Take-off decision/safety speed || '''84 KIAS'''<br />
|-<br />
| '''V<sub>R</sub>''' || Nose-wheel take off speed || '''84 KIAS'''<br />
|-<br />
| '''V<sub>X</sub>''' || Speed with best angle of climb || '''84 KIAS'''<br />
|-<br />
| '''V<sub>X<sub>se</sub></sub>''' || Best angle of climb with a single op. engine || '''84 KIAS'''<br />
|-<br />
| '''V<sub>Y</sub>''' || Speed with best rate of climb || '''91 KIAS'''<br />
|-<br />
| '''V<sub>Y<sub>se</sub></sub>''' || Best rate of climb with a single op. engine || '''95 KIAS'''<br />
|-<br />
| '''V<sub>LO</sub>''' || Max. landing gear operating speed || '''84 KIAS'''<br />
|-<br />
| '''V<sub>A</sub>''' || Design max. manoeuvring speed || '''120 KIAS'''<br />
|-<br />
| '''V<sub>NO</sub>''' || Max. structural cruising speed || '''158 KIAS'''<br />
|-<br />
| '''V<sub>NE</sub>''' || Never exceed speed || '''190 KIAS'''<br />
|-<br />
| '''V<sub>LE</sub>''' || Maximum landing gear extended speed || '''148 KIAS'''<br />
|-<br />
| '''V<sub>F</sub>''' || Designed flap speed with 1/4 flaps || '''135 KIAS'''<br />
|-<br />
| '''V<sub>F</sub>''' || Designed flap speed with 1/2 flaps || '''99 KIAS'''<br />
|-<br />
| '''V<sub>F</sub>''' || Designed flap speed with full flaps || '''97 KIAS'''<br />
|}<br />
<br />
<br />
=== Links ===<br />
* http://helijah.free.fr/flightgear/les-appareils/dc3/appareil.htm<br />
* http://www.thedc-3network.com/download.htm<br />
* http://clement.delhamaide.free.fr/PAF/Douglas-Dc3.tar.gz<br />
<br />
{{Douglas}}<br />
<br />
[[fr:Douglas DC-3-C47]]<br />
<br />
[[Category:Airliners]]<br />
[[Category:Twin Engine Piston]]<br />
[[Category:Military transport aircraft]]<br />
[[Category:Dual control aircraft| ]]</div>Wonkohttps://wiki.flightgear.org/w/index.php?title=Douglas_C-47_Skytrain&diff=66102Douglas C-47 Skytrain2013-12-31T09:35:49Z<p>Wonko: Update broken download link</p>
<hr />
<div>{{infobox Aircraft<br />
|ready = dualcontrol<br />
|name = Douglas DC-3 C-47<br />
|image = Dc-3-splash.png<br />
|alt =<br />
|type = Civilian / Military Aircraft<br />
|livery = <br />
|authors = PAF team (FDM, Hydraulic, Electric, Dual Control, Instruments, 3D)<br /> Emmanuel Baranger (Exterior/interior 3D model)<br />
|status-fdm = 4<br />
|status-systems = 4<br />
|status-cockpit = 4<br />
|status-model = 4<br />
|fdm = YASIM<br />
|fgname = dc-3 (wheels)<br />dc-3A (Amphibius)<br />dc-3-copilot<br />dc-3-psg1<br />dc-3-psg2<br />dc-3-psg3<br />dc-3-psg4<br />
|download = http://clement.delhamaide.free.fr/PAF/Douglas-Dc3.tar.gz<br />
|development = http://equipe-flightgear.forumactif.com/t756-douglas-dc-3-c-47-part-2-2<br />
}}<br />
<br />
<br />
[[File:Dualcontrolready.png]]<br />
<br/><br />
<br/><br />
<br />
The '''Douglas DC3 C-47''' is the military version of the famous DC3 transport aircraft. Shortly before the Allied invasion, the factories of the Douglas Aircraft Company produced two of them, every hour. At the end of World War II, over 10,000 C-47 rolled from the factory.<br />
<br />
With its strength and its exceptional flight characteristics, the Douglas DC-3 has transcended time and needed to be present in Flightgear. Started by Emmanuel Baranger, members of the PAF have done great work on this aircraft. Following different orientations about the aircraft development, members of the PAF have decided to continue the development of the aircraft independently of Mr. Baranger. There is currently two versions of the DC-3 and there are differences. This page is about the presentation of PAF developed version.<br />
<center>[[File:Dc3c47-01.png|300px]] [[File:Dc3c47-02.png|300px]] [[File:Dc3c47-03.jpg||300px]]</center><br />
<br />
<center>[[File:DC3Swissairlines.png|300px]] [[File:DC3engineout.png|300px]]</center><br />
== Features ==<br />
<br />
=== Dual Control ===<br />
With the DC-3, dual control is highly developed. It allows to many users to connect to one aircraft in same time.<br />
There is one place for copilot (--aircraft=dc-3-copilot) which allows to control <u>entirely</u> the DC-3. All switches and controls are available for the copilot.<br />
Then there is 4 places for passenger (--aircraft=dc-3-psg1, --aircraft=dc-3-psg2, --aircraft=dc-3-psg3, --aircraft=dc-3-psg4) which doesn't allows control of the DC-3. You are just onboard et fly with him.<br />
<br />
=== Hydraulic system ===<br />
[[File:dc3c47-hydraulic.png|160px|right|thumb|Le groupe hydraulique]]<br />
<br />
Hydraulic system of the DC-3 is very complete. He has been create as closely respecting the constructor documentation. The hydraulic system is used for these equipments :<br />
* Brakes<br />
* Landing gears<br />
* Cowl-Flaps<br />
* Flaps<br />
* Wipers<br />
<br />
In order to use one of these equipment, you need to have at least one engine running in order to have an hydraulic pressure.<br />
<br />
=== Fuel system ===<br />
The DC-3 is equipped with 2 main tanks and two auxiliary tanks. As in reality, the two auxiliary tanks are not connected to the main tanks. So if you run out of fuel in the main you can switch to the auxiliary tanks with the fuel selector located on the pedestal. You can see the amount of fuel remaining in each tank with fuel gauge and a switch located next to co-pilot.<br />
<br />
=== Electric system ===<br />
The electric system simule the charge and discharge of battery. When engines are running, batteries are charging. More you use electric equipment, more batteries are discharging.<br />
<br />
=== Paratroopers ===<br />
The DC-3 has long been used for skydiving, so it is important that they be present. To drop the paratroopers the pilot must open the cargo door (Ctrl + D) then engage the switch "Parachute signal" located on the driver side overhead.<br />
<br />
=== Options ===<br />
[[File:Dc3c47-options.png|300px|right|thumb|Le menu du DC-3 C47]]<br />
<br />
The DC-3 has a menu of options to customize it to your liking. To make it appear click on "Douglas DC3/C47" menu, then "Options."<br />
Options are :<br />
*Show Yokes = Show/hide Yokes<br />
*Show Pilot = Show/hide pilot<br />
*Show Copilot = Show/hide copilot<br />
*Details High = Show/hide 3D details (rideaux, engines, lights, extincteurs...)<br />
*Glass reflection = Show/hide reflect shader of windshield<br />
*Landing light cone = Switch between light cone and plane light about landing light<br />
*Autostart = Setup DC-3 to start engines. Click on "Autostart" then press key "s" in order to start engines<br />
*Select version = Choose interior themes<br />
*Immatriculation = Set aircraft immatriculation<br />
<br />
=== Divers ===<br />
* Many animation<br />
* 3D Cabine<br />
* Tutorials<br />
* Real sound of DC-3<br />
* More than 25 liveries<br />
<br />
<br />
== Aircraft help ==<br />
=== Startup ===<br />
# Turn Master Battery ON (situated on the left of the overhead)<br />
# Set selectors tanks on their respective main tank (rotate switch situated on the pedestal)<br />
# Engage Boost Pump left and right (situated on the right of the overhead)<br />
# Set magneto at "both" (situated at the middle of the overhead)<br />
# Engage left starter switch then right starter switch (situated on the right of the overhead)<br />
# Desengage break parking (Shift + b)<br />
<br />
You are now ready to align yourself on the runway.<br />
<br />
<br />
=== Take-off ===<br />
<br />
# Go to the runway threshold<br />
# Make sure the flaps are retracted<br />
# Set Cowl-Flaps valves on "Trail" (to the right of copilot)<br />
# Release the parking brake (Shift + b)<br />
# Align yourself with the track -''Make sure you're aligned face to the wind!''-. You can unlock the tail wheel by flipping the lever at the bottom of the pedestal from right to left ( l )<br />
# Lock the tail wheel by flipping the lever at the bottom of the pedestal from left to right ( l )<br />
# Set the mixture on "Auto Rich"<br />
# Increase to maximum the propeller pitch<br />
# Set full throttle<br />
# Gently pull the stick so that the tail of the aircraft stays on the ground a few seconds to the lead in the first few meters of acceleration.<br />
# During taking speed you will be very focused to correct the path of the DC-3.<br />
# Arrived at 55/60 kts release the handle, the tail will rise.<br />
# Maintenant que la queue est levée soyez extrêmement concentré sur la trajectoire à suivre et corrigez la moindre petite déviation. Utilisez le palonnier pour cela, et si besoin le frein gauche ou droit. - ''Cette étape est très délicate mais avec un peu d’entraînement c'est réalisable'' -<br />
# Continue to take speed to 70 kts and then gently pull on the handle.<br />
# You begin to leave the ground, begin immediately to increase the trim to facilitate your ascension<br />
<br />
=== Climb ===<br />
<br />
=== Cruising ===<br />
<br />
=== Landing ===<br />
<br />
=== Speeds & limits ===<br />
<br />
''Speeds in KIAS (Knots indicated airspeed) : airspeed indicated''<br />
<br />
{| class="speds"<br />
|-<br />
| '''V<sub>SO</sub>''' || Stall speed in landing configuration || '''64 KIAS'''<br />
|-<br />
| '''V<sub>S1</sub>''' || Stall speed || '''68 KIAS'''<br />
|-<br />
| '''V<sub>MC</sub>''' || Min. control speed with Critical engine inoperative || '''76 KIAS'''<br />
|-<br />
| '''V<sub>1</sub>/V<sub>2</sub>''' || Take-off decision/safety speed || '''84 KIAS'''<br />
|-<br />
| '''V<sub>R</sub>''' || Nose-wheel take off speed || '''84 KIAS'''<br />
|-<br />
| '''V<sub>X</sub>''' || Speed with best angle of climb || '''84 KIAS'''<br />
|-<br />
| '''V<sub>X<sub>se</sub></sub>''' || Best angle of climb with a single op. engine || '''84 KIAS'''<br />
|-<br />
| '''V<sub>Y</sub>''' || Speed with best rate of climb || '''91 KIAS'''<br />
|-<br />
| '''V<sub>Y<sub>se</sub></sub>''' || Best rate of climb with a single op. engine || '''95 KIAS'''<br />
|-<br />
| '''V<sub>LO</sub>''' || Max. landing gear operating speed || '''84 KIAS'''<br />
|-<br />
| '''V<sub>A</sub>''' || Design max. manoeuvring speed || '''120 KIAS'''<br />
|-<br />
| '''V<sub>NO</sub>''' || Max. structural cruising speed || '''158 KIAS'''<br />
|-<br />
| '''V<sub>NE</sub>''' || Never exceed speed || '''190 KIAS'''<br />
|-<br />
| '''V<sub>LE</sub>''' || Maximum landing gear extended speed || '''148 KIAS'''<br />
|-<br />
| '''V<sub>F</sub>''' || Designed flap speed with 1/4 flaps || '''135 KIAS'''<br />
|-<br />
| '''V<sub>F</sub>''' || Designed flap speed with 1/2 flaps || '''99 KIAS'''<br />
|-<br />
| '''V<sub>F</sub>''' || Designed flap speed with full flaps || '''97 KIAS'''<br />
|}<br />
<br />
<br />
=== Links ===<br />
* http://helijah.free.fr/flightgear/les-appareils/dc3/appareil.htm<br />
* http://www.thedc-3network.com/download.htm<br />
* http://clement.delhamaide.free.fr/PAF/Douglas-Dc3.tar.gz<br />
<br />
{{Douglas}}<br />
<br />
[[fr:Douglas DC-3-C47]]<br />
<br />
[[Category:Airliners]]<br />
[[Category:Twin Engine Piston]]<br />
[[Category:Military transport aircraft]]<br />
[[Category:Dual control aircraft| ]]</div>Wonkohttps://wiki.flightgear.org/w/index.php?title=Beechcraft_B1900D&diff=64765Beechcraft B1900D2013-11-24T05:07:26Z<p>Wonko: </p>
<hr />
<div>{{infobox Aircraft<br />
|image = Beechcraft B1900D.png<br />
|name = Beechcraft B1900D<br />
|type = Airliner<br />
|livery = Air New Zealand, Central Mountain Air, Northern Thunderbird Air<br />
|liverydbid = 21<br />
|authors = Syd Adams (3D model/FDM), Jean-Yves Lefort (MKVIII gpws)<br />
|fdm = YASim<br />
|status-fdm = <br />
|status-systems = <br />
|status-cockpit = <br />
|status-model = <br />
|fgname = b1900d<br />
|download = <br />
}}<br />
[[File:b1900d-cockpit-pano.jpg|thumb|270px|[[Howto: Make full spherical panorama|A full spherical panorama]] of the 3d Beechcraft B1900d cockpit]]<br />
<br />
The '''Beechcraft 1900''' series [[aircraft]] is the most popular 19-passenger [[:Category:Airliners|airliner]] in history. It is a pressurized, twin-engine [[Powerplant#Turboprop|turboprop]] manufactured by the [[Beechcraft|Beechcraft Division]] of the Raytheon Company (now Hawker Beechcraft). Designed primarily as an all weather regional airliner capable of landing on relatively short runways it has also been used by the United States military and other governments.<br />
<br />
Beech announced the improved '''1900D''', simulated here, at the US Regional Airlines Association meeting in 1989. The main difference in the 1900D was the substantially deeper fuselage allowing stand up headroom in the cabin. It also had larger passenger and cargo doors and windows, twin ventral strakes and auxiliary horizontal fixed tails. To carry the extra weight Beech upgraded to two PT6A-67D engines, each rated at 1,279 shaft horsepower. Although rarely used a fully fueled Beechcraft 1900 has a range of 860 miles.<br />
<br />
The Beechcraft B1900D is one of the default aircraft in [[FlightGear]] and has been available since [[FlightGear 0.9.8]]. <br />
<br />
== Procedures ==<br />
<br />
=== Starting Procedure ===<br />
[[File:Beechcraft_B1900D.JPG|thumb|270px|Cockpit of the B1900D]]<br />
In the menu bar at the top of the screen you may select B1900D and then Autostart. You may also choose to start-up manually. In the help menu you will find a start up tutorial this is a quick summary.<br />
<br />
* Switch on the battery<br />
* Switch on the left and right generators located on the lower left pilots panel. This should bring up the electrical systems and you should have instrumentation lights <br />
* Switch on the AC BUSs above the generator switches<br />
* Switch on the avionics located just below the battery and generator switches.<br />
* Look at the throttle panel in between the pilot and co-pilot. The two far right levers are labeled Condition. Move them fully forward by clicking at the top of the lever slots or by pressing “m”. You should now hear the engines starting up.<br />
* Move the levers labeled Propeller forward by clicking at the top of the lever slots or by pressing “n”.<br />
* Move the levers labeled Throttle to the idle position by clicking at the top of the lever slots or by pressing “9” or “PAGEUP”. <br />
* Switch on Master Panel and any lights needed on the left side of the overhead console.<br />
* Reset the Master Caution Warning in the middle top of the pilot panel that is probably flashing red now that all systems are powered up.<br />
* The aircraft is now ready for take off.<br />
<br />
=== Takeoff ===<br />
* Decision at 105 KIAS<br />
* Rotation at 110 KIAS <br />
* Pitch 10-15 degrees<br />
* Trim before engaging autopilot<br />
<br />
=== Climb ===<br />
* Airspeed 160 KIAS<br />
* Climb Rate 1500 fpm<br />
<br />
=== Cruise ===<br />
* 220 –240 KIAS<br />
<br />
=== Descent ===<br />
* 180 KIAS<br />
* Descent Rate –1500 fpm<br />
<br />
=== Approach ===<br />
* Establish 150 KIAS<br />
* Set flaps to approach<br />
* Establish 130 KIAS<br />
* Landing gear down – set flaps full down<br />
* Final glide slope 110 KIAS<br />
<br />
=== Landing ===<br />
* 100 KIAS<br />
* Main wheels down first<br />
* Lower nose gear<br />
<br />
=== [[V Speeds]] ===<br />
{| class="wikitable"<br />
|-<br />
|Stall speed, dirty (Vs0)||88 kts<br />
|-<br />
|Stall speed, clean (Vs1)||104 kts<br />
|-<br />
|Best angel of climb (Vx)||123 kts<br />
|-<br />
|Best rate of climb (Vy)||135 kts<br />
|-<br />
|Maneuvering speed (Va)||184 kts<br />
|-<br />
|Never exceed speed (Vne)||247 kts<br />
|}<br />
<ref>{{cite web |url=http://aerolinea.simpilots.es/descargas/Beechcraft_b1900d.pdf |title=Beechcraft B1900D Aircraft Operating Manuals |publisher=SimPilots }}</ref><br />
<br />
== [[GPS]] ==<br />
The B1900D is equipped with a functioning [[Avionics_and_instruments#Further_instruments|Bendix/King KLN 908]] [[GPS]] that can be slaved to the autopilot. In the help menu you will find a tutorial on [[GPS]] navigation.<br />
<br />
== Liveries ==<br />
Apart from the two liveries (SWISS AIR FORCE and AIR NEW ZEALAND) that comes with the b1900d aircraft, it is possible to download more on the [http://liveries.flightgear.org/aircraft.php?display=2&id=21 FlightGear Livery Database].<br />
<br />
== Notes ==<br />
* The glas panel instruments (artificial horizon and horizontal situation indicator) don't show up with Rembrandt rendering<br />
{{Appendix}}<br />
<br />
{{Beechcraft}}<br />
<br />
[[Category:Airliners]]<br />
[[Category:Twin-engined aircraft]]<br />
[[fr:Beechcraft B1900D]]</div>Wonkohttps://wiki.flightgear.org/w/index.php?title=Cessna_Citation_X&diff=64571Cessna Citation X2013-11-15T23:14:53Z<p>Wonko: Autopilot instructions</p>
<hr />
<div>{{infobox Aircraft<br />
|image = CessnaCitationX.jpg<br />
|name = Cessna Citation X<br />
|type = Business Jet<br />
|status-fdm = 3<br />
|status-systems = 3<br />
|status-cockpit = 3<br />
|status-model = 3<br />
|livery = Stripes<br />
|authors = Syd Adams<br />
|fdm = YASim<br />
|status = Development<br />
|fgname = CitationX<br />
}}<br />
The '''Cessna Citation X''' (X as in the Roman numeral for ten, not the letter) is a long range medium business jet aircraft. The X is currently the fastest civilian jet in production with a top speed of Mach 0.92 (703 mph). This also makes it the fastest business jet in history. The Citation X is powered by two Rolls-Royce turbofan engines and is built by the [[Cessna Aircraft Company]] in Wichita, Kansas. The Citation brand of business jets encompasses six distinct "families" of aircraft. Although based on the earlier Citation III, VI and VII models the Citation X is a significantly different airplane. It utilizes a totally new wing design, engines, and features a glass cockpit.<br />
<br />
== Aircraft help ==<br />
<br />
=== Startup ===<br />
(following the procedure in the tutorial) <br />
<br />
[[File:Citationx-power+avionics.png|400px|Screenshot of Citation X cockpit detail (Power and Avionics panel) with buttons to press during startup highlighted.Designer of Flightgear Citation X plane: Syd Adams]]<br />
<br />
Power and Avionics panel in front of pilot:<br />
* Battery L + R switches on<br />
* Generator L + R switches on<br />
* Avionics switch on<br />
* Ignition L + R on<br />
Lights:<br />
* Gnd/Rec anticoll on (on lower central panel on co-pilot side)<br />
* Taxi on (central console - copilot side, next to flaps)<br />
Start Engines:<br />
* Throttle: to idle<br />
* Press Engine starter button L+R<br />
* Throttle: spool up<br />
=== Taxi ===<br />
* Nav lights on<br />
* Release parking: Shift-B<br />
* Max Taxiing speed 20 kts<br />
<br />
=== Take Off ===<br />
Preparation<br />
* Landing lights on (central panel)<br />
* Recog on <br />
* Taxi light off<br />
* Flaps 5 deg<br />
Take Off<br />
* Thrust: TO (take/off ~95%)<br />
Note that you will lose tiller control at about 50 knots and no more control on yaw is possible; make sure you are aligned well before reaching this speed<br />
* Vr=130 kts (pull hard on yoke such that front wheels leave ground)<br />
* V2=140 kts (rear wheels leave ground) <br />
* Retract landing gear as soon as you have left the ground (G)<br />
* 1500 ft above ground: flaps up<br />
Climb out<br />
* Landing lights off<br />
* 250 kts (do not exceed below 10000 ft)<br />
* 280 kts (above 10000 ft)<br />
* At Transition Altitude set altimeter to 29.92 (1013)<br />
* Max speed 345 kts at FL240-280 (24000-28000 ft)<br />
=== Approach and Landing ===<br />
* Descent speed (280 kts to FL120, 250 kts below 10000 fts)<br />
* Turn on landing lights<br />
* Reduce speed (throttle to idle) <br />
* 180 kts Flaps 5 deg<br />
* 140 kts Flaps 15 deg<br />
* 130 kts lower landing gear <br />
At final stretch toward runway<br />
* 125 kts Flaps 35 deg<br />
* 120 kts Landing speed<br />
After touchdown<br />
* Lower nose wheel<br />
* Deploy spoilers (Ctrl-B)<br />
* Reverse thrust (del)<br />
* at 60 knots: cancel reverse (del)<br />
* Manual brakes <br />
Taxi <br />
* flaps up<br />
* Landing lights off<br />
* Recog light off<br />
* Taxi light on<br />
* max 20 kts<br />
<br />
<!-- During descent use the auto-pilot (VS mode) to control the rate of descent, and the throttle to control airspeed.--><br />
In order to effect the initial speed reduction, place the throttle in idle. As you deploy the larger flaps levels (15+) the aircraft can slow down quite quickly, and you will have to carefully use throttle and elevators to avoid a dramatic loss of airspeed and stall. Particularly for the full flaps extension it is very difficult to maintain sufficient airspeed to prevent fast descent so deploy these only when you are really close to the runway. <br />
<br />
<br />
=== The autopilot ===<br />
[[File:Citation-x-autopilot.png|thumb|Cockpit screenshot with highlighting of autopilot features (designer of Citation X plane: Syd Adams]]<br />
<br />
''As of version 2.12, the autopilot appears to still have some stability issues, and using either the horizontal localiser or glideslope locking of an ILS signal caused the autopilot to put me into a highly unstable situation (extreme bank angle, upside down), although on the forum I have read of others who have not experienced these difficulties and apparently have carried out semi-automatic landings with the Citation X autopilot. If you encounter instability in any other autopilot mode you can try to turn off auto-coordination (i.e. do not use option --enable-auto-coordination option, which links rudder to aileron movements). Also you must only engage the autopilot from a stable situation, i.e. level or small bank and pitch angles. Please note that I have no knowledge of the internals of the autopilot, so some of the information below might be inaccurate''<br />
<br />
Before the flight you should set the route in the [[route manager]]. In the explanation it is assumed you are familiar with basic autopilot operation in the Cessna, although the Citation X autopilot differs in many aspects. This description is not an exhaustive description of the autopilot modes, but rather a summary that should be sufficient to get you started.<br />
<br />
The autopilot can be controlled either from the unit at the top of the instrument panel (marked in red), or from the dedicated GUI menu (F11) (marked in green). The keys in the cockpit will light up according to which autopilot mode you are in - no direct visual feedback is associated with key presses in the GUI window but the actual mode is shown in the top of the window. The current horizontal and vertical mode are shown in the top part of the GUI window as well as in the top of the primary flight display (PFD, the left glas panel on pilot side).<br />
<br />
Basic mode<br />
* AP: engages/disengages the autopilot - this switch works as a toggle switch. On first engaging the autopilot, it will reduce the bank angle to zero and keep the pitch direction. You can adjust the pitch with the 'nose' up/dn wheel on the autopilot unit, or equivalently the UP and DN buttons on the GUI. It is no longer possible to control the attitude or climb and sink rate directly with the elevator as the autopilot will adjust the elevator trim to counter any movement of the yoke. <br />
(Note that this behaviour is slightly different to that described in <ref>[http://www.scribd.com/doc/78382264/Cessna-Citation-X-Instrumentation-and-Avionics]</ref>)<br />
* STBY: cancel all horizontal and vertical modes and revert to basic mode of pitch and roll control<br />
<br />
Horizontal modes<br />
* HDG: turn into the direction set by the heading bug and follow it. Although there is a cockput knob for adjusting this in the central console on both the pilot and co-pilot side, it is not practical to use unless you have multiple views enabled or use the autopilot GUI as you cannot at the same time operate the knob and look and its effect. So the best way is to use the GUI to set this. The current position of the heading bug is shown on the horizontal indicator in the centre bottom part of the PFD and as a number in the bottom left of the PFD.<br />
* NAV: Navigation mode. ''Choosing the NAV source:'' For this you use the two buttons NAV and FMS in the unit above the PFD (marked blue) (or equivalent buttons in the GUI). NAV will select the VOR tracking mode (pressing it will toggle between tracking NAV1 and NAV2 receivers), and FMS will follow the flight plan defined through the [[route manager]]. Note that changing from FMS to NAV1 or NAV2 mode and vice versa will disengage all horizontal and vertical modes and put autopilot into standby mode. In the NAV mode the autopilot will intercept and then track the selected radial of the VOR station similar to a Cessna. The radial can be selected in the GUI, with the knob in the central panel or with the knob in the auxiliary HSI. Both HDG and NAV mode can be engaged at the same time - in this case the HDG bug will select the intercept direction. The HDG mode will automatically disengage when the autopilot turns to line up with the radial. In the FMS mode, the plane will fly from waypoint to waypoint, starting with the currently active one (the horizontal mode indicator then shows LNAV). <br />
''The NAV mode AP might not be stable when the NAV receiver is tuned to an ILS frequency''<br />
<br />
Vertical modes<br />
* VS: set the vertical speed in ft/min. If the mode is engaged the target sink or climb rate is indicated as a light blue number above the vertical speed indicator in the PFD<br />
* ALT: when this button is pressed the current altitude will be held. The target altitude can be adjusted in the GUI (ASEL) or (theoretically) with the ASEL knob on the co-pilot side of the central panel. The altitude is specified in terms of flight level (hundreds of feet), and the target altitude is also shown as purple number above the altitude indicator in the PFD<br />
* FLC (Flight Level Change): In this mode a target airspeed is set (indicated as number above the air speed indicator in PFD), which the autopilot will match by lowering the nose if the plane is too slow, and raising it, when it is too fast. This mode will automatically disengage when reaching the target altitude. Conversely, if you are already flying at the pre-selected altitude (or have recently pressed ALT), then this mode does not even engage.<br />
* VNAV This button can only be pressed if a route has been defined and the FMS mode has been selected. It will then follow the preset altitudes defined the [[route manager]] (again as flight level, i.e. in hundreds of feet). ''Watch out: if no altitude has been defined for a waypoint then a default altitude of 0 ft seems to be assumed. This might get you into serious trouble, of course.''<br />
<br />
Combined modes<br />
* APP: Approach mode is supposed to first intercept and track localiser of ILS beacon, and then intercept and follow the glideslope. On my trials this resulted in unstable AP behaviour.<br />
* BC: Back-course follows an ILS radial in the opposite direction (e.g. for landing from the opposite side). After I could not get APP to work properly I did not bother testing this mode.<br />
<br />
Modifier switches<br />
* BANK: (relevant for horizontal modes) Limit bank angle to 17° making for wider turns - generally good idea to have this depressed while cruising<br />
<br />
The CO and YD buttons are active buttons in the cockpit but do not seem to have any effect.<br />
<br />
=== Configuration speed limits <ref>(Citation X - Section III Instrument and Avionics)[http://www.scribd.com/doc/78382264/Cessna-Citation-X-Instrumentation-and-Avionics]</ref> ===<br />
<br />
{| class="wikitable"<br />
|-<br />
|Flaps 5 deg||250 kts<br />
|-<br />
|Flaps 15 deg||210 kts<br />
|-<br />
|Flaps >15 deg||180 kts<br />
|-<br />
|Gear down || 210 kts<br />
|}<br />
<br />
=== When and how fast to descend? ===<br />
<br />
The following rules-of-thumb apply will give you a glide slope angle of 3 deg and are easily worked out using basic trigonometry.<br />
* Altitude above airport ground (ft) should be about 318 times distance left to fly to runway head (nm)<br />
<br />
Examples: <br />
# You are flying at 20000 ft, and the airport is at 1000 ft. Your descent should start at about (20000-1000)/318 ~ 60 nm left to fly<br />
# You are 10 nm from the airport. Your altitude should be airport altitude plus 318*10 ~ 3200 ft<br />
<br />
* Assuming you are at about the correct altitude your vertical descent speed (ft/min) should be 5.3 times your speed relative ground (kts, from GPS, NOT airspeed)<br />
<br />
Example:<br />
# You are flying at 200 kts rel. ground. Your vertical descent speed should be 200*5.3=1060 ft /min<br />
<br />
<br />
== References ==<br />
<references/><br />
<br />
== Related content ==<br />
* [[FlightGear Newsletter April 2011#Aircraft reviews|Click here]] for a review of the Cessna Citation X.<br />
<br />
{{Cessna}}<br />
<br />
[[Category:Business aircraft]]<br />
<br />
[[de:Cessna Citation X]]<br />
[[es:Cessna Citation X]]<br />
[[fr:Cessna Citation X]]<br />
[[it:Cessna Citation X]]</div>Wonkohttps://wiki.flightgear.org/w/index.php?title=File:Citation-x-autopilot.png&diff=64570File:Citation-x-autopilot.png2013-11-15T22:56:50Z<p>Wonko: User created page with UploadWizard</p>
<hr />
<div>=={{int:filedesc}}==<br />
{{Information<br />
|description={{en|1=Cockpit screenshot with highlighting of autopilot features (designer of Citation X plane: Syd Adams}}<br />
|date=2013-11-15 23:25:59<br />
|source={{own}}<br />
|author=[[User:Wonko|F Tilmann]]<br />
|permission=<br />
|other_versions=<br />
|other_fields=<br />
}}<br />
{{Location dec|0|0}}<br />
<br />
=={{int:license-header}}==<br />
{{self|cc-by-sa-3.0}}<br />
<br />
<br />
[[Category:Cockpit]]<br />
[[Category:Autopilot]]</div>Wonkohttps://wiki.flightgear.org/w/index.php?title=Cessna_Citation_X&diff=64221Cessna Citation X2013-11-06T22:53:06Z<p>Wonko: </p>
<hr />
<div>{{infobox Aircraft<br />
|image = CessnaCitationX.jpg<br />
|name = Cessna Citation X<br />
|type = Business Jet<br />
|status-fdm = 3<br />
|status-systems = 3<br />
|status-cockpit = 3<br />
|status-model = 3<br />
|livery = Stripes<br />
|authors = Syd Adams<br />
|fdm = YASim<br />
|status = Development<br />
|fgname = CitationX<br />
}}<br />
The '''Cessna Citation X''' (X as in the Roman numeral for ten, not the letter) is a long range medium business jet aircraft. The X is currently the fastest civilian jet in production with a top speed of Mach 0.92 (703 mph). This also makes it the fastest business jet in history. The Citation X is powered by two Rolls-Royce turbofan engines and is built by the [[Cessna Aircraft Company]] in Wichita, Kansas. The Citation brand of business jets encompasses six distinct "families" of aircraft. Although based on the earlier Citation III, VI and VII models the Citation X is a significantly different airplane. It utilizes a totally new wing design, engines, and features a glass cockpit.<br />
<br />
== Aircraft help ==<br />
<br />
=== Startup ===<br />
(following the procedure in the tutorial) <br />
<br />
[[File:Citationx-power+avionics.png|400px|Screenshot of Citation X cockpit detail (Power and Avionics panel) with buttons to press during startup highlighted.Designer of Flightgear Citation X plane: Syd Adams]]<br />
<br />
Power and Avionics panel in front of pilot:<br />
* Battery L + R switches on<br />
* Generator L + R switches on<br />
* Avionics switch on<br />
* Ignition L + R on<br />
Lights:<br />
* Gnd/Rec anticoll on (on lower central panel on co-pilot side)<br />
* Taxi on (central console - copilot side, next to flaps)<br />
Start Engines:<br />
* Throttle: to idle<br />
* Press Engine starter button L+R<br />
* Throttle: spool up<br />
=== Taxi ===<br />
* Nav lights on<br />
* Release parking: Shift-B<br />
* Max Taxiing speed 20 kts<br />
<br />
=== Take Off ===<br />
Preparation<br />
* Landing lights on (central panel)<br />
* Recog on <br />
* Taxi light off<br />
* Flaps 5 deg<br />
Take Off<br />
* Thrust: TO (take/off ~95%)<br />
Note that you will lose tiller control at about 50 knots and no more control on yaw is possible; make sure you are aligned well before reaching this speed<br />
* Vr=130 kts (pull hard on yoke such that front wheels leave ground)<br />
* V2=140 kts (rear wheels leave ground) <br />
* Retract landing gear as soon as you have left the ground (G)<br />
* 1500 ft above ground: flaps up<br />
Climb out<br />
* Landing lights off<br />
* 250 kts (do not exceed below 10000 ft)<br />
* 280 kts (above 10000 ft)<br />
* At Transition Altitude set altimeter to 29.92 (1013)<br />
* Max speed 345 kts at FL240-280 (24000-28000 ft)<br />
=== Approach and Landing ===<br />
* Descent speed (280 kts to FL120, 250 kts below 10000 fts)<br />
* Turn on landing lights<br />
* Reduce speed (throttle to idle) <br />
* 180 kts Flaps 5 deg<br />
* 140 kts Flaps 15 deg<br />
* 130 kts lower landing gear <br />
At final stretch toward runway<br />
* 125 kts Flaps 35 deg<br />
* 120 kts Landing speed<br />
After touchdown<br />
* Lower nose wheel<br />
* Deploy spoilers (Ctrl-B)<br />
* Reverse thrust (del)<br />
* at 60 knots: cancel reverse (del)<br />
* Manual brakes <br />
Taxi <br />
* flaps up<br />
* Landing lights off<br />
* Recog light off<br />
* Taxi light on<br />
* max 20 kts<br />
<br />
During descent use the auto-pilot (VS mode) to control the rate of descent, and the throttle to control airspeed. In order to effect the initial speed reduction, the place the throttle in idle. As you deploy the larger flaps levels (15+) the aircraft can slow down quite quickly, and you will have to actively manage the throttle to avoid a dramatic loss of airspeed. Particularly for the full flaps extension it is very difficult to maintain sufficient airspeed to prevent fast descent so deploy these only when you are quite near the runway. <br />
<br />
<br />
<br />
=== Configuration speed limits <ref>(Citation X - Section III Instrument and Avionics)[http://www.scribd.com/doc/78382264/Cessna-Citation-X-Instrumentation-and-Avionics]</ref> ===<br />
<br />
{| class="wikitable"<br />
|-<br />
|Flaps 5 deg||250 kts<br />
|-<br />
|Flaps 15 deg||210 kts<br />
|-<br />
|Flaps >15 deg||180 kts<br />
|-<br />
|Gear down || 210 kts<br />
|}<br />
<br />
=== When and how fast to descend? ===<br />
<br />
The following rules-of-thumb apply will give you a glide slope angle of 3 deg and are easily worked out using basic trigonometry.<br />
* Altitude above airport ground (ft) should be about 318 times distance left to fly to runway head (nm)<br />
<br />
Examples: <br />
# You are flying at 20000 ft, and the airport is at 1000 ft. Your descent should start at about (20000-1000)/318 ~ 60 nm left to fly<br />
# You are 10 nm from the airport. Your altitude should be airport altitude plus 318*10 ~ 3200 ft<br />
<br />
* Assuming you are at about the correct altitude your vertical descent speed (ft/min) should be 5.3 times your speed relative ground (kts, from GPS, NOT airspeed)<br />
<br />
Example:<br />
# You are flying at 200 kts rel. ground. Your vertical descent speed should be 200*5.3=1060 ft /min<br />
<br />
<br />
== References ==<br />
<references/><br />
<br />
== Related content ==<br />
* [[FlightGear Newsletter April 2011#Aircraft reviews|Click here]] for a review of the Cessna Citation X.<br />
<br />
{{Cessna}}<br />
<br />
[[Category:Business aircraft]]<br />
<br />
[[de:Cessna Citation X]]<br />
[[es:Cessna Citation X]]<br />
[[fr:Cessna Citation X]]<br />
[[it:Cessna Citation X]]</div>Wonkohttps://wiki.flightgear.org/w/index.php?title=Cessna_Citation_X&diff=63299Cessna Citation X2013-10-12T20:38:19Z<p>Wonko: Add approach and landing hints</p>
<hr />
<div>{{infobox Aircraft<br />
|image = CessnaCitationX.jpg<br />
|name = Cessna Citation X<br />
|type = Business Jet<br />
|status-fdm = 3<br />
|status-systems = 3<br />
|status-cockpit = 3<br />
|status-model = 3<br />
|livery = Stripes<br />
|authors = Syd Adams<br />
|fdm = YASim<br />
|status = Development<br />
|fgname = CitationX<br />
}}<br />
The '''Cessna Citation X''' (X as in the Roman numeral for ten, not the letter) is a long range medium business jet aircraft. The X is currently the fastest civilian jet in production with a top speed of Mach 0.92 (703 mph). This also makes it the fastest business jet in history. The Citation X is powered by two Rolls-Royce turbofan engines and is built by the [[Cessna Aircraft Company]] in Wichita, Kansas. The Citation brand of business jets encompasses six distinct "families" of aircraft. Although based on the earlier Citation III, VI and VII models the Citation X is a significantly different airplane. It utilizes a totally new wing design, engines, and features a glass cockpit.<br />
<br />
== Aircraft help ==<br />
<br />
=== Startup ===<br />
(following the procedure in the tutorial) <br />
<br />
[[File:Citationx-power+avionics.png|thumb|Screenshot of Citation X cockpit detail (Power and Avionics panel) with buttons to press during startup highlighted.Designer of Flightgear Citation X plane: Syd Adams]]<br />
<br />
Power and Avionics panel in front of pilot:<br />
* Battery L + R switches on<br />
* Generator L + R switches on<br />
* Avionics switch on<br />
* Ignition L + R on<br />
Lights:<br />
* Gnd/Rec anticoll on (on lower central panel on co-pilot side)<br />
* Taxi on (central console - copilot side, next to flaps)<br />
Start Engines:<br />
* Throttle: to idle<br />
* Press Engine starter button L+R<br />
* Throttle: spool up<br />
=== Taxi ===<br />
* Nav lights on<br />
* Release parking: Shift-B<br />
* Max Taxiing speed 20 kts<br />
<br />
=== Take Off ===<br />
Preparation<br />
* Landing lights on (central panel)<br />
* Recog on <br />
* Taxi light off<br />
* Flaps 5 deg<br />
Take Off<br />
* Thrust: TO (take/off ~95%)<br />
Note that you will lose tiller control at about 50 knots and no more control on yaw is possible; make sure you are aligned well before reaching this speed<br />
* Vr=130 kts (pull hard on yoke such that front wheels leave ground)<br />
* V2=140 kts (rear wheels leave ground) <br />
* Retract landing gear as soon as you have left the ground (G)<br />
* 1500 ft above ground: flaps up<br />
Climb out<br />
* Landing lights off<br />
* 250 kts (do not exceed below 10000 ft)<br />
* 280 kts (above 10000 ft)<br />
* At Transition Altitude set altimeter to 29.92 (1013)<br />
* Max speed 345 kts at FL240-280 (24000-28000 ft)<br />
=== Approach and Landing ===<br />
* Descent speed (280 kts to FL120, 250 kts below 10000 fts)<br />
* Turn on landing lights<br />
* Reduce speed (throttle to idle) <br />
* 180 kts Flaps 5 deg<br />
* 140 kts Flaps 15 deg<br />
* 130 kts lower landing gear <br />
At final stretch toward runway<br />
* 125 kts Flaps 35 deg<br />
* 120 kts Landing speed<br />
After touchdown<br />
* Lower nose wheel<br />
* Deploy spoilers (Ctrl-B)<br />
* Reverse thrust (del)<br />
* at 60 knots: cancel reverse (del)<br />
* Manual brakes <br />
Taxi <br />
* flaps up<br />
* Landing lights off<br />
* Recog light off<br />
* Taxi light on<br />
* max 20 kts<br />
<br />
During descent use the auto-pilot (VS mode) to control the rate of descent, and the throttle to control airspeed. In order to effect the initial speed reduction, the place the throttle in idle. As you deploy the larger flaps levels (15+) the aircraft can slow down quite quickly, and you will have to actively manage the throttle to avoid a dramatic loss of airspeed. Particularly for the full flaps extension it is very difficult to maintain sufficient airspeed to prevent fast descent so deploy these only when you are quite near the runway. <br />
<br />
<br />
<br />
=== Configuration speed limits <ref>(Citation X - Section III Instrument and Avionics)[http://www.scribd.com/doc/78382264/Cessna-Citation-X-Instrumentation-and-Avionics]</ref> ===<br />
<br />
{| class="wikitable"<br />
|-<br />
|Flaps 5 deg||250 kts<br />
|-<br />
|Flaps 15 deg||210 kts<br />
|-<br />
|Flaps >15 deg||180 kts<br />
|-<br />
|Gear down || 210 kts<br />
|}<br />
<br />
=== When and how fast to descend? ===<br />
<br />
The following rules-of-thumb apply will give you a glide slope angle of 3 deg and are easily worked out using basic trigonometry.<br />
* Altitude above airport ground (ft) should be about 318 times distance left to fly to runway head (nm)<br />
<br />
Examples: <br />
# You are flying at 20000 ft, and the airport is at 1000 ft. Your descent should start at about (20000-1000)/318 ~ 60 nm left to fly<br />
# You are 10 nm from the airport. Your altitude should be airport altitude plus 318*10 ~ 3200 ft<br />
<br />
* Assuming you are at about the correct altitude your vertical descent speed (ft/min) should be 5.3 times your speed relative ground (kts, from GPS, NOT airspeed)<br />
<br />
Example:<br />
# You are flying at 200 kts rel. ground. Your vertical descent speed should be 200*5.3=1060 ft /min<br />
<br />
<br />
== References ==<br />
<references/><br />
<br />
== Related content ==<br />
* [[FlightGear Newsletter April 2011#Aircraft reviews|Click here]] for a review of the Cessna Citation X.<br />
<br />
{{Cessna}}<br />
<br />
[[Category:Business aircraft]]<br />
<br />
[[de:Cessna Citation X]]<br />
[[es:Cessna Citation X]]<br />
[[fr:Cessna Citation X]]<br />
[[it:Cessna Citation X]]</div>Wonkohttps://wiki.flightgear.org/w/index.php?title=Cessna_Citation_X&diff=62748Cessna Citation X2013-09-16T21:12:13Z<p>Wonko: /* Aircraft help */</p>
<hr />
<div>{{infobox Aircraft<br />
|image = CessnaCitationX.jpg<br />
|name = Cessna Citation X<br />
|type = Business Jet<br />
|status-fdm = 3<br />
|status-systems = 3<br />
|status-cockpit = 3<br />
|status-model = 3<br />
|livery = Stripes<br />
|authors = Syd Adams<br />
|fdm = YASim<br />
|status = Development<br />
|fgname = CitationX<br />
}}<br />
The '''Cessna Citation X''' (X as in the Roman numeral for ten, not the letter) is a long range medium business jet aircraft. The X is currently the fastest civilian jet in production with a top speed of Mach 0.92 (703 mph). This also makes it the fastest business jet in history. The Citation X is powered by two Rolls-Royce turbofan engines and is built by the [[Cessna Aircraft Company]] in Wichita, Kansas. The Citation brand of business jets encompasses six distinct "families" of aircraft. Although based on the earlier Citation III, VI and VII models the Citation X is a significantly different airplane. It utilizes a totally new wing design, engines, and features a glass cockpit.<br />
<br />
== Aircraft help ==<br />
<br />
=== Startup ===<br />
(following the procedure in the tutorial) <br />
<br />
[[File:Citationx-power+avionics.png|thumb|Screenshot of Citation X cockpit detail (Power and Avionics panel) with buttons to press during startup highlighted.Designer of Flightgear Citation X plane: Syd Adams]]<br />
<br />
Power and Avionics panel in front of pilot:<br />
* Battery L + R switches on<br />
* Generator L + R switches on<br />
* Avionics switch on<br />
* Ignition L + R on<br />
Lights:<br />
* Gnd/Rec anticoll on (on lower central panel on co-pilot side)<br />
* Taxi on (central console - copilot side, next to flaps)<br />
Start Engines:<br />
* Throttle: to idle<br />
* Press Engine starter button L+R<br />
* Throttle: spool up<br />
=== Taxi ===<br />
* Nav lights on<br />
* Release parking: Shift-B<br />
* Max Taxiing speed 20 kts<br />
<br />
=== Take Off ===<br />
Preparation<br />
* Landing lights on (central panel)<br />
* Recog on <br />
* Taxi light off<br />
* Flaps 5 deg<br />
Take Off<br />
* Thrust: TO (take/off ~95%)<br />
Note that you will lose tiller control at about 50 knots and no more control on yaw is possible; make sure you are aligned well before reaching this speed<br />
* Vr=130 kts (pull hard on yoke such that front wheels leave ground)<br />
* V2=140 kts (rear wheels leave ground) <br />
* Retract landing gear as soon as you have left the ground (G)<br />
* 1500 ft above ground: flaps up<br />
Climb out<br />
* Landing lights off<br />
* 250 kts (do not exceed below 10000 ft)<br />
* 280 kts (above 10000 ft)<br />
* At Transition Altitude set altimeter to 29.92 (1013)<br />
* Max speed 345 kts at FL240-280 (24000-28000 ft)<br />
<br />
<br />
=== Configuration speed limits <ref>(Citation X - Section III Instrument and Avionics)[http://www.scribd.com/doc/78382264/Cessna-Citation-X-Instrumentation-and-Avionics]</ref> ===<br />
<br />
{| class="wikitable"<br />
|-<br />
|Flaps 5 deg||250 kts<br />
|-<br />
|Flaps 15 deg||210 kts<br />
|-<br />
|Flaps >15 deg||180 kts<br />
|-<br />
|Gear down || 210 kts<br />
|}<br />
<br />
<br />
<references/><br />
<br />
== Related content ==<br />
* [[FlightGear Newsletter April 2011#Aircraft reviews|Click here]] for a review of the Cessna Citation X.<br />
<br />
{{Cessna}}<br />
<br />
[[Category:Business aircraft]]<br />
<br />
[[de:Cessna Citation X]]<br />
[[es:Cessna Citation X]]<br />
[[fr:Cessna Citation X]]<br />
[[it:Cessna Citation X]]</div>Wonkohttps://wiki.flightgear.org/w/index.php?title=Cessna_Citation_X&diff=62747Cessna Citation X2013-09-16T21:08:31Z<p>Wonko: /* Aircraft help */</p>
<hr />
<div>{{infobox Aircraft<br />
|image = CessnaCitationX.jpg<br />
|name = Cessna Citation X<br />
|type = Business Jet<br />
|status-fdm = 3<br />
|status-systems = 3<br />
|status-cockpit = 3<br />
|status-model = 3<br />
|livery = Stripes<br />
|authors = Syd Adams<br />
|fdm = YASim<br />
|status = Development<br />
|fgname = CitationX<br />
}}<br />
The '''Cessna Citation X''' (X as in the Roman numeral for ten, not the letter) is a long range medium business jet aircraft. The X is currently the fastest civilian jet in production with a top speed of Mach 0.92 (703 mph). This also makes it the fastest business jet in history. The Citation X is powered by two Rolls-Royce turbofan engines and is built by the [[Cessna Aircraft Company]] in Wichita, Kansas. The Citation brand of business jets encompasses six distinct "families" of aircraft. Although based on the earlier Citation III, VI and VII models the Citation X is a significantly different airplane. It utilizes a totally new wing design, engines, and features a glass cockpit.<br />
<br />
== Aircraft help ==<br />
<br />
=== Startup ===<br />
(following the procedure in the tutorial) <br />
<br />
[[File:Citationx-power+avionics.png|thumb|Screenshot of Citation X cockpit detail (Power and Avionics panel) with buttons to press during startup highlighted.Designer of Flightgear Citation X plane: Syd Adams]]<br />
<br />
Power and Avionics panel in front of pilot:<br />
* Battery L + R switches on<br />
* Generator L + R switches on<br />
* Avionics switch on<br />
* Ignition L + R on<br />
Lights:<br />
* Gnd/Rec anticoll on (on lower central panel on co-pilot side)<br />
* Taxi on (central console - copilot side, next to flaps)<br />
Start Engines:<br />
* Throttle: to idle<br />
* Press Engine starter button L+R<br />
* Throttle: spool up<br />
=== Taxi ===<br />
* Nav lights on<br />
* Release parking: Shift-B<br />
* Max Taxiing speed 20 kts<br />
<br />
=== Take Off ===<br />
Preparation<br />
* Landing lights on (central panel)<br />
* Recog on <br />
* Taxi light off<br />
* Flaps 5 deg<br />
Take Off<br />
* Thrust: TO (take/off ~95%)<br />
Note that you will lose tiller control at about 50 knots and no more control on yaw is possible; make sure you are aligned well before reaching this speed<br />
* Vr=130 kts (pull hard on yoke such that front wheels leave ground)<br />
* V2=140 kts (rear wheels leave ground) <br />
* Retract landing gear as soon as you have left the ground (G)<br />
* 1500 ft above ground: flaps up<br />
Climb out<br />
* Landing lights off<br />
* 250 kts (do not exceed below 10000 ft)<br />
* 280 kts (above 10000 ft)<br />
* At Transition Altitude set altimeter to 29.92 (1013)<br />
* Max speed 345 kts at FL240-280 (24000-28000 ft)<br />
<br />
<br />
=== Configuration speed limits ===<br />
The information in this section is based on external resources <ref>(Citation X - Section III Instrument and Avionics)[http://www.scribd.com/doc/78382264/Cessna-Citation-X-Instrumentation-and-Avionics]</ref><br />
<br />
http://www.scribd.com/doc/78382264/Cessna-Citation-X-Instrumentation-and-Avionics<br />
{| class="wikitable"<br />
|-<br />
|Flaps 5 deg||250 kts<br />
|-<br />
|Flaps 15 deg||210 kts<br />
|-<br />
|Flaps >15 deg||180 kts<br />
|-<br />
|Gear down || 210 kts<br />
|}<br />
<br />
<br />
{{reflist}}<br />
<br />
== Related content ==<br />
* [[FlightGear Newsletter April 2011#Aircraft reviews|Click here]] for a review of the Cessna Citation X.<br />
<br />
{{Cessna}}<br />
<br />
[[Category:Business aircraft]]<br />
<br />
[[de:Cessna Citation X]]<br />
[[es:Cessna Citation X]]<br />
[[fr:Cessna Citation X]]<br />
[[it:Cessna Citation X]]</div>Wonkohttps://wiki.flightgear.org/w/index.php?title=Cessna_Citation_X&diff=62746Cessna Citation X2013-09-16T21:06:12Z<p>Wonko: /* Aircraft help */</p>
<hr />
<div>{{infobox Aircraft<br />
|image = CessnaCitationX.jpg<br />
|name = Cessna Citation X<br />
|type = Business Jet<br />
|status-fdm = 3<br />
|status-systems = 3<br />
|status-cockpit = 3<br />
|status-model = 3<br />
|livery = Stripes<br />
|authors = Syd Adams<br />
|fdm = YASim<br />
|status = Development<br />
|fgname = CitationX<br />
}}<br />
The '''Cessna Citation X''' (X as in the Roman numeral for ten, not the letter) is a long range medium business jet aircraft. The X is currently the fastest civilian jet in production with a top speed of Mach 0.92 (703 mph). This also makes it the fastest business jet in history. The Citation X is powered by two Rolls-Royce turbofan engines and is built by the [[Cessna Aircraft Company]] in Wichita, Kansas. The Citation brand of business jets encompasses six distinct "families" of aircraft. Although based on the earlier Citation III, VI and VII models the Citation X is a significantly different airplane. It utilizes a totally new wing design, engines, and features a glass cockpit.<br />
<br />
== Aircraft help ==<br />
<br />
=== Startup ===<br />
(following the procedure in the tutorial) <br />
<br />
[[File:Citationx-power+avionics.png|thumb|Screenshot of Citation X cockpit detail (Power and Avionics panel) with buttons to press during startup highlighted.Designer of Flightgear Citation X plane: Syd Adams]]<br />
<br />
Power and Avionics panel in front of pilot:<br />
* Battery L + R switches on<br />
* Generator L + R switches on<br />
* Avionics switch on<br />
* Ignition L + R on<br />
Lights:<br />
* Gnd/Rec anticoll on (on lower central panel on co-pilot side)<br />
* Taxi on (central console - copilot side, next to flaps)<br />
Start Engines:<br />
* Throttle: to idle<br />
* Press Engine starter button L+R<br />
* Throttle: spool up<br />
=== Taxi ===<br />
* Nav lights on<br />
* Release parking: Shift-B<br />
* Max Taxiing speed 20 kts<br />
<br />
=== Take Off ===<br />
Preparation<br />
* Landing lights on (central panel)<br />
* Recog on <br />
* Taxi light off<br />
* Flaps 5 deg<br />
Take Off<br />
* Thrust: TO (take/off ~95%)<br />
Note that you will lose tiller control at about 50 knots and no more control on yaw is possible; make sure you are aligned well before reaching this speed<br />
* Vr=130 kts (pull hard on yoke such that front wheels leave ground)<br />
* V2=140 kts (rear wheels leave ground) <br />
* Retract landing gear as soon as you have left the ground (G)<br />
* 1500 ft above ground: flaps up<br />
Climb out<br />
* Landing lights off<br />
* 250 kts (do not exceed below 10000 ft)<br />
* 280 kts (above 10000 ft)<br />
* At Transition Altitude set altimeter to 29.92 (1013)<br />
* Max speed 345 kts at FL240-280 (24000-28000 ft)<br />
<br />
<br />
=== Configuration speed limits ===<br />
The information in this section is based on external resources (Citation X - Section III Instrument and Avionics)<ref>[http://www.scribd.com/doc/78382264/Cessna-Citation-X-Instrumentation-and-Avionics]</ref><br />
<br />
http://www.scribd.com/doc/78382264/Cessna-Citation-X-Instrumentation-and-Avionics<br />
{| class="wikitable"<br />
|-<br />
|Flaps 5 deg||250 kts<br />
|-<br />
|Flaps 15 deg||210 kts<br />
|-<br />
|Flaps >15 deg||180 kts<br />
|-<br />
|Gear down || 210 kts<br />
|}<br />
<br />
<br />
<references/><br />
<br />
== Related content ==<br />
* [[FlightGear Newsletter April 2011#Aircraft reviews|Click here]] for a review of the Cessna Citation X.<br />
<br />
{{Cessna}}<br />
<br />
[[Category:Business aircraft]]<br />
<br />
[[de:Cessna Citation X]]<br />
[[es:Cessna Citation X]]<br />
[[fr:Cessna Citation X]]<br />
[[it:Cessna Citation X]]</div>Wonkohttps://wiki.flightgear.org/w/index.php?title=Cessna_Citation_X&diff=62745Cessna Citation X2013-09-16T21:02:29Z<p>Wonko: /* Aircraft help */</p>
<hr />
<div>{{infobox Aircraft<br />
|image = CessnaCitationX.jpg<br />
|name = Cessna Citation X<br />
|type = Business Jet<br />
|status-fdm = 3<br />
|status-systems = 3<br />
|status-cockpit = 3<br />
|status-model = 3<br />
|livery = Stripes<br />
|authors = Syd Adams<br />
|fdm = YASim<br />
|status = Development<br />
|fgname = CitationX<br />
}}<br />
The '''Cessna Citation X''' (X as in the Roman numeral for ten, not the letter) is a long range medium business jet aircraft. The X is currently the fastest civilian jet in production with a top speed of Mach 0.92 (703 mph). This also makes it the fastest business jet in history. The Citation X is powered by two Rolls-Royce turbofan engines and is built by the [[Cessna Aircraft Company]] in Wichita, Kansas. The Citation brand of business jets encompasses six distinct "families" of aircraft. Although based on the earlier Citation III, VI and VII models the Citation X is a significantly different airplane. It utilizes a totally new wing design, engines, and features a glass cockpit.<br />
<br />
== Aircraft help ==<br />
<br />
=== Startup ===<br />
(following the procedure in the tutorial) <br />
<br />
[[File:Citationx-power+avionics.png|thumb|Screenshot of Citation X cockpit detail (Power and Avionics panel) with buttons to press during startup highlighted.Designer of Flightgear Citation X plane: Syd Adams]]<br />
<br />
Power and Avionics panel in front of pilot:<br />
* Battery L + R switches on<br />
* Generator L + R switches on<br />
* Avionics switch on<br />
* Ignition L + R on<br />
Lights:<br />
* Gnd/Rec anticoll on (on lower central panel on co-pilot side)<br />
* Taxi on (central console - copilot side, next to flaps)<br />
Start Engines:<br />
* Throttle: to idle<br />
* Press Engine starter button L+R<br />
* Throttle: spool up<br />
=== Taxi ===<br />
* Nav lights on<br />
* Release parking: Shift-B<br />
* Max Taxiing speed 20 kts<br />
<br />
=== Take Off ===<br />
Preparation<br />
* Landing lights on (central panel)<br />
* Recog on <br />
* Taxi light off<br />
* Flaps 5 deg<br />
Take Off<br />
* Thrust: TO (take/off ~95%)<br />
Note that you will lose tiller control at about 50 knots and no more control on yaw is possible; make sure you are aligned well before reaching this speed<br />
* Vr=130 kts (pull hard on yoke such that front wheels leave ground)<br />
* V2=140 kts (rear wheels leave ground) <br />
* Retract landing gear as soon as you have left the ground (G)<br />
* 1500 ft above ground: flaps up<br />
Climb out<br />
* Landing lights off<br />
* 250 kts (do not exceed below 10000 ft)<br />
* 280 kts (above 10000 ft)<br />
* At Transition Altitude set altimeter to 29.92 (1013)<br />
* Max speed 345 kts at FL240-280 (24000-28000 ft)<br />
<br />
<br />
=== Configuration speed limits ===<br />
The information in this section is based on external resources (Citation X - Section III Instrument and Avionics)<ref>[http://www.scribd.com/doc/78382264/Cessna-Citation-X-Instrumentation-and-Avionics]</ref><br />
<br />
http://www.scribd.com/doc/78382264/Cessna-Citation-X-Instrumentation-and-Avionics<br />
{| class="wikitable"<br />
|-<br />
|Flaps 5 deg||250 kts<br />
|-<br />
|Flaps 15 deg||210 kts<br />
|-<br />
|Flaps >15 deg||180 kts<br />
|-<br />
|Gear down || 210 kts<br />
|}<br />
<br />
== Related content ==<br />
* [[FlightGear Newsletter April 2011#Aircraft reviews|Click here]] for a review of the Cessna Citation X.<br />
<br />
{{Cessna}}<br />
<br />
[[Category:Business aircraft]]<br />
<br />
[[de:Cessna Citation X]]<br />
[[es:Cessna Citation X]]<br />
[[fr:Cessna Citation X]]<br />
[[it:Cessna Citation X]]</div>Wonkohttps://wiki.flightgear.org/w/index.php?title=Cessna_Citation_X&diff=62645Cessna Citation X2013-09-11T16:37:40Z<p>Wonko: </p>
<hr />
<div>{{infobox Aircraft<br />
|image = CessnaCitationX.jpg<br />
|name = Cessna Citation X<br />
|type = Business Jet<br />
|status-fdm = 3<br />
|status-systems = 3<br />
|status-cockpit = 3<br />
|status-model = 3<br />
|livery = Stripes<br />
|authors = Syd Adams<br />
|fdm = YASim<br />
|status = Development<br />
|fgname = CitationX<br />
}}<br />
The '''Cessna Citation X''' (X as in the Roman numeral for ten, not the letter) is a long range medium business jet aircraft. The X is currently the fastest civilian jet in production with a top speed of Mach 0.92 (703 mph). This also makes it the fastest business jet in history. The Citation X is powered by two Rolls-Royce turbofan engines and is built by the [[Cessna Aircraft Company]] in Wichita, Kansas. The Citation brand of business jets encompasses six distinct "families" of aircraft. Although based on the earlier Citation III, VI and VII models the Citation X is a significantly different airplane. It utilizes a totally new wing design, engines, and features a glass cockpit.<br />
<br />
== Aircraft help ==<br />
<br />
=== Startup ===<br />
(following the procedure in the tutorial) <br />
<br />
[[File:Citationx-power+avionics.png|thumb|Screenshot of Citation X cockpit detail (Power and Avionics panel) with buttons to press during startup highlighted.Designer of Flightgear Citation X plane: Syd Adams]]<br />
<br />
Power and Avionics panel in front of pilot:<br />
* Battery L + R switches on<br />
* Generator L + R switches on<br />
* Avionics switch on<br />
* Ignition L + R on<br />
Lights:<br />
* Gnd/Rec anticoll on (on lower central panel on co-pilot side)<br />
* Recog on (same as above)<br />
* Taxi on (central console - copilot side, next to flaps)<br />
Start Engines:<br />
* Throttle: to idle<br />
* Press Engine starter button L+R<br />
* Throttle: spool up<br />
<br />
== Related content ==<br />
* [[FlightGear Newsletter April 2011#Aircraft reviews|Click here]] for a review of the Cessna Citation X.<br />
<br />
{{Cessna}}<br />
<br />
[[Category:Business aircraft]]<br />
<br />
[[de:Cessna Citation X]]<br />
[[es:Cessna Citation X]]<br />
[[fr:Cessna Citation X]]<br />
[[it:Cessna Citation X]]</div>Wonkohttps://wiki.flightgear.org/w/index.php?title=File:Citationx-power%2Bavionics.png&diff=62644File:Citationx-power+avionics.png2013-09-11T16:35:17Z<p>Wonko: User created page with UploadWizard</p>
<hr />
<div>=={{int:filedesc}}==<br />
{{Information<br />
|description={{en|1=Screenshot of Citation X cockpit detail (Power and Avionics panel) with buttons to press during startup highlighted.<br />
Designer of Flightgear Citation X plane: Syd Adams}}<br />
|date=2013-09-11 18:29:20<br />
|source={{own}}<br />
|author=[[User:Wonko|Wonko]]<br />
|permission=<br />
|other_versions=<br />
|other_fields=<br />
}}<br />
{{Location dec|0|0}}<br />
<br />
=={{int:license-header}}==<br />
{{self|cc-by-sa-3.0}}<br />
<br />
<br />
[[Category:Cockpit screenshot]]</div>Wonkohttps://wiki.flightgear.org/w/index.php?title=Cessna_Citation_X&diff=62639Cessna Citation X2013-09-10T14:54:30Z<p>Wonko: Add startup procedure CitationX</p>
<hr />
<div>{{infobox Aircraft<br />
|image = CessnaCitationX.jpg<br />
|name = Cessna Citation X<br />
|type = Business Jet<br />
|status-fdm = 3<br />
|status-systems = 3<br />
|status-cockpit = 3<br />
|status-model = 3<br />
|livery = Stripes<br />
|authors = Syd Adams<br />
|fdm = YASim<br />
|status = Development<br />
|fgname = CitationX<br />
}}<br />
The '''Cessna Citation X''' (X as in the Roman numeral for ten, not the letter) is a long range medium business jet aircraft. The X is currently the fastest civilian jet in production with a top speed of Mach 0.92 (703 mph). This also makes it the fastest business jet in history. The Citation X is powered by two Rolls-Royce turbofan engines and is built by the [[Cessna Aircraft Company]] in Wichita, Kansas. The Citation brand of business jets encompasses six distinct "families" of aircraft. Although based on the earlier Citation III, VI and VII models the Citation X is a significantly different airplane. It utilizes a totally new wing design, engines, and features a glass cockpit.<br />
<br />
== Aircraft help ==<br />
<br />
=== Startup ===<br />
(following the procedure in the tutorial) <br />
<br />
Power and Avionics panel in front of pilot:<br />
* Battery L + R switches on<br />
* Generator L + R switches on<br />
* Avionics switch on<br />
* Ignition L + R on<br />
Lights:<br />
* Gnd/Rec anticoll on (on lower central panel on co-pilot side)<br />
* Recog on (same as above)<br />
* Taxi on (central console - copilot side, next to flaps)<br />
Start Engines:<br />
* Throttle: to idle<br />
* Press Engine starter button L+R<br />
* Throttle: spool up<br />
<br />
== Related content ==<br />
* [[FlightGear Newsletter April 2011#Aircraft reviews|Click here]] for a review of the Cessna Citation X.<br />
<br />
{{Cessna}}<br />
<br />
[[Category:Business aircraft]]<br />
<br />
[[de:Cessna Citation X]]<br />
[[es:Cessna Citation X]]<br />
[[fr:Cessna Citation X]]<br />
[[it:Cessna Citation X]]</div>Wonko