Magdec BGL File: Difference between revisions

From FSDeveloper Wiki
Jump to navigationJump to search
No edit summary
Line 3: Line 3:
| P3D2 = true
| P3D2 = true
| P3D = true
| P3D = true
| FSXI = false
| FSXI = unknown
| FSXA = true
| FSXA = true
| FSX = true
| FSX = true
| FS2004 = true
| FS2004 = true
| FS2002 = false
| FS2002 = unknown
| FS2000 = false
| FS2000 = unknown
| FS98 = false
| FS98 = unknown
}}
}}


Line 19: Line 19:


== Introduction ==
== Introduction ==
The Magdec.bgl file is located in the ..\Scenery\Base\Scenery subfolder (FS2004, FSX and all P3D versions). It provides the basis for magnetic variation (declination) calculation by the simulator at current aircraft position.
The '''Magdec.bgl''' file is located in the ..\Scenery\Base\Scenery subfolder (FS2004, FSX and all P3D versions). It provides the basis for magnetic variation (declination) calculation by the simulator at current aircraft position.
<br> By convention, East magnetic variation values are POSITIVE, while west values are NEGATIVE.
<br> By convention, East magnetic variation values are POSITIVE, while west values are NEGATIVE.
<br> See here for a general article regarding magnetic declination meaning.  
<br> See this [https://en.wikipedia.org/wiki/Magnetic_declination Wikipedia article] for some basics regarding magnetic declination meaning.  
<br> File length is 130468 bytes in FS2004 (offsets 0x0 to 0x1FDA3) and 130456 bytes in FSX and P3D (offsets 0x0 to 0x1FD97)
<br> File length is 130468 bytes in FS2004 (offsets 0x0 to 0x1FDA3) and 130456 bytes in FSX and P3D (offsets 0x0 to 0x1FD97)


== Headline text ==
== File structure ==


Lorem ipsum dolor sit amet, consectetur adipiscing elit.  
Magdec.bgl file includes a header, a latitude/longitude table and optionally (FS2004 only) an ending string.  


Nam tellus eros, maximus sed elementum quis, tempus at tellus. Nunc lacinia facilisis purus. Sed id ex a eros faucibus scelerisque eu at libero.
=== File header ===
<br>
Donec aliquet nisl nec ipsum sollicitudin porttitor. Nam sed nulla eget nulla volutpat lobortis. Cras vitae finibus leo.
 
=== Sub-Headline text ===
 
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vestibulum pretium dolor eu erat lobortis iaculis.
Vivamus at venenatis urna.


File header is 136 bytes long (offsets 0x0 to 0x87) and has the following structure
{| class="wikitable"
|-
! Offset
! Length
! Description
! Content
|-
| 0x00
| 1 - BYTE
| World set number
| 0X01
|-
| 0x01
| 127 - ?
| Unknown
| All 0, except 0x80 at offset 0x6E
|-
| 0x80
| 2 - WORD
| Number of longitude values
| 0x168 (360)
|-
| 0x82
| 2 - WORD
| Number of latitude values
| 0xB5 (181)
|-
| 0x84
| 1 - BYTE
| Reference date day (?)
| 0x01
|-
| 0x85
| 1 - BYTE
| Reference date month (?)
| 0x01 (FS2004) - 0x11 (FSX/P3D)
|-
| 0x86
| 2 - WORD
| Reference date year (?)
| 0x1993 (FS2004) - 0x2006 (FSX/P3D)
|}
Donec tristique, dolor vitae vestibulum pretium, eros risus scelerisque sapien, a placerat nisi arcu ac felis. Morbi eleifend risus erat, vel facilisis odio pretium vel.  
Donec tristique, dolor vitae vestibulum pretium, eros risus scelerisque sapien, a placerat nisi arcu ac felis. Morbi eleifend risus erat, vel facilisis odio pretium vel.  
<br>
<br>

Revision as of 17:29, 19 October 2015

Placeholder for Hervé Sors

Article introduction.
N.B. Contents box is auto-generated, once page contains sufficient sub-headings.

Introduction

The Magdec.bgl file is located in the ..\Scenery\Base\Scenery subfolder (FS2004, FSX and all P3D versions). It provides the basis for magnetic variation (declination) calculation by the simulator at current aircraft position.
By convention, East magnetic variation values are POSITIVE, while west values are NEGATIVE.
See this Wikipedia article for some basics regarding magnetic declination meaning.
File length is 130468 bytes in FS2004 (offsets 0x0 to 0x1FDA3) and 130456 bytes in FSX and P3D (offsets 0x0 to 0x1FD97)

File structure

Magdec.bgl file includes a header, a latitude/longitude table and optionally (FS2004 only) an ending string.

File header

File header is 136 bytes long (offsets 0x0 to 0x87) and has the following structure

Offset Length Description Content
0x00 1 - BYTE World set number 0X01
0x01 127 - ? Unknown All 0, except 0x80 at offset 0x6E
0x80 2 - WORD Number of longitude values 0x168 (360)
0x82 2 - WORD Number of latitude values 0xB5 (181)
0x84 1 - BYTE Reference date day (?) 0x01
0x85 1 - BYTE Reference date month (?) 0x01 (FS2004) - 0x11 (FSX/P3D)
0x86 2 - WORD Reference date year (?) 0x1993 (FS2004) - 0x2006 (FSX/P3D)

Donec tristique, dolor vitae vestibulum pretium, eros risus scelerisque sapien, a placerat nisi arcu ac felis. Morbi eleifend risus erat, vel facilisis odio pretium vel.
Suspendisse consequat urna dapibus, vulputate diam.

References

Translation - Ask Fr. Bill.