home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 9
/
CD_ASCQ_09_1193.iso
/
news
/
2331
/
fs5str02
/
bgl_13.des
< prev
next >
Wrap
Text File
|
1993-10-26
|
4KB
|
200 lines
; DESCRIPTION FILE FOR PARTIAL .BGL DECODING
;
; SECTION 13 - ATIS
;
; This file contains some setup statements and the descriptions of records
; used in static scenery files.
; It is intended to be used for partial .BGL decoding with the /U option
;
; Record usage:
; A: used as accumulator during calculations
; G: holds the current section start offset; used to calculate section-relative
; offsets
; Initialisation
0 #H ---------------
0 #H SECTION_13_ATIS
0 #H ---------------
0 #R G=W set section start offset
; jump over subroutines
>START #J
; ***************
; * SUBROUTINES *
; ***************
; * LAT/LONG CONVERSIONS *
; convert into Latitude a 32-bit value in the V register
:N32
0 #R B=0 reset sign flag
>N32POS #I V>0
0 #R V*-1 if V<0, change sign
0 #R B=1 and set flag
:N32POS
0 #R A=V store value
0 #R V/14224710 V=degrees (14,224,710 = 55,565.277 * 256)
2 I- |°
0 #R V*14224710 degrees into 256th of Nu (128th of m)
0 #R A-V A = remainder from degrees
0 #R V=A
0 #R V/237079 V=primes
2 I- |'
0 #R V*237079 primes into 256th of Nu
0 #R A-V A = remainder from primes
0 #R V=A
0 #R V*100
0 #R V/1543 V=256th of seconds
2 J- |"
>POSN32 #I B=1
0 #T N
0 #E
:POSN32
0 #T S
0 #E
; convert into Longitude a 32-bit value in the V register
:E32
0 #R B=0 reset sign flag
>E32POS #I V>0
0 #R V*-1 if V<0, change sign
0 #R B=1 and set flag
:E32POS
0 #R A=V store value
0 #R V/11930464 V=degrees (11,930,464 = 46,603.677 * 256)
2 I- |°
0 #R V*11930464 degrees into 256th of Eu
0 #R A-V A = remainder from degrees
0 #R V=A
0 #R V/198841 V=primes
2 I- |'
0 #R V*198841 primes into 256th of Eu
0 #R A-V A = remainder from primes
0 #R V=A
0 #R V*100
0 #R V/1295 V=256th of seconds
2 J- |"
>POSE32 #I B=1
0 #T E
0 #E
:POSE32
0 #T W
0 #E
; output 32-bit Latitude/Longitude pair
:NE32
4 -
>N32 #C |,
4 -
>E32 #C |;
0 #E
; output a 24-bit Latitude
:N24
3 -
0 #R V*256 into 32-bit coord
>N32 #C |
0 #E
; output a 24-bit Longitude
:E24
3 -
0 #R V*256 into 32-bit coord
>E32 #C |
0 #E
; output 24-bit Latitude/Longitude pair
:NE24
3 -
0 #R V*256 into 32-bit coord
>N32 #C |,
3 -
0 #R V*256 into 32-bit coord
>E32 #C |;
0 #E
; * LINK POINTS *
; insert a 4-byte link point relative to the beginning of the section
:SECLINK
4 i
>NULLPT #I V=0
0 #R V+G add section base offset to current displacement
3 X- at_ print skip-to point
0 #R @=V insert absolute link point
0 #E
:NULLPT
0 #T _NULL
0 #E
; inserts a 4-byte link point and outputs offset and real address
:LINK_PT
4 i$
0 #R V+Q add record offset to field value
3 X- at_ print skip-to point
0 #E
; *************************
; * EXECUTION BEGINS HERE *
; *************************
:START
; *********************
; * 00h End of table *
; *********************
0 -R #End_Of_Table
>00NEXT #I W=@ if current offset == next link point
; otherwise something extra is embedded
-1 D #Embedded:_
:00NEXT
0 #H ---------------
; ****************************
; * 15h North range pointer *
; ****************************
21 -R #NORTH
2 -
0 #R V*65536 to 32-bit coord
>N32 #C |_-
2 -
0 #R V*65536 to 32-bit coord
>N32 #C
>SECLINK #C
; *********************
; * 04h ATIS MESSAGE *
; *********************
4 -R #ATIS_-
2 Y 1|MHz;
>NE24 #C
1 -
0 #R V*2
2 I- #___range_|km;
2 I$ rec._length_|;
1 -
0 #R V&0x3F
1 I- runways_
1 -
0 #R V&0x3F
1 I-
1 -
0 #R V&0x3F
1 I-
1 -
0 #R V&0x3F
1 I-
-1 S #___