Difference between revisions of "FlightGear"

From PaparazziUAV
Jump to navigation Jump to search
m (moved Flightgear to FlightGear: proper naming)
 
(11 intermediate revisions by 4 users not shown)
Line 2: Line 2:
__TOC__
__TOC__


FlightGear Flight Simulator.
FlightGear Flight Simulator which can be used to visualize an aircraft and scenery. For the actual simulation, see [[Simulation]].


See http://www.flightgear.org/
See http://www.flightgear.org/
Line 9: Line 9:


=== Debian/Ubuntu ===
=== Debian/Ubuntu ===
The standard Debian/Ubuntu repositories contain FlightGear 2.4 or 2.6.
The standard Debian/Ubuntu repositories contain mostly older FlightGear versions.


Flightgear 2.8 was available from getdeb.net (now discontinued, you can still use the mirrors).
A lot has improved and changed over the years. To get the latest greatest Flightgear, as of writing this iv vv2020.3.6 and enjoy the improvements one can easily get that version by add in a PPA
In this example for Ubuntu 12.04 precise, replace the codename as appropriate:


Add the key:
For Ubuntu the latest edition of FlightGear is available from Launchpad PPA (contributed by Saikrishna Arcot), to add the PPA an install the latest Flightgear, this in your terminal:
wget -q -O - http://mirrors.dotsrc.org/getdeb/ubuntu/dists/precise-getdeb/Release.gpg | sudo apt-key add -


Add to your ''/etc/apt.sources.list'':
  sudo add-apt-repository ppa:saiarcot895/flightgear
  deb http://mirrors.dotsrc.org/getdeb/ubuntu precise-getdeb games
deb-src http://mirrors.dotsrc.org/getdeb/ubuntu precise-getdeb games
 
Install flightgear:
  sudo apt-get update
  sudo apt-get update
  sudo apt-get install flightgear
  sudo apt-get install flightgear


== Using FlightGear for Vizualization ==
This will install v2020.3.1 or newer
For Flight Gear visualization of the simulation, version 2.6 or greater is best. If you wish to use version 2.4 or lower, you must add the following to the firmware section of your airframe file:
 
Tip:
 
Not a Paparazzi issue but if you get a message box saying "zone.tab" missing copy an paste this in you terminal to fix it:
 
sudo apt-get install --reinstall flightgear-data-base
 
==== From source ====
 
A great page to read in case you want to install Flightgear from source [http://wiki.flightgear.org/Scripted_Compilation_on_Linux_Debian/Ubuntu can be found here]
 
== Adding Paparazzi 3D models ==
 
There are a few 3D UAV models that come with paparazzi:
* ''mikrokopter.xml'' quadrotor frame
* ''hexa.xml'' hexacopter
* ''easystar.xml'' Multiplex EasyStar fixedwing
* ''simple_bipe.xml'' biplane/quadrotor hybrid (transitioning vehicle)
 
To make them available in flightgear, make a link from ''/usr/share/games/flightgear/Models/Aircraft/paparazzi'' to ''<paparazzi_dir>/conf/simulator/flightgear/''
sudo ln -s $PAPARAZZI_SRC/conf/simulator/flightgear/ /usr/share/games/flightgear/Models/Aircraft/paparazzi
 
== Using FlightGear for Visualization ==
For Flight Gear visualization of the simulation, version 2018.2.2 or higher is best.  
 
NOTE: '''Only''' if you still wish to use version '''v2.4 or lower''' for some reason, you must add the following to the firmware section of your airframe file:
{{Box Code|conf/airframes/myplane.xml|
{{Box Code|conf/airframes/myplane.xml|
<source lang="xml">
<source lang="xml">
Line 36: Line 55:
</source>
</source>
}}
}}
If you want a view of a quadrotor in flightgear, make a link from
/usr/share/games/flightgear/Models/Aircraft/paparazzi to PAPARAZZI_SRC/conf/simulator/flightgear/
sudo ln -s $PAPARAZZI_SRC/conf/simulator/flightgear/ /usr/share/games/flightgear/Models/Aircraft/paparazzi


* Launch Flight Gear with the following command:
* Launch Flight Gear with the following command:
Line 46: Line 60:
or to e.g. use the mikrokopter quadrotor model:
or to e.g. use the mikrokopter quadrotor model:
  fgfs --fdm=null --native-gui=socket,in,30,,5501,udp --prop:/sim/model/path=Models/Aircraft/paparazzi/mikrokopter.xml
  fgfs --fdm=null --native-gui=socket,in,30,,5501,udp --prop:/sim/model/path=Models/Aircraft/paparazzi/mikrokopter.xml
== Loading scenery data ==
Using [http://wiki.flightgear.org/TerraSync TerraSync] you can let FlightGear automatically download scenery for where you are flying in the background. Add the '''--enable-terrasync''' option, e.g
fgfs --fdm=null --native-gui=socket,in,30,,5501,udp --prop:/sim/model/path=Models/Aircraft/paparazzi/mikrokopter.xml --enable-terrasync
It seems to be a good idea, to start fgfs with terrasync first, let it initialize and start the sim then, otherwise fgfs sometimes won't start.


[[Category:Simulation]] [[Category:Software]]
[[Category:Simulation]] [[Category:Software]]

Latest revision as of 12:19, 8 March 2021

FlightGear Flight Simulator which can be used to visualize an aircraft and scenery. For the actual simulation, see Simulation.

See http://www.flightgear.org/

Installation

Debian/Ubuntu

The standard Debian/Ubuntu repositories contain mostly older FlightGear versions.

A lot has improved and changed over the years. To get the latest greatest Flightgear, as of writing this iv vv2020.3.6 and enjoy the improvements one can easily get that version by add in a PPA

For Ubuntu the latest edition of FlightGear is available from Launchpad PPA (contributed by Saikrishna Arcot), to add the PPA an install the latest Flightgear, this in your terminal:

sudo add-apt-repository ppa:saiarcot895/flightgear
sudo apt-get update
sudo apt-get install flightgear

This will install v2020.3.1 or newer

Tip:

Not a Paparazzi issue but if you get a message box saying "zone.tab" missing copy an paste this in you terminal to fix it:

sudo apt-get install --reinstall flightgear-data-base

From source

A great page to read in case you want to install Flightgear from source can be found here

Adding Paparazzi 3D models

There are a few 3D UAV models that come with paparazzi:

  • mikrokopter.xml quadrotor frame
  • hexa.xml hexacopter
  • easystar.xml Multiplex EasyStar fixedwing
  • simple_bipe.xml biplane/quadrotor hybrid (transitioning vehicle)

To make them available in flightgear, make a link from /usr/share/games/flightgear/Models/Aircraft/paparazzi to <paparazzi_dir>/conf/simulator/flightgear/

sudo ln -s $PAPARAZZI_SRC/conf/simulator/flightgear/ /usr/share/games/flightgear/Models/Aircraft/paparazzi

Using FlightGear for Visualization

For Flight Gear visualization of the simulation, version 2018.2.2 or higher is best.

NOTE: Only if you still wish to use version v2.4 or lower for some reason, you must add the following to the firmware section of your airframe file:

File: conf/airframes/myplane.xml
  <firmware name="fixedwing or rotorcraft">
     ...
     <define name="FG_2_4" value="1"/>
     ...
  </firmware>
  • Launch Flight Gear with the following command:
fgfs --fdm=null --native-gui=socket,in,30,,5501,udp

or to e.g. use the mikrokopter quadrotor model:

fgfs --fdm=null --native-gui=socket,in,30,,5501,udp --prop:/sim/model/path=Models/Aircraft/paparazzi/mikrokopter.xml

Loading scenery data

Using TerraSync you can let FlightGear automatically download scenery for where you are flying in the background. Add the --enable-terrasync option, e.g

fgfs --fdm=null --native-gui=socket,in,30,,5501,udp --prop:/sim/model/path=Models/Aircraft/paparazzi/mikrokopter.xml --enable-terrasync

It seems to be a good idea, to start fgfs with terrasync first, let it initialize and start the sim then, otherwise fgfs sometimes won't start.