Elevated HeliPads for FS9 in XML

by Jeffrey Stanyer, Vic-Sim.com © 2004

You have Just created that sensational HeliPad for your Scenery, be it a Floating Pad on a lake or that sensational Oil Rig in the North Sea or Bass Straight or maybe even, that fantastic new building .

The problem is, you just cant land on the darn thing as there is No hard surface !!!

Problem solved ! what you will require is  tcalc_0.zip by Richard Ludowise from www.avsim.com and the Microsoft FS9 BGLC SDK.

Never used XML before, dont worry its not hard as all the works done for you, you just need to edit the code in MS Notepad and compile it.

First thing to do is to create a blank XML file.

Open MS Notepad and create a new file, then, save it as MYTESTPAD.XML in a folder of your choice.

When you go to open the file, do so by clicking with your RIGHT mouse button and selecting " open with Notepad ", once its open it will be empty !

Next we will Copy and Paste the following example into the  MYTESTPAD.XML file.

*** example code of working pad used with a custom designed Oil Rig ****

<?xml version="1.0"?>
<FSData
version="9.0"
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:noNamespaceSchemaLocation="bglcomp.xsd">
<Airport
region="Oceania"
country="Australia"
state="Victoria"
city="Bass Straight"
name="Oil Rig Perch"
lat="-38.5724330231803"
lon="147.322873029514"
alt="22.0"
ident="YUPE">
<Helipad
lat="-38.5724330231803"
lon="147.322873029514"
alt="22.0"
surface="UNKNOWN"
heading="0.00"
length="10"
width="10"
type="NONE"
closed="TRUE"
transparent="TRUE"/>
<Runway
lat="-38.5724330231803"
lon="147.322873029514"
alt="22.0"
surface="UNKNOWN"
heading="0.0"
length="10"
width="10"
number="36"
designator="NONE"
patternAltitude="503.799988"
primaryTakeoff="YES"
primaryLanding="YES"
primaryPattern="LEFT"
secondaryTakeoff="NO"
secondaryLanding="YES"
secondaryPattern="LEFT">
<RunwayStart
type="HELIPAD"
lat="-38.5724330231803"
lon="147.322873029514"
alt="22.0"
heading="0.0"
end="PRIMARY"/>
</Runway>
</Airport>
</FSData>

*** end sample code***

Now we need to edit this to suit your personal scenery.

Start up FS9 and wit your AirCraft in slew mode ( press the Y key ), goto the location where you want your Pad. Change to TopDown Mode and you will see a red cross on your Aircraft. This is the Ref Point of your view and this should be placed at the centre of the location that you want your pad.

Now, start up TCalc and you will see a window that shows you a lot of Data. What your looking for is the Decimal Lat and Lon of where your AirCraft Is.

These are the Co-Ordinates you will use to edit the above code for your own object. Next you will need to edit the Altitude of the Pad.

You can allso choose if you require a pad texture aswell and lets not forget the Size of the Pad.

Last but not least, we need to edit the region="xxx" country="xxx" state="xxx" city="xxx" name="xxx" of the Pad along with the ident="YUPE" .

Once this has been done, Save your File and you will now have an XML file that contains Data.

Now , copy and paste the XML file you have created to the FS2004SDK\BGLCOMP_SDK  Folder on your Hard Drive.

In this folder you will see a file called " bglcomp.exe ", drag your XML file over this icon and it will compile your file and you will have a file called MYTESTPAD.BGL  . All you need to do now is to cut and paste this BGL file to the scenery folder of your project and when you create a new flight in FS9 and type in the Ident code, your Helicopter will appear on the Pad without falling through.

Lines of Code you will need to Edit for Personal Scenery:

<?xml version="1.0"?>
<FSData
version="9.0"
xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'
xsi:noNamespaceSchemaLocation="bglcomp.xsd">
<Airport
region="Oceania"
country="Australia"
state="Victoria"
city="Bass Straight"
name="Oil Rig Perch"

lat="-38.5724330231803"
lon="147.322873029514"

alt="22.0"
ident="YUPE">
<Helipad
lat="-38.5724330231803"
lon="147.322873029514"

alt="22.0"
surface="UNKNOWN"
heading="0.00"
length="10"
width="10"

type="NONE"
closed="TRUE"
transparent="TRUE"/>
<Runway
lat="-38.5724330231803"
lon="147.322873029514"

alt="22.0"
surface="UNKNOWN"
heading="0.0"
length="10"
width="10"

number="36"
designator="NONE"
patternAltitude="503.799988"
primaryTakeoff="YES"
primaryLanding="YES"
primaryPattern="LEFT"
secondaryTakeoff="NO"
secondaryLanding="YES"
secondaryPattern="LEFT">
<RunwayStart
type="HELIPAD"
lat="-38.5724330231803"
lon="147.322873029514"
alt="22.0"
heading="0.0"
end="PRIMARY"/>
</Runway>
</Airport>
</FSData>


The Code in Colours by Group must be identical throughout the code, eg: blue = Lat Lon and must remain the same in all instances.

The Code in Black text  does not need to be changed so leave it as it is.

All sizes are easier to do in Meters for the Altitude ( alt= )and Pad / RWY sizes ( length= / width= )

Further Information regarding scenery in XML can be found within the SDK and Forums on the Internet.

 

This tutorial is due to the Efforts or Richard Ludowise and J.R.Morgan and all credit for its development is due to their efforts.

I only wrote this tutorial to share this info with you after testing it myself on my own projects with great results.

Regards: Jeffrey Stanyer

www.vic-sim.com © 2004