Building FlightGear with osgEarth Integration
|This article is incomplete. Please help improve the article, or discuss the issue on the talk page.|
| The FlightGear forum has a
subforum related to: OsgEarth support in FlightGear
| Note Development of FlightGear osgEarth integration takes place in separate repositories.
Updated branches for FG 2016.2.0: 2016.2.0-OsgEarth
The repositories for simgear- and flightgear- osgEarth are on:
The corresponding fgdata is at:
| This section contains out-of-date information
|Someone able to build from source should still be able to get osgEarth working without too much effort - on Windows there should even be some kind of "overlay" (set of patch files) - I am not sure if those have recently been updated for 3.2 though.
|It is what it is, and being what it is (a set of external patches), it has a certain barrier to entry, and learning curve, associated with it.
Basically, people wanting to use this, will need to know how to build FlightGear from source, how to use git and how to apply patches.
People with a working build environment should have no problems getting this to work - the main caveat being currently that some recent sg/fg developments would not be integrated yet.But otherwise, all the documentation that you can find on the wiki about building FlightGear from source, using git, will be applicable - the main difference is that once you have everything set up and working to build stock fgfs, you would add poweroftwo's gitlab branches as git remotes, and then build an older version of SimGear/FlightGear which contains the corresponding patches.
— Hooray (Feb 20th, 2016). Re: 3.2 osgearth or other integrated real time satellite dat.
(powered by Instant-Cquotes)
|That's basically the whole idea behind osgEarth. It can do satellite/orthoimagery (that's what you see advertised the most), but it can also load shapefiles, DEM etc. And it even comes with built-in LOD algorithms. See their Google+ page for some recent screenshots and videos: https://plus.google.com/+OsgearthOrg/posts
Jeff has done/is doing excellent working integrating it to FlightGear. I'd definitely encourage anyone interested in generating scenery on the fly to look into that before anything else.
Building on Linux (Arch Linux)
Updated as of 2016-12-09
While I am using Arch Linux the build instructions should also be applicable on other GNU/Linux distributions.
Note however that this feature should still be considered experimental. The build process can be tedious and things may not work as expected.
In case you never build FG from source you may try to build the regular version first. Understanding what you're doing should greatly help in getting this to work.
All that is needed to build regular FlightGear from source.
I used OpenSceneGraph 3.4.0, installed via package manager.
- evtl. more ?? (check the configure outputs)
Below instructions will use a directory inside the user's home. So it does not conflict with system-wide installed packages.
Create a directory for the build process inside your home:
$ mkdir FG-osgE $ mkdir FG-osgE/local # (install dir) $ cd FG-osgE
Due to a change not yet adapted in simgear-osgearth, the master branch cannot be used currently. Sticking to a specific version would be useful anyway, so I used the tag
For this to work, in turn, a commit in simgear-osgearth has to be reverted in the next step. (This situation is not optimal and should be improved.)
$ git clone https://github.com/gwaldron/osgearth.git $ cd osgearth/ $ git checkout -b osgearth-2.8 osgearth-2.8 $ mkdir ../osgearth-build $ cd ../osgearth-build $ cmake ../osgearth -DCMAKE_INSTALL_PREFIX="$HOME/FG-osgE/local" $ make -jN $ make install $ cd ..
With N being the number of CPU's you want to use, e.g.:
$ make -j3
$ git clone https://gitlab.com/poweroftwo/simgear-osgearth.git $ cd simgear-osgearth $ git checkout 2016.2.0-OsgEarth
Branch is at commit:
Since we use osgEarth-2.8 we need to revert an API change commit.
$ git revert 8777ad51e2ebc3ba5b55112e391e99504bb5d079 (Save the log.) $ mkdir ../simgear-osgearth-build $ cd ../simgear-osgearth-build $ cmake ../simgear-osgearth -DCMAKE_INSTALL_PREFIX="$HOME/FG-osgE/local" $ make -jN $ make install $ cd ..
$ git clone https://gitlab.com/poweroftwo/flightgear-osgearth.git $ cd flightgear-osgearth $ git checkout 2016.2.0-OsgEarth $ mkdir ../flightgear-osgearth-build $ cd ../flightgear-osgearth-build $ SIMGEAR_DIR="$HOME/FG-osgE/local" cmake ../flightgear-osgearth -DCMAKE_INSTALL_PREFIX="$HOME/FG-osgE/local" $ make install $ cd ..
I had to correct the gdal includes in
src/Viewer/OsgEarthHeightField.cxx and add
-DCMAKE_EXE_LINKER_FLAGS="-lgdal" to the cmake command, but that might be an Arch specific problem.
Though I cannot find gdal in the CMakeLists.txt so it would evtl. be good/necessary to add it there (probably not that easy).
Clone or download from https://bitbucket.org/simperative/fgdata.
$ git clone https://bitbucket.org/simperative/fgdata.git $ cd fgdata $ git fetch && git checkout 2016.2.0-OsgEarth
Commands or a script, e.g.:
#!/bin/bash # # export LD_LIBRARY_PATH="$HOME/FG-osgE/local/lib64" export FG_ROOT="$HOME/FG-osgE/fgdata" export FG_HOME="$HOME/.fgfs-osgE" local/bin/fgfs
Activate osgEarth via the menu View --> Rendering Options --> osgEarth.
Run-time issues / missing features
- landing lights are misplaced (in the air) on KSFO (others?)
- metar data not available (probably easy to fix, maybe something like a wrong url?)
- terrain is always lit up (though brightness can be set manually)
- aircraft may sink into ground when switching to osgEarth
Main FG Scenery development seems to go in other directions. It might take some time till the next release though.
- https://forum.flightgear.org/viewtopic.php?f=5&t=29693 Next-generation scenery generating?
Also there is interesting OSM (openstreetmap) stuff going on, you may want to check out.
- I found this solution on a french forum: http://fr.flightgear.org/forums/viewtopic.php?id=3383&p=3