Navigation Data

Navigation data primarily consist of VOR, ILS and ADF data. The VOR handling system in BGL was the first category of objects developed in the BGL file format, and it was developed to be very fast and efficient. It is, however, fairly complex.

From the point of view of a BGL programmer, VORs and ILSs are similar navigation aids. Basically, both are radio navigation beacons. VORs are used for long range navigation (up to approximately 100 miles from the station), while ILSs are used for the precision, close-in navigation that guides planes through clouds and fog onto a runway. The pilot picks up both of these navigation aids on the same radio in the plane, uses the same instruments on the control panel, and uses nearly the same techniques to track them. From an operational standpoint, the major difference between the two is that VORs can be tracked and flown down any radial beam from the station (the pilot controls this), while ILSs can only be flown in one direction (down the runway). VOR entities also have a glideslope that the pilot can track vertically to control altitude while flying down the navigation beam.

The following example illustrates how VOR and ILS information is laid out in a BGL file.

;DATABASE HEADER ********************************************************
dw0001;00 world set number (not saved to file list)
;0=off 1=fs5 default world
dd000490000h;02 N bound meter units
dd0003f0000h;06 S bound
dd0cf000000h;10 E bound 32-bit pseudodegrees
dd0bf000000h;14 W bound
ddVOR_DATA;18 VOR_DATA
dw50;22 lowest vor freq (channel 0–199)
dw52;24 highest vor freq (108.00-117.95)
ddSYNTH_SEEDS_08;26 seeds level 8
ddSYNTH_SEEDS_09;30 seeds level 9
ddSYNTH_SEEDS_10;34 seeds level 10
VOR_DATA:
rel_base=VOR_DATA
BAND_SET_DEFINEVOR_11050;vors for freq 110.50 channel 50
BAND_SET_NULL;vors for freq 110.55 channel 51
BAND_SET_DEFINEVOR_11060;vors for freq 110.60 channel 52
VOR_11050:
LATBAND_REL9113-200,9113+200,v1050_1;ohare latitude
EOL

VOR_11060:
LATBAND_REL9113-200,9113+200,v1060_1;ohare latitude
EOL

v1050_1:
ILS_ENTITY23h,098ach,0c1h,07b67h,181,11000001b,0c000h ;ohare 110.5 27r ILS
GLIDESLOPE23h,098ach,0c1h,08048h,181,6860;3 degrees
EOL

v1060_1:
VOR_ENTITY32,46795,193,33809,278,00001011b
EOL

Both ILS and VOR entities included in the VOR section of the database because they are both tuned on the same radio and use similar frequencies. At the beginning of the section, notice the reference to the VOR_DATA in the BGL file header; this reference is the standard double-word, absolute pointer to the VOR_DATA. The VOR_DATA section begins with a rel_base equate that establishes a data section base address for absolute addressing within this section.

The header also contains the frequency range of all the VORs and ILSs in the database. The frequency range is expressed as two words; the first word is the lowest VOR frequency channel. Channel numbers range between 0–199; the numbers correspond to radio frequencies between 108.00mHz (channel 0) and 117.95 mHz (channel 199). The range specified by these two numbers is the inclusive range of all VORs and ILSs; that is, the highest and lowest channel number. You don't need to specify all frequencies in this file; the range doesn't reflect the number of frequencies, just the range.

In the VOR_DATA section, there is a list of BAND_SET definition items. The first definition in the list corresponds to the first channel specified in the frequency range parameters in the header. In the preceding example, the first VOR frequency is 110.50mHz, or channel 50. The BAND_SET list must include an entry for every frequency between the low and high channel numbers, inclusive. If there is no VOR or ILS defined in this file for any of the frequencies between the high and low, you must include a BAND_SET_NULL entity as a placeholder. You don't need to include an EOL at the end of this list because its end is defined by the frequency range values in the header.

Each BAND_SET_DEFINE instruction has a pointer that references a definition of the VOR or ILS for that frequency. As the preceding example shows, a list of LATBAND_REL instructions reside at the VOR_11050 label. As the following example shows, the LATBAND_REL instruction specifies a minimum and maximum latitude within which this VOR is available. No longitude range is specified, just a latitude range. A pointer then references the final definition of the VOR or ILS (for example, the VOR_ENTITY at v1060_1).

Using a LATBAND_REL list, you can include many VORs and ILSs on the same frequency in a single database. The latitude range is specified to help rapidly separate the frequencies that are in range and those that aren't.

Finally, the VOR_ENTITY and ILS_ENTITY are specified. The following example shows the format for both of these entities. The ILS entity can be followed by a GLIDESLOPE entity. The GLIDESLOPE entity must follow all ILSs that have glideslopes, as specified by setting bit 6 in the ILS_ENTITY code word “glideslope available".

;NAV ENTITY OPCODE DEFINITIONS -
;OpFormatDefinition
;-----------------------------------------------------------------
;1db 1Bandset Define;00 opcode
;dw 0,0;01 32-bit absolute ptr
;4VOR ENTITY
;5ILS ENTITY
BAND_SET_DEFINEmacrobandset_addr
db1
ddbandset_addr-rel_base
endm

BAND_SET_NULLmacrobandset_addr
db1
dd0
endm

LATBAND_RELmacrolatmin,latmax,band_addr
db21
dwlatmin;;lat min (inclusive) 512M units
dwlatmax;;lat max (exclusive)
ddband_addr-rel_base;;32-bit rel_base relative ptr
endm

VOR_ENTITY macro lathi,latlo,lonhi,lonlo,alt,code
db4
db80;;VOR ENTITY
;;range=in 2048M units (approx 2 KM)
dw0123;;magvar
dbcode;;code
;;bit0=DME
;;bit1=TACAN
;;bit2=Voice Available
;;bit3=spare
;;bit4=spare
;;bit5=spare
;;bit6=0=Glideslope Available
;; bit7=0=VOR  1=Localizer (always 0)
dwlatlo;;N 41.85611511 (2M units)
dblathi
dwlonlo;;W 87.71153846(24-bit pseudo)
dblonhi
dwalt;;altit M
dw0;;localizer direction (16-bit pseudo)
db'12345';;identifier (ascii)
db'abcdefghijkl';;24-byte name of navaid (ascii)
db'mnopqrstuvwx'
endm

ILS_ENTITY macro lathi,latlo,lonhi,lonlo,alt,code,localiz
db5
db80;;VOR ENTITY (With Localizer Bit Set)
;;range=in 2048M units (approx 2 KM)
dw0123;;magvar
dbcode;;code
;;bit0=DME
;;bit1=TACAN
;;bit2=Voice Available
;;bit3=spare
;;bit4=spare
;;bit5=spare
;;bit6=Glideslope Available
;;bit7=0=VOR 1=Localizer (always 1)
dwlatlo;;Localizer N (2M units)
dblathi
dwlonlo;;Localizer W (24-bit pseudo)
dblonhi
dwalt;;Localizer altit M
dwlocaliz;;localizer direction (16-bit pseudo)
db'TSTxx';;identifier (ascii)
db'Test ILS/GS ';;24-byte name of navaid (ascii)
db'            '
endm

GLIDESLOPE macrolathi,latlo,lonhi,lonlo,alt,slope
dwlatlo;;Glideslope N (2M units)
dblathi
dwlonlo;;Glideslope W (24-bit pseudo)
dblonhi
dwalt;;altit M
dwslope;;Glideslope 2 * 65536 * sin (angle)
endm

ADF macro freq,ext_freq,lathi,latlo,lonhi,lonlo,alt,rng,id_strng,name_strng
db4;;00 op
dwfreq;;01 bcd frequency
dbext_freq;;03 extended freq bcd-hi digit=1 MHz
;;lo digit=100 Hz
dwlatlo;;04 N (2M units)
dblathi
dwlonlo;;07 W (24-bit pseudo)
dblonhi
dwalt;;10 altit M
dbrng;;12 range in 2048M units (approx 2 KM)
dbid_strng;;13 5-byte identifier (ascii)
dbname_strng;;18 24-byte name of navaid (ascii)
;;42=size
endm

Nondirectional Beacons (NDBs) are radio beacons used for navigation. NDBs are received on an automatic direction finder (ADF) receiver in the plane. Flight Simulator handles this form of navigation beacon using the ADF entities in BGL databases.

In the BGL file header, a separate pointer is used to point to the ADF data. The ADF data is not quite as structured as the VOR data, and the frequency range is not specified in the header, but rather in the ADF entity itself. The following example shows the ADF pointer in the header.

;DATABASE HEADER ********************************************************
dw0001;00 world set number (not saved to file list)
dd0004c4eabh;02 N bound 43 degrees meter units
dd000400000h;06 S bound
dd0cf000000h;10 E bound 85 degrees 32-bit pseudo
dd0bf000000h;14 W bound
dd0;18 VOR_DATA
dw0;22 lowest vor freq (channel 0–199)
dw0;24 highest vor freq (108.00-117.95)
dd0;26 seeds level 8
ddSYNTH_SEEDS_09;30 seeds level 9
dd0;34 seeds level 10
dd0;38 seeds level 11
dd0;42 seeds level 12
ddSYNTH_SEEDS_13;46 seeds level 13
dd0;50 seeds level 14
dd0;54 seeds level 15
dd0;58 OBJECT_DATA
ddLIBRARY_DATA;62 LIBRARY_DATA
dd0;66 FACILITIES_DATA
dd0;70 ANCHOR POINT DATA
dd0;74 COM RADIO DATA
ddADF_DATA;78 ADF DATA
ADF_DATA:
rel_base=adf_data
LATBAND_REL9139-200,9139+200,adf_band1
EOL

adf_band1:
;glenview=N 4766bbh m W c17ab55bh d.p pseudo
ADF0269h,0,23h,0b35dh,0c1h,7ab5h,180,80,'GLNxx','GLENVIEW ADF xxxxxxxxxxx'
EOL

In the preceding example, the header’s pointer refers to the ADF_DATA label where a rel_base is established. To aid in sorting ADF stations that fall on the same frequency, a LATBAND_REL command is used to specify the latitude range that this ADF is in. In the preceding example, adf_band1 is pointed to byteh LATBAND_REL, and an ADF command (as seen in the earlier example in this topic) indicates the ADF radio beacon’s position, frequency, and three-letter identifier code.