Sunday, 15 March 2015

UK Airspace - How did I do it?

The key to quickly covering an entire country using real world data was a spreadsheet I created.


As you can see there is an input section at the top left.  All I need to do is cut and paste the info from the Aeronautical Information Publication for the UK (available at http://www.nats-uk.ead-it.com/public/index.php.html)

If I include a comms frequency it will automatically include that as well.

All I need to do is press a key and the spreadsheet will output the correctly formatted xml code for use in flight sim for that airspace.  All that needs to be done is to cut and paste that into a txt document and drop it onto bglcomp.exe from the SDK.

Hey presto! There is then a nice bgl to use in your preferred simulator....

Obviously all the magic happens on a sheet behind this one!!!!

UK Airspace Scenery Project

As most people are aware, the default data shipped with FSX/P3D dates back to 2006 at the latest and probably some before that!

For the past couple of months I have been quietly working on a not so little project to update the airspace in FSX/P3D so that it matches the real world as defined in the UK AIP. 

I have first removed all default data relating to the UK from the stock files.

To date, I have added up to date information contained in:

ENR2.1 - All class A airspace and TMAs etc.
ENR2.2 - Government aerodromes and Military Aerodrome Traffic Zones.
ENR3.1 - UK Lower Airways (surface to FL195)
AD2 - Aerodrome controlled airspace.
ENR6 - Altimeter setting regions

This all works in the simulator GPS units etc, as well as in external flight planner that scan scenery files, such as Plan-G. (Shown below - all UK data shown is bespoke updated material)

 
Still to be added are:
ENR4.1 - Radio Navigation Aids (Default data to be updated where necessary)
ENR4.4 - Name code designators for significant points ((Default data to be updated where necessary)
ENR5.1 - Prohibited, Restricted and Danger areas
ENR5.2 - Military Exercise and Training areas
ENR5.3 - Other activities of a dangerous nature
ENR5.5 - Aerial sporting and recreational activities
ENR5.6 - Bird migration and areas with sensitive fauna
 

Monday, 2 March 2015

Accuracy of water masks.

I've reviewed what I did 2 years ago and can't for the life of me replicate the process.  So, I found an easier way to get it accurate, since the Google Earth imagery doesn't appear to be 100% aligned with the virtual earth imagery I use for photoscenery in FSET.

FSET loads the areaKML.kml file in its work folder when you click 'K'.  With Google Earth and FSET open alongside each other it's easy to quickly amend the polygon points for a water mask in Google Earth, save the KML file, click K in FSET to reload it and see whether it aligns OK.

The following image shows the three steps, with Google Earth displayed on the left and FSET on the right.  You can see in the Google Earth image that there is a loaded kml file shown by the thin red line.  The same line is shown in FSET by the thin blue line.


In the top pic we can see the blue watermask line is not properly aligned to the coast in FSET.  If we used this as it is, the transparency in the photoscenery wouldn't show the water correctly.

So in the middle pic we can see I have adjusted the kml file in Google Earth.  At this point nothing has changed in FSET.  Then I save the kml file to the work folder in FSET and click 'K'.

The bottom pic shows how the blue line changes in FSET and now far more closely follows the coastal imagery that I will be using to create photoscenery.  The transparency FSET introduces will now really match the water poly that will lie underneath and the actual coastline in the scenery, leading to good visual results in the sim!

This way I should be able to update all the water mask polys to show 99%accuracy with the coastline and interior water features quite easily.

I've also tested out a couple of values in the FSEarthMasks.ini file that control how FSET a deals with water transparency effects.  I don't like seeing a sharp definition where the water starts unless it's like that in real life, as it looks too fake for me.  I settled on values starting from 0 (no transparency) to 1 (full transparency) and altering the distance from my deep water lines that the transparency extends to.

I also, to prove I could still do it, worked out a method for importing kml files into SBuilderX, which is necessary to produce the water polys.

I ended up doing this by installing QGIS.   Easy to do, and free.  Now all I need to do is save an accurate (described above) KML file in Google Earth, import it into QGIS and save as an ESTI shp file that can be imported straight into SBuilderX.  I can fairly easily manipulate the polys in SBuilderX to only cover individual QMID11 squares (see the app that will build those in Google Earth for you in an earlier post!).  I can then use SBX to compile water polys and flattens for the appropriate water areas :)