Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

TDFHeaders.inc problems

Featured Replies

Hi all.There are problems with the LWM Tutorial's 'TDFHeaders.inc'It doesn't like the East and West bounds to be in the western hemisphere. I didn't test it enough.The math limitations of BGLC got me. Here's the corrected ( hopefully ) code for TDFHeaders.inc... cut'n'paste it into notepad and save as 'TDFHeaders.inc'

; TDFHeaders.inc; ===================================================================BGLHeader	Macro	NorthB, SouthB, EastB, WestB, LWM_Header, VTP_Header; if LWMStart = TerrainHeaderStart then LWM polygon header disabled; if VTPStart = TerrainHeaderStart then VTP polygon/line header disabled; NorthB, SouthB, EastB, WestB, are the Bounds in whole integer degrees; Make the bounds generous by giving an extra degree to the areaNorthBounds 	EQU 	( ( NorthB * 1111305 ) / 10 )SouthBounds	EQU	( ( SouthB * 1111305 ) / 10 )EastBounds	EQU	EastB * 11930465WestBounds	EQU	WestB * 11930465BGLHeaderStart	label	word	dw	1	; world set number	dd	NorthBounds	dd	SouthBounds	dd	EastBounds	dd	WestBounds	dd	0	; VOR data	dw	0	; lowest VOR freq	dw	0	; highest VOR freq	dd	0	; seeds level 8 data	dd	0	; seeds level 9 data	dd	0	; seeds level 10 data	dd	0	; seeds level 11 data	dd	0	; seeds level 12 data	dd	0	; traffic data	dd	0	; minimum safe altitude data	dd	TerrainHeaderStart - BGLHeaderStart; terrain mesh data	dd	0	; object data	dd	0	; library data	dd	0	; facilities data	dd	0	; anchor point data	dd	0	; ATIS data	dd	0	; NDB data	dd	0	; dynamic object paths data	dd	0h,0h	; minimum library id	dd	0h,0h	; maximum library id	dd	0	; miscellaneous data	dd	0	; title and description data	dd	0	; magnetic variation data	dd	0	; exception and exclusion data	dd	87654321h	; magic number	dd	0	; compression switch	dw	0	; spare	dd	0h,0h,0h,0h	; GUID	dd	0	; product id	dd	0	; product build number	dd	0	; new facility data pointers	dd	0	; new facility name list data	dd	0	; new facility band list data	dd	0	; new facility data; ===================================================================; TERRAIN_HeaderTerrainHeaderStart	label	word	dd	TerrainHeaderEnd - TerrainHeaderStart; end of terrain header	dd	514	; version	dd	0	; unknown entry	dd	0	; unknown entry	dd	0	; elevation header	dd	0	; land class header	dd	0	; unknown header	dd	0	; class lookup header	dd	0	; season header	dd	0	; class lookup list	dd	0	; water class header	dd	0	; elevation index	dd	0	; land cover index	dd	0	; unknown index	dd	LWM_Header - TerrainHeaderStart	; LWM polygon header						; LWM_Header must be the ID label of the LWM_Header	dd	VTP_Header - TerrainHeaderStart	; VTP polygon/line header						; VTP_Header must be the ID label of the VTP_Header	dd	0	; reserved	dd	0	; reserved	dd	0	; main terrain data	dd	0	; reserved	dd	0	; reserved	dd	0	; reserved	dd	0	; regions header	dd	0	; reserved	dd	0	; reservedTerrainHeaderEnd	label	word; ===================================================================EndM

I had to do the cut and paste in a two part process. First, use Wordpad to save the file, then Open Notepad, copy the file from Wordpad ensuring not to get the boarders, just the text, paste in Notepad, and save the file.Trying to cut n paste directly to Notepad was ugly!

Bill Sieffert

  • Author

Here's the macro as a text attachment... just rename to 'TDFHeaders.inc'Dick

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.