SCASM 2.50/2.91

Instructions for the new Airport Facility Directory format
(not for FS2004)

  
command index:
 
back to main index
 
Container( )
EndC
APLocation( )
ICAO_ID( id )
RwyLoc( ) - FS2002
RwyLoc( ) - FS2000
Frequency( )
Navaid( )
SetupLoc( )
Tower( )
AI_DataStart
AI_DataEnd
TaxiwayPoints( )
Positions( )
TaxiwayPath( )
TaxiwayNames( )
AI_Border( )
NameList( )
NameEntry( )
EndNL

The new Facility Directory format (FS98) is stored in BGL files with an extended fileheader. It is not recomended to mix these commands (section 20) with others in one source file.
The facility entries are stored in so called object containers wich carry all data for one facility directory entry. Please follow exactly the recomended sequence of instructions since SCASM does not check this.
In FS98 this data is only used for the "Goto Airport" menu and for pilot information. In FS2002 these data are also used by the artificial intelligence aircrafts (AI aircrafts).

It is strongly recommend to compile the new facility data as a single BGL file since everytime a new facility data file is found by FS the database index is generated again. This dramatically slows down the new scenery testing.

The installation of AFD BGL files to FS98 is a little tricky. If you want to see your data in the "Airport Facility Directory" menu you have to use one of the already existing region names from the map.
If you want to add an AFD file to an already existing scenery directory you have to deactivate this scenery in the scenery library. After this update your scenery directory with the AFD file and then activate the scenery again. It seems this procedure is only needed if you add an AFD file to an scenery directory the first time.
If you do not follow these procedure it sometimes happen that not all files are updated corectly.
For FS2002 it is recommended to use the new *AFD.BGL file as an input file for AFDLink.exe to update existing *AFD files. Please see the documentation of AFDLink.exe for more information.

To have a look ito AFD-BGL's please use my AFDTree program. This program will give you an idea about the data structure in these files.
In FS2K and later there are new data containers. It seems that these containers carry airway and airspace data. These data are currently not suported by SCASM and AFDTree. These data are not listed in the NameList and therefore are invisible for AFDTree.

TOP 

 

FS98 - FS2002
Container( type ref# )
 
type APT 1 Airport
 VOR 1 VOR
 NDB 3 NDB
  use the code or any of the index numbers.
ref#  reference number of this object container. This number is used internally in SCASM and must be unique in this file. See NameList() for more information.

A typical instruction sequence for an airport container:
Container( APT  1 )
    APLocation()
    ICAO_ID()                ; optional ?, not used
                             ;  in CFS
    ; repeated for every Rwy
      RwyLoc( ... )
      Navaid( ..ILS_LOC.. )  ; optional
      Navaid( ..ILS_GP.. )   ; optional
      Navaid( ..ILS_DME.. )  ; optional
      ;
    ; --- end of runways ---
    Navaid( ..OM/MM/IM.. ) ; optional
    ; ...
    Frequency()  ; optional
    ...
    Frequency()
    SetupLoc()
    ...
    SetupLoc()
    Tower(...)   ; FS2002 optional
    ; insert AI traffic commands here
    ;   (optional for FS2002)
EndC
 
; Example for an VOR container
Container ( VOR 27 )
  Navaid( ... 113.80 VOR HIGHALT 0 ID_string )
      ; the VOR
  Navaid( ... 113.80 DME 3 0 ID_string )
      ; and it's DME
EndC
 
; Example for an NDB container
Container ( NDB 47 )
  Navaid( .. NDB .. )
EndC

TOP 

FS98 - FS2002
EndC
 
This command indicates the end of an object container.

TOP 

FS98 - FS2002
APLocation( Lat Lon elev )
 
elev  airport elevation in meters

This is the reference point of the airport.

TOP 

FS98 - FS2000
ICAO_ID( id )
 
id  the airports ICAO ID string

TOP 

FS98 - FS2000 (FS2002)
RwyLoc( Lat Lon elev hdg magvar len wid type number surface )
 
hdg  true heading of this runway
magvar  magnetic variation (often found 0!)
len  length of the runway in ft
wid  width of the runway in ft
type  N or 0  runway (normal)
  L or 1  left
  R or 2  right
  C or 3  center
  H or 4  helipad
number  The runway ID number
surface  Surface type, use the code name or the id numbers:
  UNKNOWN  0
  DIRT  1
  CEMENT  2
  ASPHALT  3
  GRASS  4
  GRAVEL  5
  MATS  7
  SNOW  8
  CORAL  9
  WATER  10

There is only one entry for both runway directions. Heading and ID should be chosen for the lowest number.

TOP 

2.85 - FS2002
RwyLoc( Lat Lon elev hdg magvar len wid type number surface
flags alt2 )

 This instruction uses 2 aditional parameters. This format is enabled for FS2002 with Set( fsvers 0x800 ).
 
flags  unknown, often found values are 0x60, 0x50
alt2  maybe this is the altitude (AGL in m) for the traffic pattern
 
hdg  true heading of this runway
magvar  magnetic variation (often found 0!)
len  length of the runway in ft
wid  width of the runway in ft
type  N or 0  runway (normal)
  L or 1  left
  R or 2  right
  C or 3  center
  H or 4  helipad
number  The runway ID number
surface  Surface type, use the code name or the id numbers:
  UNKNOWN  0
  DIRT  1
  CEMENT  2
  ASPHALT  3
  GRASS  4
  GRAVEL  5
  MATS  7
  SNOW  8
  CORAL  9
  WATER  10

There is only one entry for both runway directions. Heading and ID should be chosen for the lowest number.

TOP 

FS98 - FS2002
Frequency( frq type ["text"] )
 
freq  frequency i.e. 125.75
type  ATIS
  MULTICOM
  UNICOM
  CTAF
  GNDCON
  CT
  CDEL
  APCON
  DEPCON
  CENTER
  FSS
  AWOS
  or any number
"text"  This text is optional. Enter nothing if no text is used.
Only used by FS2002

If more than one frequency is specified for an airport, FS98 displays only the first one!

TOP 

 
hdg  heading for VOR and ILS localisers
glideslope angle for ILS glideslope
0 for NDB and Markers
frq  frequency in Mhz
0 for Markers,
channel No. (without X or Y) for TACAN
For NDB frequencies like 325.5 kHz please enter 0.3255
type  VOR  ..if needed add an DME entry
  DME  normally added to an VOR or ILS, but also possible as "stand allone"
  NDB   
  LOC  ILS LOCaliser
  SLOPE  2nd entry for ILS, glide slope angle is in the hdg field, usually 3.0 degrees.
  SDF  Simplified Directional Facility replaces LOC in some special cases (in FS98 this is realised as normal ILS)
  MARKER  Marker beacon,
class field -> OM, MM, IM
It seems the name field is only used if there is an NDB co-located with this marker. In this case the name of the NDB is used.
  TACAN  a DME _MUST_ follow!
Use the channel number (without X or Y) for the frequency entry. The correct frequency must follow in the DME record.
  or index number
Note: VOR/TACAN and NDB should only be used in their own container type. (see Container() )
class  NONE  0 unused
  TERMINAL  1
  LOWALT  2 low altitude
  HIGHALT  3 high altitude
  NDBCOMP  4 NDB compass locator
  NDBMH  5 NDB_MH
  NDBH  6 NDB_H
  NDBHH  7 NDB_HH
  OM  8
  MM  9
  IM  10
  BC  11
  0 if unused
flags  1 if voice announce.
It is unknown if this flag is related to ATIS messages, which sometimes are transmitted via VOR or NDB, or to the morse code ID. In FS98 most VOR seem to have this flag set to 1 and NDB, ILS & Markers set to 0.
ID  Navaids identifier string, use "" if not used.
It is strongly recommended to enter an ID string and to use the same ID for all components of an assembled navaid. Otherwise FS may have problems in recognising the navaid.

Several of this instructions with different types are used to assemble a complete NAVAID. To build an ILS system you need at least the LOC type. For an complete ILS specify LOC, SLOPE and DME always in this sequence. Usually the ILS localiser is positioned behind the runway it belongs to and its heading should be perfectly aligned with the runway. The glide slope antenna is positioned besides the runway near the touch down markings.

TOP 

FS98 - FS2002
SetupLoc( Lat Lon elev hdg type stype num )
 
elev  elevation in meters
hdg  heading
type  1 for takeoff
  2 for parking
stype  sub type
  N or 0 runway (normal)
  L or 1 left
  R or 2 right
  C or 3 center
  H or 4 helipad
num  runway number

This data record is used by FS to set the start position from the menu.

TOP 

2.85 | FS2000 - FS2002
Tower( Lat Lon elev hdg )
 
elev  Elevation (meters MSL) of the tower
usually some meters above the ground.
hdg  not used, set it to 0

TOP 

2.85 | FS2002
AI_DataStart
 
This command marks the begin of the data section for AI aircraft information. This section MUST be terminated by an AI_DataEnd instruction. Also it must be followed by the instructions:
TaxiwayPoints(), Positions(), TaxiwayPath() and TaxiwayNames() in exactly this order.
In the moment we only know the instructions but not the exact rules how to use them.

TOP 

2.85 | FS2002
AI_DataEnd
 
Marks the end of AI aircraft data.

TOP 

2.85 | FS2002
TaxiwayPoints( f x y ... f x y )

 
flag, 0 = normal, 1 = hold short
x offset
y offset

TOP 

2.85 | FS2002
Positions( x y size hdg type ... )
 
x offset
y offset
size  size/radius of gate / parking position
hdg   
type  format 1:  a 32 bit hex number like 0x400181
  format 2:  the bits split up into named parameters GP NR + GT
  GP  parking
    N parking
    NE  NE parking
      parking
    E parking
    SE  SE parking
    S parking
    SW  SW parking
    W parking
    NW  NW parking
    Gate
    Dock
    GA  Gate A
    ...   
    GZ  Gate Z
  NR  gate / parking number
  GT  gate type:
    RGA  Ramp GA
    RGAS  Ramp GA small
    RGAM  Ramp GA medium
    RGAL  Ramp GA large
    RCA  Ramp Cargo
    RMCA  Ramp Mil Cargo
    RMCO  Ramp Mil Combat
    GS  Gate small
    GM  Gate Medium
    GH  Gate heavy
    DGA  Dock GA

TOP 

2.85 | FS2002
TaxiwayPath( type width weight p1 p2 flags factor name .. )
 
type  any number or one of the following keywords
TWYP, RBLOCK, ENTRY
width   
weight  all values found 500000
p1  start point index
p2  end point index
flags  usually 0
1 is asumed to indicate a one way path
factor  all values found 1.0
name  index into the following taxiway name table (starting with 0)

TOP 

2.85 | FS2002
TaxiwayNames( "string0" ... "string n" )
 
string#  Taxiway name string. Each string is limited to 7 characters.
The name " " seem to have a special meaning.

TOP 

2.85 | FS2002
AI_Border( top_lat bottom_lat right_lon left_lon )
 
asumed to be used by AI traffic
This command can be placed anywhere in your source file. But it should be only used once per file and therefore it is a good idea to insert it somewhere to the beginning.

TOP 

FS98 - FS2002
NameList( lang )
 
lang    language code, as defined in C-compilers winnt.h file. Often only one NameList with code 409 is defined
  409  US english
  407  german
  40C  french
  411  japanese

The NameList() instruction is mandatory for this type of BGL files. It contains the NameEntry()'s for the World..goto..airport menu.
A NameList must be closed by an EndNL command.

TOP 

FS98 - FS2002
NameEntry( type ref# text )
 
type  type of this entry:
  REGION  mandatory (should be one of the already existing ones).
  COUNTRY   
  STATE  often omitted outside USA
  CITY   
  AIRPORT  mandatory
  VOR   
  NDB   
ref#  reference number. This number is the same as the associated object container or 0 if there is no asociated container (region, country, state).
This reference number is used internally by SCASM to generate a relationship between this entry and an object container.
The NameEntry() and the object container should be of the same type ( AIRPORT, VOR, NDB ).
For other NameEntry()'s use 0 as ref# since there is no object container connected to them.
text  The text you want to see in the "goto airport" menu
 
  You need at least 2 NameEntry()'s, Region and Airport. Note: AIRPORT, VOR and NDB are at the same structure level. But you should not connect NDB's or VOR's to an city since these objects have a wider focus. If placed in the same file the recommended structure is:
REGION
  COUNTRY/(STATE)
    NDB ...
    VOR ...
    CITY
      AIRPORT
  COUNTRY
  ...

Example:
NameList( 409 )                        ; US english
  NameEntry( REGION 0 "EUROPE" )
  NameEntry( CITY   0 TestCity )
  NameEntry( AIRPORT 1 "Test airport" )
                    ; references the 1st container
EndNL
 
or:
NameList( 409 )                    ; US english
  NameEntry( REGION  0 "EUROPE" )
  NameEntry( COUNTRY 0 Test_country )
  NameEntry( VOR 27 "VOR name" )
                   ; references the 27th container
EndNL

TOP 

FS98 - FS2002
EndNL
 

This marks the end of an NameList


TOP 

You can define more than one NameList ... EndNL structures with different language codes. They should address the same object containers and should have the same structure. The only difference should be the spelling of the names.
Your AFD source file should have the following structure:
Header( ... )
Container( APT 1 ) ; list of airport containers
...
EndC
; more airport containers may follow
;
Container( VOR ?? ) ; list of VOR containers
...
EndC
; more VOR containers may follow
;
Container( NDB ?? ) ; list of NDB containers
...
EndC
; more NDB containers may follow
;
; end of container list
NameList( 409 )                        ; US english
  NameEntry( REGION 0 "EUROPE" )
  NameEntry( CITY   0 TestCity )
  NameEntry( AIRPORT 1 "Test airport" )
                    ; references the 1st container
EndNL

 


Many facts are still unknown. To check your output files and to gain more information please use my AfdTree program.

    
TOP © 1995-2002 Manfred Moldenhauer