VOR Entities

The following example shows the BGL file format of VOR entities.

;DATABASE HEADER ********************************************************
dw0001;00 world set number (not saved to file list).
ddVOR_DATA;18 VOR_DATA
dw50;22 lowest vor freq (channel 0–199)
dw50;24 highest vor freq (108.00–117.95)
VOR_DATA:
rel_base=VOR_DATA
BAND_SET_DEFINEVOR_11050;VORs for freq 110.50 channel 50
VOR_11050:
LATBAND_REL9113-200,9113+200,v1050_1;O'Hare latitude
EOL

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

;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

VOR_ENTITY macro lathi,latlo,lonhi,lonlo,alt,code
db4
db80;;VOR ENTITY
;;range=in 2048M units (approx 2 KM)
dw0123;;magvar—16-bit pseudodegrees
dbcode;;code
;;bit0=DME
;;bit1=TACAN (note: if TACAN handles DME too, set DME bit also)
;;bit2=Voice Available
;;bit3=Nav Signal Unavailable (DME only)
;;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=Backcourse UNAVAILABLE
;;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