Hi All. (and @SM)
I promised a How-To explaining how to update an airport layout for terraGIT.
This howto assumes
- you know how to obtain (gateway) and modify (WED) the airport layout
- you know how to compile the terrain for Flightgear using terragear.
(if not, those 2 points above are howtos in their own right)
Part I: Beforehand, build enough terrain
Tipically, assuming you are updating only 1 airport, you will be building no more than 1x1 degree tiles. Which is very fast terragear processing. Maybe, you need to have preprocessed v0 landclasses, that are offered for the whole world, and this is a pre-processing slower step! (Worldwide v0 landclasses)
I recommend you actually build a 3x3 degree tile, which center is the tile of interest.
Example: let's update Quantico (KNYG)
wikipedia wrote:Marine Corps Air Facility Quantico (MCAF Quantico) (IATA: NYG, ICAO: KNYG, FAA LID: NYG) is a United States Marine Corps airfield located within Marine Corps Base Quantico, Virginia. It was commissioned in 1919 and is currently home to HMX-1, the squadron that flies the President of the United States.
The gateway: https://gateway.x-plane.com/scenery/page/KNYG
Tells us the location (or tile) is 38(N) -77(W) [+ is N or E, - is S or W respectively]
This means the KNYG layout (btg file) should be in the 10x10 degree tile corresponding to w080n30/w078n38.
(think why w080 and w078 respectively!)
In any case. Fair enough, it that tile repository
https://github.com/FGMEMBERS-TERRAGIT/w080n30
in the branch Terrain
https://github.com/FGMEMBERS-TERRAGIT/w080n30/tree/Terrain
in the directory w078n38
https://github.com/FGMEMBERS-TERRAGIT/w080n30/tree/Terrain/w078n38
we find the KNYG current layout to be updated
https://github.com/FGMEMBERS-TERRAGIT/w080n30/blob/Terrain/w078n38/KNYG.btg.gz
But we also learnt that there are several more aiports in that 1x1 degree subdirectory
Again: here:https://github.com/FGMEMBERS-TERRAGIT/w080n30/tree/Terrain/w078n38
Basically, the first recommendation is build a 3x3 degree tile (making sure airports stepping the tile boundary are not chopped off if rebuilt, and guaranteing a good tile seam merging)
in this case, the terragear runs with a --min-lat=37 and a --max-lat=39 (38, the target, centered!) and a --min-lon=-78 --max=lon=-76, centered around -77.
Part II: Did you ran genapts for enough airports?
If you are just replacing an airport, in principle, you should be golden with running genapts850 only in the airport of interest.
Not really. Almost, but not quite. You will need to rebuild any airport in the same scenery quad.
What?
Simple. Let's look at the KNYG directory again. There are terrain objects like 1679400.btg.gz, and airport objects like KDCA.btg.gz. There is also stg files that indicate flightgear what models or airports to place in the given quad. Like 1679400.stg. Clearly this quad does not contain KNYG!. So the question is which one?
You need to figure out. I use grep (a linux application to search all stg in the directory like this)
Code: Select all
grep KNYG *stg
which returns
Code: Select all
1679394.stg:OBJECT KNYG.btg
Telling me what stg file to read.
https://github.com/FGMEMBERS-TERRAGIT/w080n30/blob/Terrain/w078n38/1679394.stg
By reading it, I learn that in the same quad I'll find another airport MD39, which I'll need to get from the gateway
https://gateway.x-plane.com/scenery/page/MD39
And run genapts850 as well (in addition to) KNYG