Last week I spent a little bit of time looking at a bug: some ILS approach paths have tall buildings in the way. For an example, fly the ILS 22L into KBOS, and look to your right on short final. I hope the people living in those apartment buildings like watching airplanes!
A Library Bug
It looks like the bug is caused by a bad mapping of art assets in the library. The global scenery DSFs contain virtual paths for art assets, which are then mapped to real autogen art assets by the library. The virtual paths indicate the legal height ranges that the autogen can extend to, e.g. the library path
Indicates that this art asset fills a square block at least 30m deep with roads on all four sides, and the buildings should be between 32 and 40m tall for the tallest ones included. (The actual encoding of the library is partly handled by scripts we use to build the global scenery, and the encoding is byzantine enough that neither Alex nor I understand the entire thing.)
Well, if the virtual library path calls for a low building but the physical art asset contains tall buildings, you get skyscrapers in places you did not want them. And that is exactly the bug causing the ILS incursions.
I have an edit to the library paths for our next release (probably 10.30) that should fix this problem. The good news about this being a bug in the library (and not the DSFs) is that a single library fix will fix the problem everywhere.
For the Brave
(This is a hack to the sim…don’t try this if you aren’t willing to break your copy of X-Plane. If you try this and your sim dies, please don’t contact me or tech support!)
If you want to patch this bug yourself now in 10.25, simply locate the file
Resources/default scenery/1000 autogen/library.txt
and replace it with this file: library.txt. Warning: because this is a mod to the sim itself, when you go to update, you will get a warning as to whether you want to overwrite the file. When the next beta or release comes out, do overwrite this file!
What About the Raw Data
I also wrote some code to attempt to ‘protect’ the ILS approach path in our DSF generator. Here’s a picture:
What you see here is a color-coded trace of height limits for autogen. Red are the strongest height restrictions, yellow less so. The height restrictions take into account not only the glide slope, but also the terrain; in the case of KSAN, the airport is at the bottom of a hill next to a mesa, so the ‘red’ (low flying planes) zone is quite large – even when a plane is on a 2 mile final, the plane is low to the ground because the ground is higher up.
The logic of the code is to let all ‘known’ tall buildings exist, but limit any generated tall buildings to follow the height restriction.
Here’s the thing: having coded it, I have not caught any cases where the autogen buildings were violating the height restrictions!
Buildings that we generate (without obstacle data) always have a maximum height that is a fraction of the FAA-spec’d tallest building. The idea is that if the FAA says there is a single 80m (roughly 20 story) building, then the nearby buildings are probably somewhat tall, but they’re not also 80m – if they were, the FAA data would include them. So we might generate some 40m buildings near the 80m building to create a plausible ‘neighborhood’.
From what I can tell, the fact that the generated buildings are so much lower than the FAA datapoints keeps them out of the approach path, and the actual cause of tall buildings has been the library path misalignment. (For example, in the KBOS 22L case, the block has an 8m height restriction and yet the buildings are either 50m or 70m tall, I can’t remember which.)
I think I am going to keep the ILS-protecting DSF generation code around – it’s useful to have approach paths noted, and it’s something we’ve been intending to do for quite a while. But the library fix is what will make a real difference.