TerraSync: Difference between revisions

From FlightGear wiki
Jump to navigation Jump to search
(alternative way to download scenery and caveat for first-time download)
Line 13: Line 13:
It is recommended to use a separate scenery directory for TerraSync (i.e. do not run have it store its downloaded files in your main scenery directory) because network interruptions may upset the synchronization protocol and garble what is stored there. If/when that happens the easiest solution is to delete the affected subdirectory and let terrasync download it again (see [[Howto:_Animated_jetways#Usage]].
It is recommended to use a separate scenery directory for TerraSync (i.e. do not run have it store its downloaded files in your main scenery directory) because network interruptions may upset the synchronization protocol and garble what is stored there. If/when that happens the easiest solution is to delete the affected subdirectory and let terrasync download it again (see [[Howto:_Animated_jetways#Usage]].


== Status 06/2013 - FlightGear 2.11+ ==
Note: SimGear 2.11+ now has experimental support for a libsvn replacement, people building from source are encouraged to help with testing and debugging this new feature:
{{cquote|<nowiki>First, I need some help; for people to rebuild simgear with -DSG_SVN_CLIENT=1, and mv / erase their TerraSync dir. Then simply run FGFS as normal, as if you were starting on a new machine / account with no previous use of TerraSync.</nowiki><ref>{{cite web |url=http://www.mail-archive.com/flightgear-devel@lists.sourceforge.net/msg40191.html|title=TerraSync libSVN replacement testing|author=James Turner|date=Tue, 11 Jun 2013 08:58:20 -0700}}</ref>|James Turner}}
<references/>
== Running TerraSync ==
== Running TerraSync ==
=== FlightGear 2.4.0 and later ===
=== FlightGear 2.4.0 and later ===

Revision as of 16:23, 11 June 2013

Not to be confused with TerraGear, a toolset to generate scenery.

To see the terrain below your aircraft, you have to install the respective scenery. This can happen by downloading certain bits of scenery before flying as described in the article installing scenery.

Alternatively, if you have a steady and reasonably fast internet connection, you can use TerraSync. It is a utility that automatically downloads the newest version of the needed FlightGear scenery while the simulator is running. TerraSync runs in the background in a separate process, monitors your position, and downloads (or updates) the latest greatest scenery from the master scenery server "just in time".

The master repository for TerraSync, i.e. the online resource from which TerraSync downloads its files, is synchronized with the FlightGear Scenery Database once a day. So when using TerraSync, you will always have

  1. the latest .stg-files, which tell FlightGear where to place an object
  2. the latest static models for objects. (Static models define unique objects that exist in one place only, such as famous buildings or landmarks.)

As of March 2011, TerraSync also downloads shared models (generic models used more than once in different places, each can represent many different objects, like generic houses or ships), at least when it first runs. It does not, however, install the shared models, and until they are installed in the right place, you won't see any objects that are based on them. You will need to copy all the files from the Models directory inside your TerraSync directory to $FG_ROOT/Models, replacing the files that are already there. If for some reason you suspect your models are not up-to-date, you can also manually download the newest shared models archive from the FlightGear Scenery Database. Unpack it to $FG_ROOT/Models.

It is recommended to use a separate scenery directory for TerraSync (i.e. do not run have it store its downloaded files in your main scenery directory) because network interruptions may upset the synchronization protocol and garble what is stored there. If/when that happens the easiest solution is to delete the affected subdirectory and let terrasync download it again (see Howto:_Animated_jetways#Usage.

Status 06/2013 - FlightGear 2.11+

Note: SimGear 2.11+ now has experimental support for a libsvn replacement, people building from source are encouraged to help with testing and debugging this new feature:

Cquote1.png First, I need some help; for people to rebuild simgear with -DSG_SVN_CLIENT=1, and mv / erase their TerraSync dir. Then simply run FGFS as normal, as if you were starting on a new machine / account with no previous use of TerraSync.[1]
— James Turner
Cquote2.png
  1. James Turner (Tue, 11 Jun 2013 08:58:20 -0700). TerraSync libSVN replacement testing.

Running TerraSync

FlightGear 2.4.0 and later

As of FlightGear 2.4.0, TerraSync controls are integrated in the usual FlightGear menu, under Environment > Scenery Download. You can also check the "Download scenery on the fly" in the setup GUI. Note that if you set your aircraft to start in a new area, where you have not yet downloaded any scenery, your aircraft may first appear to be in the water until sufficient scenery has downloaded. You can go to Environment > Scenery Download and choose "Manual Refresh" to apply scenery updates.

POSIX compliant command line shell

Start TerraSync:

% nice terrasync -p 5500 -S -d "$HOME/fgfsScenery"

The -S option tells terrasync to use the SVN protocol to fetch data. If you omit it terrasync will use the rsync program instead (which has to be installed on your system).

Start FlightGear:

% fgfs --atlas=socket,out,1,localhost,5500,udp --fg-scenery="$FG_ROOT/Scenery/:$HOME/fgfsScenery"

The full documentation and source for TerraSync is located in the FlightGear source distribution (in utils/TerraSync/).

FGRun in FlightGear 2.2.0

  1. After starting FGRun, make sure you are in the first screen where you can set up directories. One time "Back" from the aircraft selection page. You are now at the "Path" page.
  2. You can create a list of scenery directories next to "FG_SCENERY". Select the line that TerraSync will be using and press the "TerraSync directory" button on the right. A small "T" will appear on the selected line, indicating that this one is set up as TerraSync direcotry.
    • The directories are being loaded from top to bottom, so make sure TerraSync is on top (unless you want to "surpass" terrasync and siplay scenery from another directory). When two directories contain scenery for the same region, FlightGear will take the scenery from the directory higher in the list.
  3. Finally, go to the last screen. There you have to activate TerraSync as in the following screenshot. Now TerraSync should work.
    TerraSync 2.png

Note: Expect your firewall to block it the first time you run it; just tell the firewall to allow TerraSync to use the port.

FGRun in FlightGear 1.9.1

  1. After starting FGRun, make sure you are in the first screen where you can set up directories. One time "Back" from the aircraft selection page. You are now here:
    TerraSync 1.png
  2. Select the destination folder for all files downloaded by terrasync. Usually the folder $FG_ROOT\terrasync already exists and you only have to add it to the list (as in the above example). Insure that it is positioned above your standard scenery folder (here that is FlightGear191\scenery) and all other directories over which the terrasync folder is supposed to have priority. When two directories contain information for the same region, FlightGear will take the information from the directory higher in the list. On Linux make sure the directory does not only to have a T, but also is the topmost folder.
  3. For TerraSync to know where to deposit the downloaded files, you have to tell the program which folder is the destination folder. In the above example, it is the 3rd in the list.
  4. Finally, go to the last screen. There you have to activate TerraSync as in the following screenshot. Now TerraSync should work.
    TerraSync 2.png

Note: Expect your firewall to block it the first time you run it; just tell the firewall to allow TerraSync to use the port.

Troubleshooting

Problem 1

If you get an error similar to the following in the command line console (black dialog):

Airports/L ... failed:
Can't move 'C:\FlightGear\terrasync\Airports\L\E\.svn\tmp\entries' to 'C:\FlightGear\terrasync\Airports\L\E\.svn\entries': The file or directory is corrupted and unreadable.

and possibly the following popup appears:

TerraSync Taskbar Error.png

Solution 1

You can probably fix the error by upgrading to Windows 7 Home Premium Service Pack 1.


Problem 2

You get an error indicating locked airport directories while TerraSync is running.

Working copy 'D:\Program Files\FlightGear 2.4.0\terrasync\Airports\K' locked

While those directories often actually are updated, the error is annoying.

Solution 2

Search the TerraSync directory for files named lock and delete them. They are supposed to be removed automatically when a TerraSync update is completed, but sometimes that fails.

Related content