TerraSync: Difference between revisions

1,956 bytes added ,  3 August 2019
m (→‎News: https://sourceforge.net/p/flightgear/mailman/message/35081518/)
(13 intermediate revisions by 6 users not shown)
Line 4: Line 4:


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 (optionally as a separate process), monitors your position, and downloads (or updates) the latest scenery from the master scenery server "just in time".
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 (optionally as a separate process), monitors your position, and downloads (or updates) the latest scenery from the master scenery server "just in time".
For some time now TerraSync has been integrated into the core FlightGear process, so there is no need to deal with TerraSync for the typical user.


The master repository for TerraSync, i.e. the online resource from which TerraSync downloads its files, is synchronized with the [http://scenemodels.flightgear.org/ FlightGear Scenery Database] once a day. So when using TerraSync, you will always have  
The master repository for TerraSync, i.e. the online resource from which TerraSync downloads its files, is synchronized with the [http://scenemodels.flightgear.org/ FlightGear Scenery Database] once a day. So when using TerraSync, you will always have  
Line 10: Line 11:
# the latest '''shared''' models for objects. (Generic models used more than once in different places, each can represent many different objects, like generic houses or ships)
# the latest '''shared''' models for objects. (Generic models used more than once in different places, each can represent many different objects, like generic houses or ships)
   
   
== Announcements ==
Also as a result from FSweekend, we are going to test some ideas how to distribute osm2city generated scenery with terrasync. As a first step I have just added a folder called Objects_1 containing the osm2city buildings for e005n46 up to e010n48 [http://flightgear.sourceforge.net/scenery/Objects_1/]. People using the fgfs integrated terrasync should not (yet) notice any difference. When using terrasync.py you should notice download of files in those folders, however they do not (yet) show up in the scenery. We probably throw away some or all files in that directory without prior notice, so please don't rely on them or make backup copies. Torsten <ref>{{cite web
  |url    =  https://sourceforge.net/p/flightgear/mailman/message/35476181/
  |title  =  <nowiki> [Flightgear-devel] ATTN: terrasync changes </nowiki>
  |author =  <nowiki> Torsten Dreyer </nowiki>
  |date  =  Nov 7th, 2016
  |added  =  Nov 7th, 2016
  |script_version = 0.40
  }}</ref>
== News ==
== News ==
Terrasync started out as a standalone rsync-based utility. However, there doesn't appear to be any good/robust multi-platform librsync available for our use. We wanted to embed terrasync right into the core code so we could better coordinate downloading tiles and then loading them immediately into the sim (versus sometimes running into no tiles or partial tiles if an external tool was running rsync.)<ref>{{cite web
Terrasync started out as a standalone rsync-based utility. However, there doesn't appear to be any good/robust multi-platform librsync available for our use. We wanted to embed terrasync right into the core code so we could better coordinate downloading tiles and then loading them immediately into the sim (versus sometimes running into no tiles or partial tiles if an external tool was running rsync.)<ref>{{cite web
Line 111: Line 122:


== terrasync.py ==
== terrasync.py ==
First of all: you will now find it at its new home here: https://sourceforge.net/p/flightgear/flightgear/ci/next/tree/scripts/python/terrasync.py  
First of all: you will now find it at its new home here: {{flightgear url|scripts/python/TerraSync/terrasync.py}}


The script now is able to provide a complete mirror of the scenery data also known as terrasync scenery or just terrascenery.  
The script now is able to provide a complete mirror of the scenery data also known as terrasync scenery or just terrascenery.  


{{Caution|For the impatient, before you try it out: If you run this script for the first time, it will download more than 80GB of data and more than 1,000,000 files in 40,000 folders to your hard disk. It will run for hours, probably days (depending on your internet connection).}}
{{Caution|For the impatient, before you try it out: If you run this script for the first time, it will download more than 90GB of data and more than 1,800,000 files in 40,000 folders to your hard disk. It will run for hours, probably days (depending on your internet connection).}}


If you already have at least a partial set of scenery data from flightgear's built-in terrasync or even a full SVN checkout, existing and up-to-date files will be reused and are not being downloaded a second time.  
If you already have at least a partial set of scenery data from flightgear's built-in terrasync or even a full SVN checkout, existing and up-to-date files will be reused and are not being downloaded a second time.  
Line 144: Line 155:
# use another server to pull the data, not the sourceforge master  
# use another server to pull the data, not the sourceforge master  
terrasync.py --target=/home/joe/fg/scenery --url= http://someserver.org/otherscenery  
terrasync.py --target=/home/joe/fg/scenery --url= http://someserver.org/otherscenery  
# restrict the area (must be integers, not decimals)
terrasync.py --target=/home/joe/fg/scenery --top 50 --left 18 --bottom 49 --right 19
</syntaxhighlight>
</syntaxhighlight>
Switching between SVN and HTTP terrasync is just a matter of setting a property on startup. Setting <code>--prop:string:/sim/terrasync/http-server=automatic</code> enables the HTTP repository, not setting the property will lead to using the SVN repository. The code seems to be robust enough that one may switch back and forth between the repositories without loosing data.<ref>{{cite web
  |url    =  https://sourceforge.net/p/flightgear/mailman/message/35082702/
  |title  =  <nowiki> Re: [Flightgear-devel] Enable terrasync/http by default </nowiki>
  |author =  <nowiki> Torsten Dreyer </nowiki>
  |date  =  May 12th, 2016
  |added  =  May 12th, 2016
  |script_version = 0.36
  }}</ref>
Enjoy, feedback welcome.<ref>{{cite web
Enjoy, feedback welcome.<ref>{{cite web
   |url    =  https://sourceforge.net/p/flightgear/mailman/message/35081518/  
   |url    =  https://sourceforge.net/p/flightgear/mailman/message/35081518/  
Line 262: Line 287:
[[es:TerraSync]]
[[es:TerraSync]]
[[fr:TerraSync]]
[[fr:TerraSync]]
[[nl:Terrasync]]
648

edits