<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en-GB">
	<id>http://www.fsdeveloper.com/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=N4gix</id>
	<title>FSDeveloper Wiki - User contributions [en-gb]</title>
	<link rel="self" type="application/atom+xml" href="http://www.fsdeveloper.com/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=N4gix"/>
	<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php/Special:Contributions/N4gix"/>
	<updated>2026-05-20T02:14:06Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.41.1</generator>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=XML:_Macros_-_Universal_Timer&amp;diff=9300</id>
		<title>XML: Macros - Universal Timer</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=XML:_Macros_-_Universal_Timer&amp;diff=9300"/>
		<updated>2014-08-19T13:09:31Z</updated>

		<summary type="html">&lt;p&gt;N4gix: Created page with &amp;quot;{{Infobox-Applicable-FSVersion | P3D = true | FSXA = true | FSX = true | FS2004 = true | FS2002 = false | FS2000 = unknown | FS98 = unknown }} &amp;#039;&amp;#039;&amp;#039; Universal Timer Macros &amp;#039;&amp;#039;&amp;#039;  ...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| P3D = true&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = true&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| FS2000 = unknown&lt;br /&gt;
| FS98 = unknown&lt;br /&gt;
}}&lt;br /&gt;
&#039;&#039;&#039; Universal Timer Macros &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Making elapsed time based on gauge update cycle is simple to code and easy to understand.&lt;br /&gt;
&lt;br /&gt;
Courtesy of Tom Aguilo (taguilo) in post: http://www.fsdeveloper.com/forum/threads/adding-a-timer.431123/#post-681198&lt;br /&gt;
&lt;br /&gt;
A group of macros, but with an universal score could be :&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;GetElapsed&amp;quot;&amp;gt;&lt;br /&gt;
   (P:Absolute time,@2) (L:@1,@2) - abs&lt;br /&gt;
 &amp;lt;/Macro&amp;gt;&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;SetElapsed&amp;quot;&amp;gt;&lt;br /&gt;
   (P:Absolute time,@2) (&amp;gt;L:@1,@2)&lt;br /&gt;
 &amp;lt;/Macro&amp;gt;&lt;br /&gt;
&lt;br /&gt;
And then using:&lt;br /&gt;
 @SetElapsed(name_of_var,unit)&lt;br /&gt;
 @GetElapsed(name_of_var,unit)&lt;br /&gt;
&lt;br /&gt;
For example (pseudocode):&lt;br /&gt;
 &amp;lt;Update&amp;gt;&lt;br /&gt;
    (A:TURB ENG ITT:1, celsius) 907 &amp;gt;&lt;br /&gt;
    if{  @SetElapsed(MyTimer,minutes)  }&lt;br /&gt;
    ...&lt;br /&gt;
    ...&lt;br /&gt;
    @GetElapsed(MyTimer,minutes) 5 &amp;gt;&lt;br /&gt;
    if{ do something }&lt;br /&gt;
    ...&lt;br /&gt;
 &amp;lt;/Update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Both macros can be copied and pasted on every gauge so to have elapsed timers available for the entire code.&lt;br /&gt;
&lt;br /&gt;
[[category:Aircraft Design]]&lt;br /&gt;
[[category:Panel and Gauge Design]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=XtoMDL&amp;diff=9001</id>
		<title>XtoMDL</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=XtoMDL&amp;diff=9001"/>
		<updated>2014-04-04T15:12:55Z</updated>

		<summary type="html">&lt;p&gt;N4gix: /* XtoMDL */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = false&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| FS2000 = unknown&lt;br /&gt;
| FS98 = unknown&lt;br /&gt;
}}&lt;br /&gt;
== XtoMDL ==&lt;br /&gt;
&lt;br /&gt;
Original Entry by Bill Leaming&lt;br /&gt;
&lt;br /&gt;
The new XtoMDL.exe program for FSX and Prepar3D is &amp;quot;command line driven,&amp;quot; meaning that there&#039;s no fancy-schmanzy GUI to use.&lt;br /&gt;
&lt;br /&gt;
Did you know that you could create a shortcut on your desktop that would &#039;proxy&#039; commands to another application?(1) Create a shortcut on your desktop, name it something clever like CompileAircraft and enter the following for the &#039;target&#039; (fix up c:\temp to be the appropriate paths to the files):&lt;br /&gt;
&lt;br /&gt;
 %windir%\system32\cmd.exe /K c:\temp\xtomdl.exe /DICT:c:\temp\modeldef.XML&lt;br /&gt;
&lt;br /&gt;
For example, my &amp;quot;Target:&amp;quot; path is -&lt;br /&gt;
&lt;br /&gt;
 %windir%\system32\cmd.exe /K E:&amp;quot;\FSX_SDK\SDK\Environment Kit\Modeling SDK\3DSM7\Plugins\xtomdl.exe&amp;quot; /XANIM /DICT:E:&amp;quot;\FSX_SDK\SDK\Environment Kit\Modeling SDK\bin\modeldef.XML&amp;quot; &amp;gt; buildlog.txt&lt;br /&gt;
&lt;br /&gt;
My &amp;quot;Start in:&amp;quot; path is -&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;E:\FSX_SDK\SDK\Environment Kit\Modeling SDK\3DSM7\Plugins&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can drag and drop onto that shortcut and a new .CMD window will open and stay open so you can see your results. The redirect command &amp;quot;&amp;gt; buildlog.txt&amp;quot; will write a text file with the results of the command, which is useful to review if there are any error messages.&lt;br /&gt;
&lt;br /&gt;
=== Aircraft models ===&lt;br /&gt;
&lt;br /&gt;
As an &amp;quot;improvement&amp;quot; to the above(2), move or drag the shortcut to your ..\SendTo folder:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WinXP&#039;&#039;&#039;&lt;br /&gt;
 C:\Documents and Settings\User Name\SendTo&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Vista - and - Win7&#039;&#039;&#039;&lt;br /&gt;
 C:\Users\&#039;&#039;YourUserName&#039;&#039;\AppData\Roaming\Microsoft\Windows\SendTo&lt;br /&gt;
&lt;br /&gt;
Now, in Explorer right-click &#039;&#039;&#039;on the .x file&#039;&#039;&#039; and select &amp;quot;CompileAircraft&amp;quot; from the popup menu.&lt;br /&gt;
&lt;br /&gt;
NOTE: The chief advantage of the &amp;quot;Send To&amp;quot; method is that you can have the .x file(s) anywhere you like to keep them, and the compiled .mdl will appear in that same location.&lt;br /&gt;
&lt;br /&gt;
=== Scenery models ===&lt;br /&gt;
&lt;br /&gt;
Creating scenery requires one additional command line switch: /XMLSAMPLE to be added to mix.&lt;br /&gt;
&lt;br /&gt;
Copy the existing CompileAircraft shortcut you just made, and paste it back in the \SendTo folder. Rename is something clever like - say - CompileScenery, and then edit the Target path and add /XMLSAMPLE to the end, so it looks something like this:&lt;br /&gt;
&lt;br /&gt;
 %windir%\system32\cmd.exe /K E:&amp;quot;\FSX_SDK\SDK\Environment Kit\Modeling SDK\3DSM7\Plugins\xtomdl.exe&amp;quot; /DICT:E:&amp;quot;\FSX_SDK\SDK\Environment Kit\Modeling SDK\bin\modeldef.XML&amp;quot; /XMLSAMPLE &amp;gt; buildlog.txt&lt;br /&gt;
&lt;br /&gt;
=== Common Problems ===&lt;br /&gt;
&lt;br /&gt;
1. XTOMDL.EXE generates only MDL-Files with ZERO SIZE -- International windows settings must be set to US (dot used as decimal character)&lt;br /&gt;
&lt;br /&gt;
2. XTOMDL.EXE shows ERROR: NOT CORRECT DIRECTX OR DIRECTX NOT FOUND -- DIRECTX 9.0c Update from October 2006 is needed&lt;br /&gt;
&lt;br /&gt;
3. XTOMDL.EXE doesn&#039;t start because it needs the MICROSOFT .NET FRAMEWORK 2.0505 -- Download it from Microsoft&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
*1) Thanks to John Kane from ACES (MS Developer) for this tip!&lt;br /&gt;
*2) Thanks to Tom Gibson for this tip!&lt;br /&gt;
&lt;br /&gt;
[[category:Aircraft Design]]&lt;br /&gt;
[[category:Scenery Design]]&lt;br /&gt;
[[Category:Tools]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=XtoMDL&amp;diff=8885</id>
		<title>XtoMDL</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=XtoMDL&amp;diff=8885"/>
		<updated>2013-08-18T18:19:46Z</updated>

		<summary type="html">&lt;p&gt;N4gix: /* Aircraft models */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = false&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| FS2000 = unknown&lt;br /&gt;
| FS98 = unknown&lt;br /&gt;
}}&lt;br /&gt;
== XtoMDL ==&lt;br /&gt;
&lt;br /&gt;
Original Entry by Bill Leaming&lt;br /&gt;
&lt;br /&gt;
The new XtoMDL.exe program for FSX is &amp;quot;command line driven,&amp;quot; meaning that there&#039;s no fancy-schmanzy GUI to use.&lt;br /&gt;
&lt;br /&gt;
Did you know that you could create a shortcut on your desktop that would &#039;proxy&#039; commands to another application?(1) Create a shortcut on your desktop, name it something clever like CompileAircraft and enter the following for the &#039;target&#039; (fix up c:\temp to be the appropriate paths to the files):&lt;br /&gt;
&lt;br /&gt;
 %windir%\system32\cmd.exe /K c:\temp\xtomdl.exe /DICT:c:\temp\modeldef.XML&lt;br /&gt;
&lt;br /&gt;
For example, my &amp;quot;Target:&amp;quot; path is -&lt;br /&gt;
&lt;br /&gt;
 %windir%\system32\cmd.exe /K E:&amp;quot;\FSX_SDK\SDK\Environment Kit\Modeling SDK\3DSM7\Plugins\xtomdl.exe&amp;quot; /XANIM /DICT:E:&amp;quot;\FSX_SDK\SDK\Environment Kit\Modeling SDK\bin\modeldef.XML&amp;quot; &amp;gt; buildlog.txt&lt;br /&gt;
&lt;br /&gt;
My &amp;quot;Start in:&amp;quot; path is -&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;E:\FSX_SDK\SDK\Environment Kit\Modeling SDK\3DSM7\Plugins&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can drag and drop onto that shortcut and a new .CMD window will open and stay open so you can see your results. The redirect command &amp;quot;&amp;gt; buildlog.txt&amp;quot; will write a text file with the results of the command, which is useful to review if there are any error messages.&lt;br /&gt;
&lt;br /&gt;
=== Aircraft models ===&lt;br /&gt;
&lt;br /&gt;
As an &amp;quot;improvement&amp;quot; to the above(2), move or drag the shortcut to your ..\SendTo folder:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WinXP&#039;&#039;&#039;&lt;br /&gt;
 C:\Documents and Settings\User Name\SendTo&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Vista - and - Win7&#039;&#039;&#039;&lt;br /&gt;
 C:\Users\&#039;&#039;YourUserName&#039;&#039;\AppData\Roaming\Microsoft\Windows\SendTo&lt;br /&gt;
&lt;br /&gt;
Now, in Explorer right-click &#039;&#039;&#039;on the .x file&#039;&#039;&#039; and select &amp;quot;CompileAircraft&amp;quot; from the popup menu.&lt;br /&gt;
&lt;br /&gt;
NOTE: The chief advantage of the &amp;quot;Send To&amp;quot; method is that you can have the .x file(s) anywhere you like to keep them, and the compiled .mdl will appear in that same location.&lt;br /&gt;
&lt;br /&gt;
=== Scenery models ===&lt;br /&gt;
&lt;br /&gt;
Creating scenery requires one additional command line switch: /XMLSAMPLE to be added to mix.&lt;br /&gt;
&lt;br /&gt;
Copy the existing CompileAircraft shortcut you just made, and paste it back in the \SendTo folder. Rename is something clever like - say - CompileScenery, and then edit the Target path and add /XMLSAMPLE to the end, so it looks something like this:&lt;br /&gt;
&lt;br /&gt;
 %windir%\system32\cmd.exe /K E:&amp;quot;\FSX_SDK\SDK\Environment Kit\Modeling SDK\3DSM7\Plugins\xtomdl.exe&amp;quot; /DICT:E:&amp;quot;\FSX_SDK\SDK\Environment Kit\Modeling SDK\bin\modeldef.XML&amp;quot; /XMLSAMPLE &amp;gt; buildlog.txt&lt;br /&gt;
&lt;br /&gt;
=== Common Problems ===&lt;br /&gt;
&lt;br /&gt;
1. XTOMDL.EXE generates only MDL-Files with ZERO SIZE -- International windows settings must be set to US (dot used as decimal character)&lt;br /&gt;
&lt;br /&gt;
2. XTOMDL.EXE shows ERROR: NOT CORRECT DIRECTX OR DIRECTX NOT FOUND -- DIRECTX 9.0c Update from October 2006 is needed&lt;br /&gt;
&lt;br /&gt;
3. XTOMDL.EXE doesn&#039;t start because it needs the MICROSOFT .NET FRAMEWORK 2.0505 -- Download it from Microsoft&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
*1) Thanks to John Kane from ACES (MS Developer) for this tip!&lt;br /&gt;
*2) Thanks to Tom Gibson for this tip!&lt;br /&gt;
&lt;br /&gt;
[[category:Aircraft Design]]&lt;br /&gt;
[[category:Scenery Design]]&lt;br /&gt;
[[Category:Tools]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=XtoMDL&amp;diff=8884</id>
		<title>XtoMDL</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=XtoMDL&amp;diff=8884"/>
		<updated>2013-08-18T18:18:33Z</updated>

		<summary type="html">&lt;p&gt;N4gix: /* XtoMDL */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = false&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| FS2000 = unknown&lt;br /&gt;
| FS98 = unknown&lt;br /&gt;
}}&lt;br /&gt;
== XtoMDL ==&lt;br /&gt;
&lt;br /&gt;
Original Entry by Bill Leaming&lt;br /&gt;
&lt;br /&gt;
The new XtoMDL.exe program for FSX is &amp;quot;command line driven,&amp;quot; meaning that there&#039;s no fancy-schmanzy GUI to use.&lt;br /&gt;
&lt;br /&gt;
Did you know that you could create a shortcut on your desktop that would &#039;proxy&#039; commands to another application?(1) Create a shortcut on your desktop, name it something clever like CompileAircraft and enter the following for the &#039;target&#039; (fix up c:\temp to be the appropriate paths to the files):&lt;br /&gt;
&lt;br /&gt;
 %windir%\system32\cmd.exe /K c:\temp\xtomdl.exe /DICT:c:\temp\modeldef.XML&lt;br /&gt;
&lt;br /&gt;
For example, my &amp;quot;Target:&amp;quot; path is -&lt;br /&gt;
&lt;br /&gt;
 %windir%\system32\cmd.exe /K E:&amp;quot;\FSX_SDK\SDK\Environment Kit\Modeling SDK\3DSM7\Plugins\xtomdl.exe&amp;quot; /XANIM /DICT:E:&amp;quot;\FSX_SDK\SDK\Environment Kit\Modeling SDK\bin\modeldef.XML&amp;quot; &amp;gt; buildlog.txt&lt;br /&gt;
&lt;br /&gt;
My &amp;quot;Start in:&amp;quot; path is -&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;E:\FSX_SDK\SDK\Environment Kit\Modeling SDK\3DSM7\Plugins&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can drag and drop onto that shortcut and a new .CMD window will open and stay open so you can see your results. The redirect command &amp;quot;&amp;gt; buildlog.txt&amp;quot; will write a text file with the results of the command, which is useful to review if there are any error messages.&lt;br /&gt;
&lt;br /&gt;
=== Aircraft models ===&lt;br /&gt;
&lt;br /&gt;
As an &amp;quot;improvement&amp;quot; to the above(2), move or drag the shortcut to your ..\SendTo folder:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WinXP&#039;&#039;&#039;&lt;br /&gt;
 C:\Documents and Settings\User Name\SendTo&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Vista - and - Win7&#039;&#039;&#039;&lt;br /&gt;
 C:\Users\&#039;&#039;YourUserName&#039;&#039;\AppData\Roaming\Microsoft\Windows\SendTo&lt;br /&gt;
&lt;br /&gt;
Now, in Explorer rightclick on the .x file and select &amp;quot;CompileAircraft&amp;quot; from the popup menu.&lt;br /&gt;
&lt;br /&gt;
NOTE: The chief advantage of the &amp;quot;Send To&amp;quot; method is that you can have the .x file(s) anywhere you like to keep them, and the compiled .mdl will appear in that same location.&lt;br /&gt;
&lt;br /&gt;
=== Scenery models ===&lt;br /&gt;
&lt;br /&gt;
Creating scenery requires one additional command line switch: /XMLSAMPLE to be added to mix.&lt;br /&gt;
&lt;br /&gt;
Copy the existing CompileAircraft shortcut you just made, and paste it back in the \SendTo folder. Rename is something clever like - say - CompileScenery, and then edit the Target path and add /XMLSAMPLE to the end, so it looks something like this:&lt;br /&gt;
&lt;br /&gt;
 %windir%\system32\cmd.exe /K E:&amp;quot;\FSX_SDK\SDK\Environment Kit\Modeling SDK\3DSM7\Plugins\xtomdl.exe&amp;quot; /DICT:E:&amp;quot;\FSX_SDK\SDK\Environment Kit\Modeling SDK\bin\modeldef.XML&amp;quot; /XMLSAMPLE &amp;gt; buildlog.txt&lt;br /&gt;
&lt;br /&gt;
=== Common Problems ===&lt;br /&gt;
&lt;br /&gt;
1. XTOMDL.EXE generates only MDL-Files with ZERO SIZE -- International windows settings must be set to US (dot used as decimal character)&lt;br /&gt;
&lt;br /&gt;
2. XTOMDL.EXE shows ERROR: NOT CORRECT DIRECTX OR DIRECTX NOT FOUND -- DIRECTX 9.0c Update from October 2006 is needed&lt;br /&gt;
&lt;br /&gt;
3. XTOMDL.EXE doesn&#039;t start because it needs the MICROSOFT .NET FRAMEWORK 2.0505 -- Download it from Microsoft&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
*1) Thanks to John Kane from ACES (MS Developer) for this tip!&lt;br /&gt;
*2) Thanks to Tom Gibson for this tip!&lt;br /&gt;
&lt;br /&gt;
[[category:Aircraft Design]]&lt;br /&gt;
[[category:Scenery Design]]&lt;br /&gt;
[[Category:Tools]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=XML:_Modulus_Operator&amp;diff=8750</id>
		<title>XML: Modulus Operator</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=XML:_Modulus_Operator&amp;diff=8750"/>
		<updated>2013-04-08T15:52:41Z</updated>

		<summary type="html">&lt;p&gt;N4gix: /* XML: Modulus Operator */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = true&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| FS2000 = false&lt;br /&gt;
| FS98 = false&lt;br /&gt;
}}&lt;br /&gt;
==XML: Modulus Operator==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;QUESTION:&#039;&#039;&#039; &#039;&#039;What does the expression &amp;quot;123 2 %&amp;quot; mean?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The modulus, or remainder, operator divides number1 by number2 and returns only the remainder as result. &lt;br /&gt;
&lt;br /&gt;
The sign of result is the same as the sign of number1. &lt;br /&gt;
&lt;br /&gt;
The value of result is between 0 and the absolute value of number2.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In XML syntax, the general statement is:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;number1 number2 %&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, in the following expression, A (which is result) equals 5.6.&lt;br /&gt;
&lt;br /&gt;
A = 19 6.7 %&lt;br /&gt;
&lt;br /&gt;
This is equivalent to:&lt;br /&gt;
&lt;br /&gt;
19 / 6.7 = 2.8358208&lt;br /&gt;
&lt;br /&gt;
We throw away the fraction leaving 2 as the result&lt;br /&gt;
&lt;br /&gt;
Now we have:&lt;br /&gt;
&lt;br /&gt;
A = 19 - (6.7 * 2)&lt;br /&gt;
&lt;br /&gt;
Therefore A = 5.6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above is an example where the result is certainly not obvious!  &lt;br /&gt;
&lt;br /&gt;
The &amp;quot;%&amp;quot; (or &amp;quot;mod&amp;quot;) operator in computer languages is simply the remainder. &lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
17 3 % = 2&lt;br /&gt;
&lt;br /&gt;
because&lt;br /&gt;
&lt;br /&gt;
17 / 3 = 5 rem 2&lt;br /&gt;
&lt;br /&gt;
which in turn means&lt;br /&gt;
&lt;br /&gt;
17 = 3 * 5 + 2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are some tricky issues when negative numbers are used, &lt;br /&gt;
but that shouldn&#039;t ordinarily be necessary.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In math (number theory), the term is used a little differently. &lt;br /&gt;
&lt;br /&gt;
The &amp;quot;modulus&amp;quot; is actually not the remainder, &lt;br /&gt;
&lt;br /&gt;
but the number you are dividing by; &lt;br /&gt;
&lt;br /&gt;
and &amp;quot;mod&amp;quot; is not an operator, &lt;br /&gt;
&lt;br /&gt;
but a label telling &amp;quot;in what sense two quantities are considered congruent, or equal.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, we would say&lt;br /&gt;
&lt;br /&gt;
17 = 11 (mod 3)&lt;br /&gt;
&lt;br /&gt;
(read as &amp;quot;17 is congruent to 11, modulo 3&amp;quot;), meaning that 17 and 11 &lt;br /&gt;
both leave the SAME remainder when divided by 3. You probably won&#039;t &lt;br /&gt;
see this usage if you are only reading about programming, but it&#039;s &lt;br /&gt;
worth being aware of if you look deeper into the math behind it.&lt;br /&gt;
&lt;br /&gt;
The expression a = b (% n) means that n is a divisor of a - b. This&lt;br /&gt;
sentence is read, &amp;quot;a is congruent to b modulo n.&amp;quot; It is something&lt;br /&gt;
like a remainder, because if you subtract a remainder from the&lt;br /&gt;
dividend, the divisor will go into the result evenly.&lt;br /&gt;
&lt;br /&gt;
Examples: 100 = 86 (% 7), because 100 - 86 = 14 has 7 as a divisor.&lt;br /&gt;
On the other hand, if you divide 100 by 7, the quotient is 14 and&lt;br /&gt;
remainder is 2, and 100 = 2 (% 7), too.&lt;br /&gt;
&lt;br /&gt;
Now, back to your original question, what would 123 2 % be?&lt;br /&gt;
&lt;br /&gt;
A = 123 2 %&lt;br /&gt;
&lt;br /&gt;
123 / 2 = 61.5, therefore:&lt;br /&gt;
&lt;br /&gt;
A = 123 - (61 * 2)&lt;br /&gt;
&lt;br /&gt;
A = 1&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTA BENE:&#039;&#039;&#039;&lt;br /&gt;
It was pointed out by &amp;quot;mgh&amp;quot; that the &amp;quot;XML modulus function&amp;quot; &#039;&#039;&#039;x y %&#039;&#039;&#039; in C/C++ is mathematically equivalent to:&lt;br /&gt;
&lt;br /&gt;
 (fabs(x)/x)*(fabs(x)-int(fabs(x)/fabs(y))*fabs(y))&lt;br /&gt;
Of course, since C/C++ has a defined function, actual usage would be:&lt;br /&gt;
 fmod(x,y)&lt;br /&gt;
 &lt;br /&gt;
 #include &amp;lt;math.h&amp;gt;&lt;br /&gt;
 double fmod( double x, double y)&lt;br /&gt;
&lt;br /&gt;
[[Category:Aircraft Design]]&lt;br /&gt;
[[Category:Panel and Gauge Design]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=XML:_Modulus_Operator&amp;diff=8749</id>
		<title>XML: Modulus Operator</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=XML:_Modulus_Operator&amp;diff=8749"/>
		<updated>2013-04-08T15:44:18Z</updated>

		<summary type="html">&lt;p&gt;N4gix: /* XML: Modulus Operator */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = true&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| FS2000 = false&lt;br /&gt;
| FS98 = false&lt;br /&gt;
}}&lt;br /&gt;
==XML: Modulus Operator==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;QUESTION:&#039;&#039;&#039; &#039;&#039;What does the expression &amp;quot;123 2 %&amp;quot; mean?&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The modulus, or remainder, operator divides number1 by number2 and returns only the remainder as result. &lt;br /&gt;
&lt;br /&gt;
The sign of result is the same as the sign of number1. &lt;br /&gt;
&lt;br /&gt;
The value of result is between 0 and the absolute value of number2.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In XML syntax, the general statement is:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&#039;&#039;number1 number2 %&#039;&#039;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, in the following expression, A (which is result) equals 5.6.&lt;br /&gt;
&lt;br /&gt;
A = 19 6.7 %&lt;br /&gt;
&lt;br /&gt;
This is equivalent to:&lt;br /&gt;
&lt;br /&gt;
19 / 6.7 = 2.8358208&lt;br /&gt;
&lt;br /&gt;
We throw away the fraction leaving 2 as the result&lt;br /&gt;
&lt;br /&gt;
Now we have:&lt;br /&gt;
&lt;br /&gt;
A = 19 - (6.7 * 2)&lt;br /&gt;
&lt;br /&gt;
Therefore A = 5.6&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The above is an example where the result is certainly not obvious!  &lt;br /&gt;
&lt;br /&gt;
The &amp;quot;%&amp;quot; (or &amp;quot;mod&amp;quot;) operator in computer languages is simply the remainder. &lt;br /&gt;
&lt;br /&gt;
For example,&lt;br /&gt;
&lt;br /&gt;
17 3 % = 2&lt;br /&gt;
&lt;br /&gt;
because&lt;br /&gt;
&lt;br /&gt;
17 / 3 = 5 rem 2&lt;br /&gt;
&lt;br /&gt;
which in turn means&lt;br /&gt;
&lt;br /&gt;
17 = 3 * 5 + 2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are some tricky issues when negative numbers are used, &lt;br /&gt;
but that shouldn&#039;t ordinarily be necessary.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In math (number theory), the term is used a little differently. &lt;br /&gt;
&lt;br /&gt;
The &amp;quot;modulus&amp;quot; is actually not the remainder, &lt;br /&gt;
&lt;br /&gt;
but the number you are dividing by; &lt;br /&gt;
&lt;br /&gt;
and &amp;quot;mod&amp;quot; is not an operator, &lt;br /&gt;
&lt;br /&gt;
but a label telling &amp;quot;in what sense two quantities are considered congruent, or equal.&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
For example, we would say&lt;br /&gt;
&lt;br /&gt;
17 = 11 (mod 3)&lt;br /&gt;
&lt;br /&gt;
(read as &amp;quot;17 is congruent to 11, modulo 3&amp;quot;), meaning that 17 and 11 &lt;br /&gt;
both leave the SAME remainder when divided by 3. You probably won&#039;t &lt;br /&gt;
see this usage if you are only reading about programming, but it&#039;s &lt;br /&gt;
worth being aware of if you look deeper into the math behind it.&lt;br /&gt;
&lt;br /&gt;
The expression a = b (% n) means that n is a divisor of a - b. This&lt;br /&gt;
sentence is read, &amp;quot;a is congruent to b modulo n.&amp;quot; It is something&lt;br /&gt;
like a remainder, because if you subtract a remainder from the&lt;br /&gt;
dividend, the divisor will go into the result evenly.&lt;br /&gt;
&lt;br /&gt;
Examples: 100 = 86 (% 7), because 100 - 86 = 14 has 7 as a divisor.&lt;br /&gt;
On the other hand, if you divide 100 by 7, the quotient is 14 and&lt;br /&gt;
remainder is 2, and 100 = 2 (% 7), too.&lt;br /&gt;
&lt;br /&gt;
Now, back to your original question, what would 123 2 % be?&lt;br /&gt;
&lt;br /&gt;
A = 123 2 %&lt;br /&gt;
&lt;br /&gt;
123 / 2 = 61.5, therefore:&lt;br /&gt;
&lt;br /&gt;
A = 123 - (61 * 2)&lt;br /&gt;
&lt;br /&gt;
A = 1&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTA BENE:&#039;&#039;&#039;&lt;br /&gt;
It was pointed out by &amp;quot;mgh&amp;quot; that the &amp;quot;XML modulus function&amp;quot; &#039;&#039;&#039;x y %&#039;&#039;&#039; in C/C++ is equivalent to:&lt;br /&gt;
&lt;br /&gt;
 (fabs(x)/x)*(fabs(x)-int(fabs(x)/fabs(y))*fabs(y))&lt;br /&gt;
&lt;br /&gt;
[[Category:Aircraft Design]]&lt;br /&gt;
[[Category:Panel and Gauge Design]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=XML:_Set_ADF_Frequency&amp;diff=8747</id>
		<title>XML: Set ADF Frequency</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=XML:_Set_ADF_Frequency&amp;diff=8747"/>
		<updated>2013-03-26T16:09:44Z</updated>

		<summary type="html">&lt;p&gt;N4gix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = true&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| FS2000 = unknown&lt;br /&gt;
| FS98 = unknown&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==XML: Set ADF Frequency==&lt;br /&gt;
We need to convert the desired ADF Frequency (KHz) to BCD format. This simple @Macro will do the job painlessly for us.&lt;br /&gt;
&lt;br /&gt;
Note the use of lower case L in &#039;&#039;&#039;l0&#039;&#039;&#039; and &#039;&#039;&#039;l2&#039;&#039;&#039;, this is [[not]] a number 1:&lt;br /&gt;
&lt;br /&gt;
e.g., s2 &#039;&#039;&#039;[[l]]&#039;&#039;&#039;0 10 / flr 10 % 16 * &#039;&#039;&#039;[[l]]&#039;&#039;&#039;2 +&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;SetADF&amp;quot;&amp;gt;&lt;br /&gt;
        (* UPDATE ADF FREQUENCY *)&lt;br /&gt;
        @1 10000 * s0 10 %&lt;br /&gt;
        s2 l0 10 / flr 10 % 16 * l2 +&lt;br /&gt;
        s2 l0 100 / flr 10 % 256 * l2 +&lt;br /&gt;
        s2 l0 1000 / flr 10 % 4096 * l2 +&lt;br /&gt;
        s2 l0 10000 / flr 10 % 65536 * l2 +&lt;br /&gt;
        s2 l0 100000 / flr 10 % 1048576 * l2 +&lt;br /&gt;
        s2 l0 1000000 / flr 10 % 16777216 * l2 +&lt;br /&gt;
        s2 l0 10000000 / flr 10 % 268435456 * l2 +&lt;br /&gt;
        s2 (&amp;gt;K:ADF_COMPLETE_SET)&lt;br /&gt;
 &amp;lt;/Macro&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Usage: &lt;br /&gt;
 @SetADF((L:ADF1 Frequency,Khz))&lt;br /&gt;
&lt;br /&gt;
[[category:Aircraft Design]]&lt;br /&gt;
[[category:Panel and Gauge Design]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=XML:_Decimal_To_BCD_Macro_-_Set_Nav/Com_Freq&amp;diff=8746</id>
		<title>XML: Decimal To BCD Macro - Set Nav/Com Freq</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=XML:_Decimal_To_BCD_Macro_-_Set_Nav/Com_Freq&amp;diff=8746"/>
		<updated>2013-03-26T16:09:13Z</updated>

		<summary type="html">&lt;p&gt;N4gix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = true&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| FS2000 = unknown&lt;br /&gt;
| FS98 = unknown&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==XML:Decimal to BCD Macro==&lt;br /&gt;
&lt;br /&gt;
A very simple but useful @macro to convert any decimal frequency to BCD format to allow direct SETting of COM and NAV frequencies in FS:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;Dec2Bcd&amp;quot;&amp;gt;&lt;br /&gt;
   @1 100.001 * 10000 % int&lt;br /&gt;
   d 10 % r 10 / int&lt;br /&gt;
   d 10 % r 10 / int&lt;br /&gt;
   d 10 % r 10 / int&lt;br /&gt;
   16 * +&lt;br /&gt;
   16 * +&lt;br /&gt;
   16 * +&lt;br /&gt;
 &amp;lt;/Macro&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Usage is then as simple as passing the decimal frequency to the @macro the issuing the appropriate _SET key event:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Click&amp;gt;&lt;br /&gt;
     @Dec2Bcd(112.30) (&amp;gt;K:NAV2_RADIO_SET)&lt;br /&gt;
 &amp;lt;/Click&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You could also use a custom L:var to pass a &amp;quot;tuned&amp;quot; frequency:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Click&amp;gt;&lt;br /&gt;
     @Dec2Bcd((L:Nav2Freq,enum)) (&amp;gt;K:NAV2_RADIO_SET)&lt;br /&gt;
 &amp;lt;/Click&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Aircraft Design]]&lt;br /&gt;
[[Category:Panel and Gauge Design]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=XtoMDL&amp;diff=8745</id>
		<title>XtoMDL</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=XtoMDL&amp;diff=8745"/>
		<updated>2013-03-12T19:30:52Z</updated>

		<summary type="html">&lt;p&gt;N4gix: /* Aircraft models */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = false&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| FS2000 = unknown&lt;br /&gt;
| FS98 = unknown&lt;br /&gt;
}}&lt;br /&gt;
== XtoMDL ==&lt;br /&gt;
&lt;br /&gt;
Original Entry by Bill Leaming&lt;br /&gt;
&lt;br /&gt;
The new XtoMDL.exe program for FSX is &amp;quot;command line driven,&amp;quot; meaning that there&#039;s no fancy-schmanzy GUI to use.&lt;br /&gt;
&lt;br /&gt;
Did you know that you could create a shortcut on your desktop that would &#039;proxy&#039; commands to another application?(1) Create a shortcut on your desktop, name it something clever like CompileAircraft and enter the following for the &#039;target&#039; (fix up c:\temp to be the appropriate paths to the files):&lt;br /&gt;
&lt;br /&gt;
 %windir%\system32\cmd.exe /K c:\temp\xtomdl.exe /DICT:c:\temp\modeldef.XML&lt;br /&gt;
&lt;br /&gt;
For example, my &amp;quot;Target:&amp;quot; path is -&lt;br /&gt;
&lt;br /&gt;
 %windir%\system32\cmd.exe /K E:&amp;quot;\FSX_SDK\SDK\Environment Kit\Modeling SDK\3DSM7\Plugins\xtomdl.exe&amp;quot; /XANIM /DICT:E:&amp;quot;\FSX_SDK\SDK\Environment Kit\Modeling SDK\bin\modeldef.XML&amp;quot; &amp;gt; buildlog.txt&lt;br /&gt;
&lt;br /&gt;
My &amp;quot;Start in:&amp;quot; path is -&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;E:\FSX_SDK\SDK\Environment Kit\Modeling SDK\3DSM7\Plugins&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can drag and drop onto that shortcut and a new .CMD window will open and stay open so you can see your results. The redirect command &amp;quot;&amp;gt; buildlog.txt&amp;quot; will write a text file with the results of the command, which is useful to review if there are any error messages.&lt;br /&gt;
&lt;br /&gt;
=== Aircraft models ===&lt;br /&gt;
&lt;br /&gt;
As an &amp;quot;improvement&amp;quot; to the above(2), move or drag the shortcut to your ..\SendTo folder:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WinXP&#039;&#039;&#039;&lt;br /&gt;
 C:\Documents and Settings\User Name\SendTo&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Vista - and - Win7&#039;&#039;&#039;&lt;br /&gt;
 C:\Users\&#039;&#039;YourUserName&#039;&#039;\AppData\Roaming\Microsoft\Windows\SendTo&lt;br /&gt;
&lt;br /&gt;
Now, in Explorer rightclick on the .x file and select &amp;quot;CompileAircraft&amp;quot; from the popup menu.&lt;br /&gt;
&lt;br /&gt;
NOTE: The chief advantage of the &amp;quot;Send To&amp;quot; method is that you can have the .x file(s) anywhere you like to keep them, and the compiled .mdl will appear in that same location.&lt;br /&gt;
&lt;br /&gt;
=== Scenery models ===&lt;br /&gt;
&lt;br /&gt;
Creating scenery requires one additional command line switch: /XMLSAMPLE to be added to mix.&lt;br /&gt;
&lt;br /&gt;
Copy the existing CompileAircraft shortcut you just made, and paste it back in the \SendTo folder. Rename is something clever like - say - CompileScenery, and then edit the Target path and add /XMLSAMPLE to the end, so it looks something like this:&lt;br /&gt;
&lt;br /&gt;
 %windir%\system32\cmd.exe /K E:&amp;quot;\FSX_SDK\SDK\Environment Kit\Modeling SDK\3DSM7\Plugins\xtomdl.exe&amp;quot; /DICT:E:&amp;quot;\FSX_SDK\SDK\Environment Kit\Modeling SDK\bin\modeldef.XML&amp;quot; /XMLSAMPLE &amp;gt; buildlog.txt&lt;br /&gt;
&lt;br /&gt;
=== Common Problems ===&lt;br /&gt;
&lt;br /&gt;
1. XTOMDL.EXE generates only MDL-Files with ZERO SIZE -- International windows settings must be set to US (dot used as decimal character)&lt;br /&gt;
&lt;br /&gt;
2. XTOMDL.EXE shows ERROR: NOT CORRECT DIRECTX OR DIRECTX NOT FOUND -- DIRECTX 9.0c Update from October 2006 is needed&lt;br /&gt;
&lt;br /&gt;
3. XTOMDL.EXE doesn&#039;t start because it needs the MICROSOFT .NET FRAMEWORK 2.0505 -- Download it from Microsoft&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
*1) Thanks to John Kane from ACES (MS Developer) for this tip!&lt;br /&gt;
*2) Thanks to Tom Gibson for this tip!&lt;br /&gt;
&lt;br /&gt;
[[category:Aircraft Design]]&lt;br /&gt;
[[category:Scenery Design]]&lt;br /&gt;
[[Category:Tools]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=XtoMDL&amp;diff=8744</id>
		<title>XtoMDL</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=XtoMDL&amp;diff=8744"/>
		<updated>2013-03-12T19:23:19Z</updated>

		<summary type="html">&lt;p&gt;N4gix: /* Aircraft models */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = false&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| FS2000 = unknown&lt;br /&gt;
| FS98 = unknown&lt;br /&gt;
}}&lt;br /&gt;
== XtoMDL ==&lt;br /&gt;
&lt;br /&gt;
Original Entry by Bill Leaming&lt;br /&gt;
&lt;br /&gt;
The new XtoMDL.exe program for FSX is &amp;quot;command line driven,&amp;quot; meaning that there&#039;s no fancy-schmanzy GUI to use.&lt;br /&gt;
&lt;br /&gt;
Did you know that you could create a shortcut on your desktop that would &#039;proxy&#039; commands to another application?(1) Create a shortcut on your desktop, name it something clever like CompileAircraft and enter the following for the &#039;target&#039; (fix up c:\temp to be the appropriate paths to the files):&lt;br /&gt;
&lt;br /&gt;
 %windir%\system32\cmd.exe /K c:\temp\xtomdl.exe /DICT:c:\temp\modeldef.XML&lt;br /&gt;
&lt;br /&gt;
For example, my &amp;quot;Target:&amp;quot; path is -&lt;br /&gt;
&lt;br /&gt;
 %windir%\system32\cmd.exe /K E:&amp;quot;\FSX_SDK\SDK\Environment Kit\Modeling SDK\3DSM7\Plugins\xtomdl.exe&amp;quot; /XANIM /DICT:E:&amp;quot;\FSX_SDK\SDK\Environment Kit\Modeling SDK\bin\modeldef.XML&amp;quot; &amp;gt; buildlog.txt&lt;br /&gt;
&lt;br /&gt;
My &amp;quot;Start in:&amp;quot; path is -&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;E:\FSX_SDK\SDK\Environment Kit\Modeling SDK\3DSM7\Plugins&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can drag and drop onto that shortcut and a new .CMD window will open and stay open so you can see your results. The redirect command &amp;quot;&amp;gt; buildlog.txt&amp;quot; will write a text file with the results of the command, which is useful to review if there are any error messages.&lt;br /&gt;
&lt;br /&gt;
=== Aircraft models ===&lt;br /&gt;
&lt;br /&gt;
As an &amp;quot;improvement&amp;quot; to the above(2), rename the shortcut something like &amp;quot;CompileAircraft&amp;quot; then move the shortcut to your \SendTo folder:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WinXP&#039;&#039;&#039;&lt;br /&gt;
 C:\Documents and Settings\User Name\SendTo&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Vista - and - Win7&#039;&#039;&#039;&lt;br /&gt;
 C:\Users\&#039;&#039;YourUserName&#039;&#039;\AppData\Roaming\Microsoft\Windows\SendTo&lt;br /&gt;
&lt;br /&gt;
Now, in Explorer rightclick on the .x file and select &amp;quot;CompileAircraft&amp;quot; from the popup menu.&lt;br /&gt;
&lt;br /&gt;
NOTE: The chief advantage of the &amp;quot;Send To&amp;quot; method is that you can have the .x file(s) anywhere you like to keep them, and the compiled .mdl will appear in that same location.&lt;br /&gt;
&lt;br /&gt;
=== Scenery models ===&lt;br /&gt;
&lt;br /&gt;
Creating scenery requires one additional command line switch: /XMLSAMPLE to be added to mix.&lt;br /&gt;
&lt;br /&gt;
Copy the existing CompileAircraft shortcut you just made, and paste it back in the \SendTo folder. Rename is something clever like - say - CompileScenery, and then edit the Target path and add /XMLSAMPLE to the end, so it looks something like this:&lt;br /&gt;
&lt;br /&gt;
 %windir%\system32\cmd.exe /K E:&amp;quot;\FSX_SDK\SDK\Environment Kit\Modeling SDK\3DSM7\Plugins\xtomdl.exe&amp;quot; /DICT:E:&amp;quot;\FSX_SDK\SDK\Environment Kit\Modeling SDK\bin\modeldef.XML&amp;quot; /XMLSAMPLE &amp;gt; buildlog.txt&lt;br /&gt;
&lt;br /&gt;
=== Common Problems ===&lt;br /&gt;
&lt;br /&gt;
1. XTOMDL.EXE generates only MDL-Files with ZERO SIZE -- International windows settings must be set to US (dot used as decimal character)&lt;br /&gt;
&lt;br /&gt;
2. XTOMDL.EXE shows ERROR: NOT CORRECT DIRECTX OR DIRECTX NOT FOUND -- DIRECTX 9.0c Update from October 2006 is needed&lt;br /&gt;
&lt;br /&gt;
3. XTOMDL.EXE doesn&#039;t start because it needs the MICROSOFT .NET FRAMEWORK 2.0505 -- Download it from Microsoft&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
*1) Thanks to John Kane from ACES (MS Developer) for this tip!&lt;br /&gt;
*2) Thanks to Tom Gibson for this tip!&lt;br /&gt;
&lt;br /&gt;
[[category:Aircraft Design]]&lt;br /&gt;
[[category:Scenery Design]]&lt;br /&gt;
[[Category:Tools]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=XtoMDL&amp;diff=8743</id>
		<title>XtoMDL</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=XtoMDL&amp;diff=8743"/>
		<updated>2013-03-12T19:22:49Z</updated>

		<summary type="html">&lt;p&gt;N4gix: /* Aircraft models */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = false&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| FS2000 = unknown&lt;br /&gt;
| FS98 = unknown&lt;br /&gt;
}}&lt;br /&gt;
== XtoMDL ==&lt;br /&gt;
&lt;br /&gt;
Original Entry by Bill Leaming&lt;br /&gt;
&lt;br /&gt;
The new XtoMDL.exe program for FSX is &amp;quot;command line driven,&amp;quot; meaning that there&#039;s no fancy-schmanzy GUI to use.&lt;br /&gt;
&lt;br /&gt;
Did you know that you could create a shortcut on your desktop that would &#039;proxy&#039; commands to another application?(1) Create a shortcut on your desktop, name it something clever like CompileAircraft and enter the following for the &#039;target&#039; (fix up c:\temp to be the appropriate paths to the files):&lt;br /&gt;
&lt;br /&gt;
 %windir%\system32\cmd.exe /K c:\temp\xtomdl.exe /DICT:c:\temp\modeldef.XML&lt;br /&gt;
&lt;br /&gt;
For example, my &amp;quot;Target:&amp;quot; path is -&lt;br /&gt;
&lt;br /&gt;
 %windir%\system32\cmd.exe /K E:&amp;quot;\FSX_SDK\SDK\Environment Kit\Modeling SDK\3DSM7\Plugins\xtomdl.exe&amp;quot; /XANIM /DICT:E:&amp;quot;\FSX_SDK\SDK\Environment Kit\Modeling SDK\bin\modeldef.XML&amp;quot; &amp;gt; buildlog.txt&lt;br /&gt;
&lt;br /&gt;
My &amp;quot;Start in:&amp;quot; path is -&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;E:\FSX_SDK\SDK\Environment Kit\Modeling SDK\3DSM7\Plugins&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can drag and drop onto that shortcut and a new .CMD window will open and stay open so you can see your results. The redirect command &amp;quot;&amp;gt; buildlog.txt&amp;quot; will write a text file with the results of the command, which is useful to review if there are any error messages.&lt;br /&gt;
&lt;br /&gt;
=== Aircraft models ===&lt;br /&gt;
&lt;br /&gt;
As an &amp;quot;improvement&amp;quot; to the above(2), rename the shortcut something like &amp;quot;CompileAircraft&amp;quot; then move the shortcut to your \SendTo folder:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WinXP -&#039;&#039;&#039;&lt;br /&gt;
 C:\Documents and Settings\User Name\SendTo&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Vista - and Win7&#039;&#039;&#039;&lt;br /&gt;
 C:\Users\&#039;&#039;YourUserName&#039;&#039;\AppData\Roaming\Microsoft\Windows\SendTo&lt;br /&gt;
&lt;br /&gt;
Now, in Explorer rightclick on the .x file and select &amp;quot;CompileAircraft&amp;quot; from the popup menu.&lt;br /&gt;
&lt;br /&gt;
NOTE: The chief advantage of the &amp;quot;Send To&amp;quot; method is that you can have the .x file(s) anywhere you like to keep them, and the compiled .mdl will appear in that same location.&lt;br /&gt;
&lt;br /&gt;
=== Scenery models ===&lt;br /&gt;
&lt;br /&gt;
Creating scenery requires one additional command line switch: /XMLSAMPLE to be added to mix.&lt;br /&gt;
&lt;br /&gt;
Copy the existing CompileAircraft shortcut you just made, and paste it back in the \SendTo folder. Rename is something clever like - say - CompileScenery, and then edit the Target path and add /XMLSAMPLE to the end, so it looks something like this:&lt;br /&gt;
&lt;br /&gt;
 %windir%\system32\cmd.exe /K E:&amp;quot;\FSX_SDK\SDK\Environment Kit\Modeling SDK\3DSM7\Plugins\xtomdl.exe&amp;quot; /DICT:E:&amp;quot;\FSX_SDK\SDK\Environment Kit\Modeling SDK\bin\modeldef.XML&amp;quot; /XMLSAMPLE &amp;gt; buildlog.txt&lt;br /&gt;
&lt;br /&gt;
=== Common Problems ===&lt;br /&gt;
&lt;br /&gt;
1. XTOMDL.EXE generates only MDL-Files with ZERO SIZE -- International windows settings must be set to US (dot used as decimal character)&lt;br /&gt;
&lt;br /&gt;
2. XTOMDL.EXE shows ERROR: NOT CORRECT DIRECTX OR DIRECTX NOT FOUND -- DIRECTX 9.0c Update from October 2006 is needed&lt;br /&gt;
&lt;br /&gt;
3. XTOMDL.EXE doesn&#039;t start because it needs the MICROSOFT .NET FRAMEWORK 2.0505 -- Download it from Microsoft&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
*1) Thanks to John Kane from ACES (MS Developer) for this tip!&lt;br /&gt;
*2) Thanks to Tom Gibson for this tip!&lt;br /&gt;
&lt;br /&gt;
[[category:Aircraft Design]]&lt;br /&gt;
[[category:Scenery Design]]&lt;br /&gt;
[[Category:Tools]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=XtoMDL&amp;diff=8742</id>
		<title>XtoMDL</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=XtoMDL&amp;diff=8742"/>
		<updated>2013-03-12T19:21:56Z</updated>

		<summary type="html">&lt;p&gt;N4gix: /* Aircraft models */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = false&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| FS2000 = unknown&lt;br /&gt;
| FS98 = unknown&lt;br /&gt;
}}&lt;br /&gt;
== XtoMDL ==&lt;br /&gt;
&lt;br /&gt;
Original Entry by Bill Leaming&lt;br /&gt;
&lt;br /&gt;
The new XtoMDL.exe program for FSX is &amp;quot;command line driven,&amp;quot; meaning that there&#039;s no fancy-schmanzy GUI to use.&lt;br /&gt;
&lt;br /&gt;
Did you know that you could create a shortcut on your desktop that would &#039;proxy&#039; commands to another application?(1) Create a shortcut on your desktop, name it something clever like CompileAircraft and enter the following for the &#039;target&#039; (fix up c:\temp to be the appropriate paths to the files):&lt;br /&gt;
&lt;br /&gt;
 %windir%\system32\cmd.exe /K c:\temp\xtomdl.exe /DICT:c:\temp\modeldef.XML&lt;br /&gt;
&lt;br /&gt;
For example, my &amp;quot;Target:&amp;quot; path is -&lt;br /&gt;
&lt;br /&gt;
 %windir%\system32\cmd.exe /K E:&amp;quot;\FSX_SDK\SDK\Environment Kit\Modeling SDK\3DSM7\Plugins\xtomdl.exe&amp;quot; /XANIM /DICT:E:&amp;quot;\FSX_SDK\SDK\Environment Kit\Modeling SDK\bin\modeldef.XML&amp;quot; &amp;gt; buildlog.txt&lt;br /&gt;
&lt;br /&gt;
My &amp;quot;Start in:&amp;quot; path is -&lt;br /&gt;
&lt;br /&gt;
 &amp;quot;E:\FSX_SDK\SDK\Environment Kit\Modeling SDK\3DSM7\Plugins&amp;quot;&lt;br /&gt;
&lt;br /&gt;
You can drag and drop onto that shortcut and a new .CMD window will open and stay open so you can see your results. The redirect command &amp;quot;&amp;gt; buildlog.txt&amp;quot; will write a text file with the results of the command, which is useful to review if there are any error messages.&lt;br /&gt;
&lt;br /&gt;
=== Aircraft models ===&lt;br /&gt;
&lt;br /&gt;
As an &amp;quot;improvement&amp;quot; to the above(2), rename the shortcut something like &amp;quot;CompileAircraft&amp;quot; then move the shortcut to your \SendTo folder:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;WinXP -&#039;&#039;&#039;&lt;br /&gt;
 C:\Documents and Settings\User Name\SendTo&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Vista -&#039;&#039;&#039;&lt;br /&gt;
 C:\Users\&#039;&#039;YourUserName&#039;&#039;\AppData\Roaming\Microsoft\Windows\SendTo&lt;br /&gt;
&lt;br /&gt;
Now, in Explorer rightclick on the .x file and select &amp;quot;CompileAircraft&amp;quot; from the popup menu.&lt;br /&gt;
&lt;br /&gt;
NOTE: The chief advantage of the &amp;quot;Send To&amp;quot; method is that you can have the .x file(s) anywhere you like to keep them, and the compiled .mdl will appear in that same location.&lt;br /&gt;
&lt;br /&gt;
=== Scenery models ===&lt;br /&gt;
&lt;br /&gt;
Creating scenery requires one additional command line switch: /XMLSAMPLE to be added to mix.&lt;br /&gt;
&lt;br /&gt;
Copy the existing CompileAircraft shortcut you just made, and paste it back in the \SendTo folder. Rename is something clever like - say - CompileScenery, and then edit the Target path and add /XMLSAMPLE to the end, so it looks something like this:&lt;br /&gt;
&lt;br /&gt;
 %windir%\system32\cmd.exe /K E:&amp;quot;\FSX_SDK\SDK\Environment Kit\Modeling SDK\3DSM7\Plugins\xtomdl.exe&amp;quot; /DICT:E:&amp;quot;\FSX_SDK\SDK\Environment Kit\Modeling SDK\bin\modeldef.XML&amp;quot; /XMLSAMPLE &amp;gt; buildlog.txt&lt;br /&gt;
&lt;br /&gt;
=== Common Problems ===&lt;br /&gt;
&lt;br /&gt;
1. XTOMDL.EXE generates only MDL-Files with ZERO SIZE -- International windows settings must be set to US (dot used as decimal character)&lt;br /&gt;
&lt;br /&gt;
2. XTOMDL.EXE shows ERROR: NOT CORRECT DIRECTX OR DIRECTX NOT FOUND -- DIRECTX 9.0c Update from October 2006 is needed&lt;br /&gt;
&lt;br /&gt;
3. XTOMDL.EXE doesn&#039;t start because it needs the MICROSOFT .NET FRAMEWORK 2.0505 -- Download it from Microsoft&lt;br /&gt;
&lt;br /&gt;
=== References ===&lt;br /&gt;
&lt;br /&gt;
*1) Thanks to John Kane from ACES (MS Developer) for this tip!&lt;br /&gt;
*2) Thanks to Tom Gibson for this tip!&lt;br /&gt;
&lt;br /&gt;
[[category:Aircraft Design]]&lt;br /&gt;
[[category:Scenery Design]]&lt;br /&gt;
[[Category:Tools]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=OOM_Error&amp;diff=8729</id>
		<title>OOM Error</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=OOM_Error&amp;diff=8729"/>
		<updated>2013-02-26T18:13:57Z</updated>

		<summary type="html">&lt;p&gt;N4gix: /* FINE TUNING VAS */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = false&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| FS2000 = unknown&lt;br /&gt;
| FS98 = unknown&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Overview ==&lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;Virtual Memory&#039;&#039; is a technique of simulating additional memory for an application to use. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Application programs&#039;&#039; and many &#039;&#039;system processes&#039;&#039; always reference memory using &#039;&#039;virtual memory addresses&#039;&#039; which are automatically translated to &#039;&#039;real (RAM) addresses&#039;&#039; by the hardware.  &lt;br /&gt;
&lt;br /&gt;
Virtual memory divides the virtual address space of an application program into pages; a page is a block of contiguous virtual memory addresses.&lt;br /&gt;
&lt;br /&gt;
The virtual memory management component of the operating system maintains the translation tables used by the hardware to provide the mapping of virtual addresses into real addresses.  &lt;br /&gt;
&lt;br /&gt;
==OOM Error==&lt;br /&gt;
&lt;br /&gt;
All 32 bit operating systems (WinXP and Vista32) have 4 GBs of &#039;&#039;[http://en.wikipedia.org/wiki/Virtual_address_space Virtual Address Space]&#039;&#039;, (VAS), to work with, as that is the maximum number that can be expressed with only 32bits. &lt;br /&gt;
&lt;br /&gt;
The VAS table is the same size whether your system physically has 512MB RAM or 4GB of RAM...&lt;br /&gt;
&lt;br /&gt;
By default, 2GB of VAS addresses are reserved for the operating system, with the remaining 2GB of VAS reserved for application programs. &lt;br /&gt;
Note that every application running maintains it&#039;s own set of VAS addresses, and that the operating system will take care of shuffling both the application&#039;s address table and the data contents back and forth from the Virtual Memory on the hard drive as necessary.&lt;br /&gt;
&lt;br /&gt;
Obviously, everytime a running application needs to access it&#039;s VAS table and data, the OS needs to swap things around. The more application programs running at once, the more things get slowed down.&lt;br /&gt;
&lt;br /&gt;
When you add the /3GB switch, what you are doing is increasing the total available Virtual Address Space (VAS) for FSX to use, which in turn reduces the available VAS for the operating system.&lt;br /&gt;
&lt;br /&gt;
It&#039;s a case of &amp;quot;robbing Peter to pay Paul...&amp;quot;&lt;br /&gt;
&lt;br /&gt;
What the 3GB &amp;quot;tweak&amp;quot; accomplishes in both WinXP and Vista32 is that you essentially increase the size of the VAS table available to ALL running programs for which the &amp;quot;flag&amp;quot; for &amp;quot;LARGEADDRESSAWARE&amp;quot; has been set. The FSX.exe for both RTM, SP1 must be manually made &amp;quot;LARGEADDRESSAWARE&amp;quot;, where the SP2 FSX.exe has already been marked as &amp;quot;LARGEADDRESSAWARE.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
In all cases though, the onus is on the user to tell their operating system to increase the VAS for all &amp;quot;enabled&amp;quot; application programs. The procedure for WinXP and Vista are different, but the results are identical.&lt;br /&gt;
&lt;br /&gt;
This next bit of information is critical to coming to a more full understanding of what is causing the &amp;quot;OOM Error&amp;quot; to occur:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[FSX will only use &amp;quot;contiguous 1MB blocks of VAS]].&amp;quot;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Anytime FSX cannot find a 1MB block of VAS in which to &amp;quot;load stuff,&amp;quot; it will summarily crash to desktop...&lt;br /&gt;
&lt;br /&gt;
Incidentally, it&#039;s also important to note that the amount of memory on a video card can actually hinder performance rather than help...&lt;br /&gt;
&lt;br /&gt;
...that is because the video card&#039;s memory addresses are mapped to the operating system&#039;s slice of VAS, and therefore reduces the total number of Virtual Addresses available the operating system...&lt;br /&gt;
&lt;br /&gt;
For example, a video card with 512MB of onboard RAM will consume 512MB of the available operating system&#039;s slice of VAS, so robbing too much from the OS&#039;s slice can cause a lot of problems. As always, this is a balancing act...&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== FINE TUNING VAS ==&lt;br /&gt;
&lt;br /&gt;
As I stated previously, since it&#039;s a case of &amp;quot;robbing Peter to pay Paul,&amp;quot; it may be best to allocate LESS than a full GB of VAS to applications, which is why Phil Taylor recommends using /2560 rather than the full /3072 MB.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE: The following applies only to WinXP users:&lt;br /&gt;
--------------------------------------------------------&#039;&#039;&#039;&lt;br /&gt;
In your boot.ini file, if you have added the /3GB switch already:&lt;br /&gt;
&lt;br /&gt;
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS=&amp;quot;Microsoft Windows XP Professional&amp;quot; /noexecute=optin /fastdetect /3GB&lt;br /&gt;
&lt;br /&gt;
To &amp;quot;fine tune&amp;quot; the actual amount of VAS allocated, you need only add another switch to the end of the entire entry:&lt;br /&gt;
&lt;br /&gt;
/Userva=2560&lt;br /&gt;
&lt;br /&gt;
or whatever size you wish, keeping in mind the 1MB contiguous limit of FSX. In such a case, using any number that isn&#039;t a multiple of 512MB simply doesn&#039;t make much sense...&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE: The following applies only to Vista32 users:&lt;br /&gt;
--------------------------------------------------------&#039;&#039;&#039;&lt;br /&gt;
 BCDEDIT /set increaseuserva 2560&lt;br /&gt;
 BCDEDIT /set increaseuserva 3072&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== WARNING! ==&lt;br /&gt;
&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It is possible to starve the operating system&#039;s slice of VAS to the point that your system will no longer boot!&lt;br /&gt;
&lt;br /&gt;
If this happens, you must reboot the computer into &amp;quot;Safe Mode&amp;quot; (which bypasses the /3GB switch, and then edit your boot.ini (WinXP) or use bcdecit (Vista) to reduce the size of the application slice of the VAS.&lt;br /&gt;
&lt;br /&gt;
[[category:General]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=XML:_RNOR_Bug!&amp;diff=8723</id>
		<title>XML: RNOR Bug!</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=XML:_RNOR_Bug!&amp;diff=8723"/>
		<updated>2013-02-15T15:52:12Z</updated>

		<summary type="html">&lt;p&gt;N4gix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = true&lt;br /&gt;
| FS2002 = true&lt;br /&gt;
| XP10 = false &lt;br /&gt;
| XP9 = false &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== XML: RNOR Bug! ==&lt;br /&gt;
&lt;br /&gt;
There is a bug in the rnor function that can be used in XML scripts (in both gauges and modeldef.xml).&lt;br /&gt;
&lt;br /&gt;
The expression 4.0 rnor should be 4.0, not 0.86 as FS returns.  The problem is that the parsing engine is doing a mod by pi instead of 2 pi.&lt;br /&gt;
&lt;br /&gt;
What to do about this?  I would suggest taking a number and converting to degrees (using the rddg function), then using dnor (to normalize the number of degrees to a range between 0 and 360). and then convert back to radians using dgrd.  Take care to mind your d&#039;s and r&#039;s and g&#039;s, though!&lt;br /&gt;
&lt;br /&gt;
[[Category:Aircraft Design]]&lt;br /&gt;
[[Category:Panel and Gauge Design]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=Taxi_light&amp;diff=8696</id>
		<title>Taxi light</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=Taxi_light&amp;diff=8696"/>
		<updated>2013-02-03T17:26:05Z</updated>

		<summary type="html">&lt;p&gt;N4gix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:VTBStaxilightFinal.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are variety of the methods of making Taxi Edge Light:&lt;br /&gt;
&lt;br /&gt;
1.Make individual light, attached with effect and place the instance many time by xml.  This is good for small airport with hundred of taxi lights but not thousand in big international airport since many xml placement will cause fps drop.  The difficult of this is you have to place them many times and it is time consuming method.  You can have difficulties placing along the straight line to make it perfectly strait.  Or even more difficult, perfectly curve along the turn&lt;br /&gt;
&lt;br /&gt;
2.Make the whole taxi lights in gmax and export them in one file.  This will keep XML minimal just only one time placement.  Then use maxscript  from Nick Whittome [http://www.fsdeveloper.com/wiki/index.php?title=Apron_lighting_using_effects_and_GMax] . But the effect can cause frame rate drop dramatically.  I did that and I found 50% drop[http://www.fsdeveloper.com/forum/showthread.php?t=424631].&lt;br /&gt;
&lt;br /&gt;
3.Make the same way as the second method but eliminate the use of  effect.  This will be the best from frame rate but less visibility range.  You can see your light only withing a few hundred meters.[http://fsdeveloper.com/forum/showthread.php?t=259310]  Please read #12.&lt;br /&gt;
&lt;br /&gt;
I think I found a sweet spot between visibility range that you get from effect and the ease of placement.&lt;br /&gt;
Here is my tutorial about taxi lights.&lt;br /&gt;
Taxi Edge Light Tutorial [http://www.fsdeveloper.com/forum/attachment.php?attachmentid=13936&amp;amp;d=1359701230]&lt;br /&gt;
&lt;br /&gt;
[[Category:Airport Design]]&lt;br /&gt;
[[category:Scenery Design]]&lt;br /&gt;
[[category:Effects]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=Taxi_light&amp;diff=8695</id>
		<title>Taxi light</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=Taxi_light&amp;diff=8695"/>
		<updated>2013-02-03T17:22:39Z</updated>

		<summary type="html">&lt;p&gt;N4gix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Image:VTBStaxilightFinal.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
There are variety of the methods of making Taxi Edge Light:&lt;br /&gt;
&lt;br /&gt;
1.Make individual light, attached with effect and place the instance many time by xml.  This is good for small airport with hundred of taxi lights but not thousand in big international airport since many xml placement will cause fps drop.  The difficult of this is you have to place them many times and it is time consuming method.  You can have difficulties placing along the straight line to make it perfectly strait.  Or even more difficult, perfectly curve along the turn&lt;br /&gt;
&lt;br /&gt;
2.Make the whole taxi lights in gmax and export them in one file.  This will keep XML minimal just only one time placement.  Then use maxscript  from Nick Whittome [http://www.fsdeveloper.com/wiki/index.php?title=Apron_lighting_using_effects_and_GMax] . But the effect can cause frame rate drop dramatically.  I did that and I found 50% drop[http://www.fsdeveloper.com/forum/showthread.php?t=424631].&lt;br /&gt;
&lt;br /&gt;
3.Make the same way as the second method but eliminate the use of  effect.  This will be the best from frame rate but less visibility range.  You can see your light only withing a few hundred meters.[http://fsdeveloper.com/forum/showthread.php?t=259310]  Please read #12.&lt;br /&gt;
&lt;br /&gt;
I think I found a sweet spot between visibility range that you get from effect and the ease of placement.&lt;br /&gt;
Here is my tutorial about taxi lights.&lt;br /&gt;
Taxi Edge Light Tutorial [http://www.fsdeveloper.com/forum/attachment.php?attachmentid=13936&amp;amp;d=1359701230]&lt;br /&gt;
&lt;br /&gt;
[[Category:Airport Design]]&lt;br /&gt;
[[category:Scenery Design]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=XML:_Decimal_To_BCD_Macro_-_Set_Nav/Com_Freq&amp;diff=8597</id>
		<title>XML: Decimal To BCD Macro - Set Nav/Com Freq</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=XML:_Decimal_To_BCD_Macro_-_Set_Nav/Com_Freq&amp;diff=8597"/>
		<updated>2012-11-17T21:44:34Z</updated>

		<summary type="html">&lt;p&gt;N4gix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = true&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| FS2000 = unknown&lt;br /&gt;
| FS98 = unknown&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==XML:Decimal to BCD Macro==&lt;br /&gt;
&lt;br /&gt;
A very simple but useful @macro to convert any decimal frequency to BCD format to allow direct SETting of COM and NAV frequencies in FS:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;Dec2Bcd&amp;quot;&amp;gt;&lt;br /&gt;
   100.001 * 10000 % int&lt;br /&gt;
   d 10 % r 10 / int&lt;br /&gt;
   d 10 % r 10 / int&lt;br /&gt;
   d 10 % r 10 / int&lt;br /&gt;
   16 * +&lt;br /&gt;
   16 * +&lt;br /&gt;
   16 * +&lt;br /&gt;
 &amp;lt;/Macro&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Usage is then as simple as passing the decimal frequency to the @macro the issuing the appropriate _SET key event:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Click&amp;gt;&lt;br /&gt;
     @Dec2Bcd(112.30) (&amp;gt;K:NAV2_RADIO_SET)&lt;br /&gt;
 &amp;lt;/Click&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You could also use a custom L:var to pass a &amp;quot;tuned&amp;quot; frequency:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Click&amp;gt;&lt;br /&gt;
     @Dec2Bcd((L:Nav2Freq,enum)) (&amp;gt;K:NAV2_RADIO_SET)&lt;br /&gt;
 &amp;lt;/Click&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Aircraft Design]]&lt;br /&gt;
[[Category:Panel and Gauge Design]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=XML:_Decimal_To_BCD_Macro_-_Set_Nav/Com_Freq&amp;diff=8596</id>
		<title>XML: Decimal To BCD Macro - Set Nav/Com Freq</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=XML:_Decimal_To_BCD_Macro_-_Set_Nav/Com_Freq&amp;diff=8596"/>
		<updated>2012-11-17T15:11:52Z</updated>

		<summary type="html">&lt;p&gt;N4gix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = true&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| FS2000 = unknown&lt;br /&gt;
| FS98 = unknown&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==XML:Decimal to BCD Macro==&lt;br /&gt;
&lt;br /&gt;
A very simple but useful @macro to convert any decimal frequency to BCD format to allow direct SETting of COM and NAV frequencies in FS:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;Dec2Bcd&amp;quot;&amp;gt;&lt;br /&gt;
   100 * 10000 % int&lt;br /&gt;
   d 10 % r 10 / int&lt;br /&gt;
   d 10 % r 10 / int&lt;br /&gt;
   d 10 % r 10 / int&lt;br /&gt;
   16 * +&lt;br /&gt;
   16 * +&lt;br /&gt;
   16 * +&lt;br /&gt;
 &amp;lt;/Macro&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Usage is then as simple as passing the decimal frequency to the @macro the issuing the appropriate _SET key event:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Click&amp;gt;&lt;br /&gt;
     @Dec2Bcd(112.30) (&amp;gt;K:NAV2_RADIO_SET)&lt;br /&gt;
 &amp;lt;/Click&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You could also use a custom L:var to pass a &amp;quot;tuned&amp;quot; frequency:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Click&amp;gt;&lt;br /&gt;
     @Dec2Bcd((L:Nav2Freq,enum)) (&amp;gt;K:NAV2_RADIO_SET)&lt;br /&gt;
 &amp;lt;/Click&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Aircraft Design]]&lt;br /&gt;
[[Category:Panel and Gauge Design]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=Flight_Dynamics_Development:_FDE&amp;diff=8554</id>
		<title>Flight Dynamics Development: FDE</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=Flight_Dynamics_Development:_FDE&amp;diff=8554"/>
		<updated>2012-09-21T20:40:19Z</updated>

		<summary type="html">&lt;p&gt;N4gix: New page: {{Infobox-Applicable-FSVersion | FSXA = true | FSX = true | FS2004 = true | FS2002 = false | XP10 = false  | XP9 = false  }}   == Flight Dymanics Development: FDE ==  This is an empty topi...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = true&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| XP10 = false &lt;br /&gt;
| XP9 = false &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Flight Dymanics Development: FDE ==&lt;br /&gt;
&lt;br /&gt;
This is an empty topic created by Bill Leaming to be filled out by Roy Holmes later...&lt;br /&gt;
&lt;br /&gt;
[[Category:Aircraft Design]]&lt;br /&gt;
[[Category:Flight Dynamics]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=Aircraft_Fuselage_Creation:_The_Perfect_Way&amp;diff=8551</id>
		<title>Aircraft Fuselage Creation: The Perfect Way</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=Aircraft_Fuselage_Creation:_The_Perfect_Way&amp;diff=8551"/>
		<updated>2012-08-08T16:05:42Z</updated>

		<summary type="html">&lt;p&gt;N4gix: New page: {{Infobox-Applicable-FSVersion | FSXA = true | FSX = true | FS2004 = true | FS2002 = true | FS2000 = false | FS98 = false }}  ==Aircraft Fuselage Creation: The Perfect Way==  I&amp;#039;m going to ...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = true&lt;br /&gt;
| FS2002 = true&lt;br /&gt;
| FS2000 = false&lt;br /&gt;
| FS98 = false&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Aircraft Fuselage Creation: The Perfect Way==&lt;br /&gt;
&lt;br /&gt;
I&#039;m going to take the time to retype a post made by the late Master of Max/GMax Gerard van der Harst back on November 11, 2002 that I printed out and added to my &#039;&#039;&#039;&#039;&#039;Design Notes&#039;&#039;&#039;&#039;&#039; folder on that date.&lt;br /&gt;
&lt;br /&gt;
I&#039;ve since built every model using this technique with perfect results every time!&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
There&#039;s no need to screw around with tubes people, and the &amp;quot;clone and downscale&amp;quot; method sucks because you have to indeed &amp;quot;plug the holes.&amp;quot;  Besides, downscaling will not give you constant thickness... and a host of other problems.&lt;br /&gt;
&lt;br /&gt;
Here&#039;s the (I dare say) &#039;&#039;&#039;THE&#039;&#039;&#039; way:&lt;br /&gt;
&lt;br /&gt;
- Build the fuselage.&lt;br /&gt;
&lt;br /&gt;
- Convert to editable mesh, clone the fuselage, select all polygons and extrude them inwards (negative value) along their normals (tick &#039;Local&#039;).&lt;br /&gt;
&lt;br /&gt;
- Select all polygons and hit &#039;Flip&#039;.&lt;br /&gt;
&lt;br /&gt;
- Attach the new &amp;quot;inner hull&amp;quot; to the fuselage, select all vertices, set weld threshold to 0.001m and hit &#039;Weld Selected.&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;That&#039;s it: constant thickness and no holes to plug!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
[[Category:Aircraft Design]]&lt;br /&gt;
[[Category:Modeling]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=C:_XML_Variables_in_C_Gauges&amp;diff=8492</id>
		<title>C: XML Variables in C Gauges</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=C:_XML_Variables_in_C_Gauges&amp;diff=8492"/>
		<updated>2012-07-11T02:25:27Z</updated>

		<summary type="html">&lt;p&gt;N4gix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = true&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| XP10 = false &lt;br /&gt;
| XP9 = false &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==C: XML Variables in C Gauges==&lt;br /&gt;
&lt;br /&gt;
To control XML variables from a C gauge:&lt;br /&gt;
&lt;br /&gt;
 // declare the variable and pointer ID for the variable&lt;br /&gt;
 &lt;br /&gt;
 double pitot_cover = 1 ; // this is the C variable&lt;br /&gt;
 ID pitot_cover_id; // this is the pointer address to the XML variable&lt;br /&gt;
&lt;br /&gt;
 // Register the variable (this is the XML &amp;quot;name,&amp;quot; e.g., L:PitotCover&lt;br /&gt;
 &lt;br /&gt;
 case PANEL_SERVICE_PRE_INITIALIZE:&lt;br /&gt;
 register_named_variable ( &amp;quot;PitotCover&amp;quot; );&lt;br /&gt;
 break;&lt;br /&gt;
&lt;br /&gt;
 // now, you can use the next two statements to &lt;br /&gt;
 // (a) associate the ID with the XML variable, then &lt;br /&gt;
 // (b) set the variable to be identical to the C variable, e.g., pitot_cover&lt;br /&gt;
 &lt;br /&gt;
 case PANEL_SERVICE_PRE_UPDATE:&lt;br /&gt;
 pitot_cover_id = check_named_variable ( &amp;quot;PitotCover&amp;quot; ) ;&lt;br /&gt;
 set_named_variable_value ( pitot_cover_id, (FLOAT64)pitot_cover ) ;&lt;br /&gt;
 break;&lt;br /&gt;
&lt;br /&gt;
 // now, in my mouse routine, I can set the value of pitot_cover, and it will &lt;br /&gt;
 //be automatically passed to the XML variable!&lt;br /&gt;
 &lt;br /&gt;
 BOOL FSAPI mouse_pitotcb( PPIXPOINT relative_point, FLAGS32 mouse_flags)&lt;br /&gt;
 {&lt;br /&gt;
   if ( pitot_cover == 0 ) { pitot_cover = 1 ; } else { pitot_cover = 0 ; }&lt;br /&gt;
   return FALSE;&lt;br /&gt;
 } &lt;br /&gt;
&lt;br /&gt;
 // now, to use the XML variable to control the C variable, the only&lt;br /&gt;
 // difference is that you would use the get_named_variable_value command &lt;br /&gt;
 // instead, and omit the mouse code!&lt;br /&gt;
 &lt;br /&gt;
 pitot_cover_id = check_named_variable(&amp;quot;PitotCover&amp;quot;);&lt;br /&gt;
 pitot_cover = get_named_variable_value (pitot_cover_id); &lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;Alternate Method&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
There is another method that may be used to communicate between C gauges and XML gauges, using the execute_calculator_code(); function. Here is the prototype for the function:&lt;br /&gt;
&lt;br /&gt;
 execute_calculator_code(PCSTRINGZ code, FLOAT64* fvalue, SINT32* ivalue, PCSTRINGZ* svalue);&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Translating&amp;quot; the function into more easily understood pseudo-code, we have this:&lt;br /&gt;
&lt;br /&gt;
 execute_calculator_code(XML variable name,units, floating point var name, integer variable name, string variable name);&lt;br /&gt;
&lt;br /&gt;
To use the function, first determine from the &amp;quot;units&amp;quot; of the XML variable whether the returned value will be a floating point number, an integer, or a string.&lt;br /&gt;
&lt;br /&gt;
When constructing the function call, only ONE of the fields 2 through 4 will be used, an the unused fields filled with &amp;quot;NULL&amp;quot; value. For example, we want to fetch an ADF frequency, so we&#039;d use something like this:&lt;br /&gt;
&lt;br /&gt;
 FLOAT64 adf1_frequency = 0; // first declare the float C variable&lt;br /&gt;
 execute_calculator_code(&amp;quot;(A:ADF ACTIVE FREQUENCY:1, KHz)&amp;quot;,&amp;amp;adf1_frequency,NULL,NULL);&lt;br /&gt;
&lt;br /&gt;
If the XML variable is an integer, here is an example:&lt;br /&gt;
&lt;br /&gt;
 SINT32 time_of_day; // first declare the integer C variable&lt;br /&gt;
 execute_calculator_code(&amp;quot;(E:TIME OF DAY,Enum)&amp;quot;,NULL,&amp;amp;time_of_day,NULL);&lt;br /&gt;
&lt;br /&gt;
If the XML variable is a string, here is an example:&lt;br /&gt;
&lt;br /&gt;
 PCSTRINGZ WP_NextID; // first declare the string C variable&lt;br /&gt;
 execute_calculator_code(&amp;quot;(A:GPS WP_NEXT ID,string)&amp;quot;,NULL,NULL,&amp;amp;WP_NextID);&lt;br /&gt;
&lt;br /&gt;
Custom L:variables may also be obtained following the same structure shown above.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;BOOLEAN:&#039;&#039;&lt;br /&gt;
 execute_calculator_code(&amp;quot;(L:MyCustomVariable,bool)&amp;quot;,NULL,&amp;amp;my_custom_variable,NULL);&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;FLOAT:&#039;&#039;&lt;br /&gt;
 execute_calculator_code(&amp;quot;(L:MyCustomVariable,enum)&amp;quot;,&amp;amp;my_custom_variable,NULL,NULL);&lt;br /&gt;
&lt;br /&gt;
This method is much easier to use than the method described in the previous section. &lt;br /&gt;
&lt;br /&gt;
To SEND a command with this method, use the following format:&lt;br /&gt;
&lt;br /&gt;
 execute_calculator_code(&amp;quot;(&amp;gt;K:SOUND_TOGGLE)&amp;quot;, NULL, NULL, NULL);&lt;br /&gt;
&lt;br /&gt;
If you need to pass a value for a SET type key_event, simply use the same syntax used in an XML gauge by prefixing the command with the value (which can itself be another XML variable as shown below):&lt;br /&gt;
&lt;br /&gt;
 execute_calculator_code(&amp;quot;(A:Plane heading degrees gyro,degrees) (&amp;gt;K:HEADING_BUG_SET)&amp;quot;, NULL, NULL, NULL);&lt;br /&gt;
&lt;br /&gt;
To set an L:variable, use this syntax:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Constant:&#039;&#039;&lt;br /&gt;
 execute_calculator_code(&amp;quot; 120 (&amp;gt;L:CustomXMLvar,enum)&amp;quot;,NULL,NULL,NULL);&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;C Variable:&#039;&#039;&lt;br /&gt;
 FLOAT64 myVar = 100.00;&lt;br /&gt;
 char cTemp[60];&lt;br /&gt;
 sprintf_s(cTemp, %f%s, myVar, &amp;quot; (&amp;gt;L:MyVar,number)&amp;quot;);&lt;br /&gt;
 PCSTRINGZ szString = cTemp;&lt;br /&gt;
 execute_calculator_code(szString,NULL,NULL,NULL);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Aircraft Design]]&lt;br /&gt;
[[Category:Panel and Gauge Design]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=C:_XML_Variables_in_C_Gauges&amp;diff=8491</id>
		<title>C: XML Variables in C Gauges</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=C:_XML_Variables_in_C_Gauges&amp;diff=8491"/>
		<updated>2012-07-11T02:24:17Z</updated>

		<summary type="html">&lt;p&gt;N4gix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = true&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| XP10 = false &lt;br /&gt;
| XP9 = false &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==C: XML Variables in C Gauges==&lt;br /&gt;
&lt;br /&gt;
To control XML variables from a C gauge:&lt;br /&gt;
&lt;br /&gt;
 // declare the variable and pointer ID for the variable&lt;br /&gt;
 &lt;br /&gt;
 double pitot_cover = 1 ; // this is the C variable&lt;br /&gt;
 ID pitot_cover_id; // this is the pointer address to the XML variable&lt;br /&gt;
&lt;br /&gt;
 // Register the variable (this is the XML &amp;quot;name,&amp;quot; e.g., L:PitotCover&lt;br /&gt;
 &lt;br /&gt;
 case PANEL_SERVICE_PRE_INITIALIZE:&lt;br /&gt;
 register_named_variable ( &amp;quot;PitotCover&amp;quot; );&lt;br /&gt;
 break;&lt;br /&gt;
&lt;br /&gt;
 // now, you can use the next two statements to &lt;br /&gt;
 // (a) associate the ID with the XML variable, then &lt;br /&gt;
 // (b) set the variable to be identical to the C variable, e.g., pitot_cover&lt;br /&gt;
 &lt;br /&gt;
 case PANEL_SERVICE_PRE_UPDATE:&lt;br /&gt;
 pitot_cover_id = check_named_variable ( &amp;quot;PitotCover&amp;quot; ) ;&lt;br /&gt;
 set_named_variable_value ( pitot_cover_id, (FLOAT64)pitot_cover ) ;&lt;br /&gt;
 break;&lt;br /&gt;
&lt;br /&gt;
 // now, in my mouse routine, I can set the value of pitot_cover, and it will &lt;br /&gt;
 //be automatically passed to the XML variable!&lt;br /&gt;
 &lt;br /&gt;
 BOOL FSAPI mouse_pitotcb( PPIXPOINT relative_point, FLAGS32 mouse_flags)&lt;br /&gt;
 {&lt;br /&gt;
   if ( pitot_cover == 0 ) { pitot_cover = 1 ; } else { pitot_cover = 0 ; }&lt;br /&gt;
   return FALSE;&lt;br /&gt;
 } &lt;br /&gt;
&lt;br /&gt;
 // now, to use the XML variable to control the C variable, the only&lt;br /&gt;
 // difference is that you would use the get_named_variable_value command &lt;br /&gt;
 // instead, and omit the mouse code!&lt;br /&gt;
 &lt;br /&gt;
 pitot_cover_id = check_named_variable(&amp;quot;PitotCover&amp;quot;);&lt;br /&gt;
 pitot_cover = get_named_variable_value (pitot_cover_id); &lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;Alternate Method&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
There is another method that may be used to communicate between C gauges and XML gauges, using the execute_calculator_code(); function. Here is the prototype for the function:&lt;br /&gt;
&lt;br /&gt;
 execute_calculator_code(PCSTRINGZ code, FLOAT64* fvalue, SINT32* ivalue, PCSTRINGZ* svalue);&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Translating&amp;quot; the function into more easily understood pseudo-code, we have this:&lt;br /&gt;
&lt;br /&gt;
 execute_calculator_code(XML variable name,units, floating point var name, integer variable name, string variable name);&lt;br /&gt;
&lt;br /&gt;
To use the function, first determine from the &amp;quot;units&amp;quot; of the XML variable whether the returned value will be a floating point number, an integer, or a string.&lt;br /&gt;
&lt;br /&gt;
When constructing the function call, only ONE of the fields 2 through 4 will be used, an the unused fields filled with &amp;quot;NULL&amp;quot; value. For example, we want to fetch an ADF frequency, so we&#039;d use something like this:&lt;br /&gt;
&lt;br /&gt;
 FLOAT64 adf1_frequency = 0; // first declare the float C variable&lt;br /&gt;
 execute_calculator_code(&amp;quot;(A:ADF ACTIVE FREQUENCY:1, KHz)&amp;quot;,&amp;amp;adf1_frequency,NULL,NULL);&lt;br /&gt;
&lt;br /&gt;
If the XML variable is an integer, here is an example:&lt;br /&gt;
&lt;br /&gt;
 SINT32 time_of_day; // first declare the integer C variable&lt;br /&gt;
 execute_calculator_code(&amp;quot;(E:TIME OF DAY,Enum)&amp;quot;,NULL,&amp;amp;time_of_day,NULL);&lt;br /&gt;
&lt;br /&gt;
If the XML variable is a string, here is an example:&lt;br /&gt;
&lt;br /&gt;
 PCSTRINGZ WP_NextID; // first declare the string C variable&lt;br /&gt;
 execute_calculator_code(&amp;quot;(A:GPS WP_NEXT ID,string)&amp;quot;,NULL,NULL,&amp;amp;WP_NextID);&lt;br /&gt;
&lt;br /&gt;
Custom L:variables may also be obtained following the same structure shown above.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;BOOLEAN:&#039;&#039;&lt;br /&gt;
 execute_calculator_code(&amp;quot;(L:MyCustomVariable,bool)&amp;quot;,NULL,&amp;amp;my_custom_variable,NULL);&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;FLOAT:&#039;&#039;&lt;br /&gt;
 execute_calculator_code(&amp;quot;(L:MyCustomVariable,enum)&amp;quot;,&amp;amp;my_custom_variable,NULL,NULL);&lt;br /&gt;
&lt;br /&gt;
This method is much easier to use than the method described in the previous section. &lt;br /&gt;
&lt;br /&gt;
To SEND a command with this method, use the following format:&lt;br /&gt;
&lt;br /&gt;
 execute_calculator_code(&amp;quot;(&amp;gt;K:SOUND_TOGGLE)&amp;quot;, NULL, NULL, NULL);&lt;br /&gt;
&lt;br /&gt;
If you need to pass a value for a SET type key_event, simply use the same syntax used in an XML gauge by prefixing the command with the value (which can itself be another XML variable as shown below):&lt;br /&gt;
&lt;br /&gt;
 execute_calculator_code(&amp;quot;(A:Plane heading degrees gyro,degrees) (&amp;gt;K:HEADING_BUG_SET)&amp;quot;, NULL, NULL, NULL);&lt;br /&gt;
&lt;br /&gt;
To set an L:variable, use this syntax:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Constant:&#039;&#039;&lt;br /&gt;
 execute_calculator_code(&amp;quot; 120 (&amp;gt;L:CustomXMLvar,enum)&amp;quot;,NULL,NULL,NULL);&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;C Variable:&#039;&#039;&lt;br /&gt;
FLOAT64 myVar = 100.00;&lt;br /&gt;
char cTemp[60];&lt;br /&gt;
sprintf_s(cTemp, %f%s, myVar, &amp;quot; (&amp;gt;L:MyVar,number)&amp;quot;);&lt;br /&gt;
PCSTRINGZ szString = cTemp;&lt;br /&gt;
execute_calculator_code(szString,NULL,NULL,NULL);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Aircraft Design]]&lt;br /&gt;
[[Category:Panel and Gauge Design]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=C:_XML_Variables_in_C_Gauges&amp;diff=8490</id>
		<title>C: XML Variables in C Gauges</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=C:_XML_Variables_in_C_Gauges&amp;diff=8490"/>
		<updated>2012-07-10T16:43:19Z</updated>

		<summary type="html">&lt;p&gt;N4gix: New page: {{Infobox-Applicable-FSVersion | FSXA = true | FSX = true | FS2004 = true | FS2002 = false | XP10 = false  | XP9 = false  }}   ==C: XML Variables in C Gauges==  To control XML variables fr...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = true&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| XP10 = false &lt;br /&gt;
| XP9 = false &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==C: XML Variables in C Gauges==&lt;br /&gt;
&lt;br /&gt;
To control XML variables from a C gauge:&lt;br /&gt;
&lt;br /&gt;
 // declare the variable and pointer ID for the variable&lt;br /&gt;
 &lt;br /&gt;
 double pitot_cover = 1 ; // this is the C variable&lt;br /&gt;
 ID pitot_cover_id; // this is the pointer address to the XML variable&lt;br /&gt;
&lt;br /&gt;
 // Register the variable (this is the XML &amp;quot;name,&amp;quot; e.g., L:PitotCover&lt;br /&gt;
 &lt;br /&gt;
 case PANEL_SERVICE_PRE_INITIALIZE:&lt;br /&gt;
 register_named_variable ( &amp;quot;PitotCover&amp;quot; );&lt;br /&gt;
 break;&lt;br /&gt;
&lt;br /&gt;
 // now, you can use the next two statements to &lt;br /&gt;
 // (a) associate the ID with the XML variable, then &lt;br /&gt;
 // (b) set the variable to be identical to the C variable, e.g., pitot_cover&lt;br /&gt;
 &lt;br /&gt;
 case PANEL_SERVICE_PRE_UPDATE:&lt;br /&gt;
 pitot_cover_id = check_named_variable ( &amp;quot;PitotCover&amp;quot; ) ;&lt;br /&gt;
 set_named_variable_value ( pitot_cover_id, (FLOAT64)pitot_cover ) ;&lt;br /&gt;
 break;&lt;br /&gt;
&lt;br /&gt;
 // now, in my mouse routine, I can set the value of pitot_cover, and it will &lt;br /&gt;
 //be automatically passed to the XML variable!&lt;br /&gt;
 &lt;br /&gt;
 BOOL FSAPI mouse_pitotcb( PPIXPOINT relative_point, FLAGS32 mouse_flags)&lt;br /&gt;
 {&lt;br /&gt;
   if ( pitot_cover == 0 ) { pitot_cover = 1 ; } else { pitot_cover = 0 ; }&lt;br /&gt;
   return FALSE;&lt;br /&gt;
 } &lt;br /&gt;
&lt;br /&gt;
 // now, to use the XML variable to control the C variable, the only&lt;br /&gt;
 // difference is that you would use the get_named_variable_value command &lt;br /&gt;
 // instead, and omit the mouse code!&lt;br /&gt;
 &lt;br /&gt;
 pitot_cover_id = check_named_variable(&amp;quot;PitotCover&amp;quot;);&lt;br /&gt;
 pitot_cover = get_named_variable_value (pitot_cover_id); &lt;br /&gt;
 &lt;br /&gt;
&#039;&#039;&#039;Alternate Method&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
There is another method that may be used to communicate between C gauges and XML gauges, using the execute_calculator_code(); function. Here is the prototype for the function:&lt;br /&gt;
&lt;br /&gt;
 execute_calculator_code(PCSTRINGZ code, FLOAT64* fvalue, SINT32* ivalue, PCSTRINGZ* svalue);&lt;br /&gt;
&lt;br /&gt;
&amp;quot;Translating&amp;quot; the function into more easily understood pseudo-code, we have this:&lt;br /&gt;
&lt;br /&gt;
 execute_calculator_code(XML variable name,units, floating point var name, integer variable name, string variable name);&lt;br /&gt;
&lt;br /&gt;
To use the function, first determine from the &amp;quot;units&amp;quot; of the XML variable whether the returned value will be a floating point number, an integer, or a string.&lt;br /&gt;
&lt;br /&gt;
When constructing the function call, only ONE of the fields 2 through 4 will be used, an the unused fields filled with &amp;quot;NULL&amp;quot; value. For example, we want to fetch an ADF frequency, so we&#039;d use something like this:&lt;br /&gt;
&lt;br /&gt;
 FLOAT64 adf1_frequency = 0; // first declare the float C variable&lt;br /&gt;
 execute_calculator_code(&amp;quot;(A:ADF ACTIVE FREQUENCY:1, KHz)&amp;quot;,&amp;amp;adf1_frequency,NULL,NULL);&lt;br /&gt;
&lt;br /&gt;
If the XML variable is an integer, here is an example:&lt;br /&gt;
&lt;br /&gt;
 SINT32 time_of_day; // first declare the integer C variable&lt;br /&gt;
 execute_calculator_code(&amp;quot;(E:TIME OF DAY,Enum)&amp;quot;,NULL,&amp;amp;time_of_day,NULL);&lt;br /&gt;
&lt;br /&gt;
If the XML variable is a string, here is an example:&lt;br /&gt;
&lt;br /&gt;
 PCSTRINGZ VorIcaoCode; // first declare the string C variable&lt;br /&gt;
 execute_calculator_code(&amp;quot;(C:fs9gps:WaypointICAO,st ring)&amp;quot;,NULL,NULL,&amp;amp;VorIcaoCode);&lt;br /&gt;
&lt;br /&gt;
Take note that the string example also shows how we can easily fetch stuff from the GPS system using this technique!&lt;br /&gt;
&lt;br /&gt;
Custom L:variables may also be obtained following the same structure shown above.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;BOOLEAN:&#039;&#039;&lt;br /&gt;
 execute_calculator_code(&amp;quot;(L:MyCustomVariable,bool)&amp;quot;,NULL,&amp;amp;my_custom_variable,NULL);&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;FLOAT:&#039;&#039;&lt;br /&gt;
 execute_calculator_code(&amp;quot;(L:MyCustomVariable,enum)&amp;quot;,&amp;amp;my_custom_variable,NULL,NULL);&lt;br /&gt;
&lt;br /&gt;
This method is much easier to use than the method described in the previous section. &lt;br /&gt;
&lt;br /&gt;
To SEND a command with this method, use the following format:&lt;br /&gt;
&lt;br /&gt;
 execute_calculator_code(&amp;quot;(&amp;gt;K:SOUND_TOGGLE)&amp;quot;, NULL, NULL, NULL);&lt;br /&gt;
&lt;br /&gt;
If you need to pass a value for a SET type key_event, simply use the same syntax used in an XML gauge by prefixing the command with the value (which can itself be another XML variable as shown below):&lt;br /&gt;
&lt;br /&gt;
 execute_calculator_code(&amp;quot;(A:Plane heading degrees gyro,degrees) (&amp;gt;K:HEADING_BUG_SET)&amp;quot;, NULL, NULL, NULL);&lt;br /&gt;
&lt;br /&gt;
To set an L:variable, use this syntax:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Constant:&#039;&#039;&lt;br /&gt;
 execute_calculator_code(&amp;quot; 120 (&amp;gt;L:CustomXMLvar,enum)&amp;quot;,NULL,NULL,NULL);&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;C Variable:&#039;&#039;&lt;br /&gt;
 char cTemp[200];&lt;br /&gt;
 SINT32 temp_val=myCvalue;&lt;br /&gt;
 sprintf_s(cTemp,&amp;quot;temp_val (&amp;gt;L:L:CustomXMLvar,enum)&amp;quot;);&lt;br /&gt;
 PCSTRINGZ szSetValue = cTemp;&lt;br /&gt;
 execute_calculator_code(szSetValue,NULL,NULL,NULL);&lt;br /&gt;
&lt;br /&gt;
[[Category:Aircraft Design]]&lt;br /&gt;
[[Category:Panel and Gauge Design]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=XML:_Increment_Variable_w/Modulo_Reset&amp;diff=8489</id>
		<title>XML: Increment Variable w/Modulo Reset</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=XML:_Increment_Variable_w/Modulo_Reset&amp;diff=8489"/>
		<updated>2012-06-29T15:58:51Z</updated>

		<summary type="html">&lt;p&gt;N4gix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==XML: Increment Variable w/Modulo Reset==&lt;br /&gt;
&lt;br /&gt;
{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = true&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| XP10 = false &lt;br /&gt;
| XP9 = false &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The following script shows how to increment the custom (L:Variable,unit) value by 1 on each &amp;quot;click&amp;quot;. The number preceeding the modulo operator (%) is the reset point (highcount + 1), at which point the variable will reset back to zero!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE: this technique works for integers only. Fractional increment/decrement should use other methods.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 0 + click = 1; 1 mod 5 = 1&lt;br /&gt;
 1 + click = 2; 2 mod 5 = 2&lt;br /&gt;
 2 + click = 3; 3 mod 5 = 3&lt;br /&gt;
 3 + click = 4; 4 mod 5 = 4&lt;br /&gt;
 4 + click = 5; 5 mod 5 = 0&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;MouseRect&amp;gt;&lt;br /&gt;
      &amp;lt;Cursor&amp;gt;Hand&amp;lt;/Cursor&amp;gt;&lt;br /&gt;
      &amp;lt;TooltipText&amp;gt;Window Left&amp;lt;/TooltipText&amp;gt;&lt;br /&gt;
      &amp;lt;CallbackCode&amp;gt;&lt;br /&gt;
        (L:SwitchWindowLeft, enum) ++ 5 % (&amp;gt;L:SwitchWindowLeft, enum)&lt;br /&gt;
      &amp;lt;/CallbackCode&amp;gt;&lt;br /&gt;
    &amp;lt;/MouseRect&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Aircraft Design]]&lt;br /&gt;
[[Category:Panel and Gauge Design]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=XML:_Increment_Variable_w/Modulo_Reset&amp;diff=8488</id>
		<title>XML: Increment Variable w/Modulo Reset</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=XML:_Increment_Variable_w/Modulo_Reset&amp;diff=8488"/>
		<updated>2012-06-29T15:57:00Z</updated>

		<summary type="html">&lt;p&gt;N4gix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==XML: Increment Variable w/Modulo Reset==&lt;br /&gt;
&lt;br /&gt;
{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = true&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| XP10 = false &lt;br /&gt;
| XP9 = false &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The following script shows how to increment the custom (L:Variable,unit) value by 1 on each &amp;quot;click&amp;quot;. The number preceeding the modulo operator (%) is the upper limit, at which point the variable will reset back to zero!&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;NOTE: this technique works for integers only. Fractional increment/decrement should use other methods.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 0 + click = 1; 1 mod 5 = 1&lt;br /&gt;
 1 + click = 2; 2 mod 5 = 2&lt;br /&gt;
 2 + click = 3; 3 mod 5 = 3&lt;br /&gt;
 3 + click = 4; 4 mod 5 = 4&lt;br /&gt;
 4 + click = 5; 5 mod 5 = 0&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;MouseRect&amp;gt;&lt;br /&gt;
      &amp;lt;Cursor&amp;gt;Hand&amp;lt;/Cursor&amp;gt;&lt;br /&gt;
      &amp;lt;TooltipText&amp;gt;Window Left&amp;lt;/TooltipText&amp;gt;&lt;br /&gt;
      &amp;lt;CallbackCode&amp;gt;&lt;br /&gt;
        (L:SwitchWindowLeft, enum) ++ 5 % (&amp;gt;L:SwitchWindowLeft, enum)&lt;br /&gt;
      &amp;lt;/CallbackCode&amp;gt;&lt;br /&gt;
    &amp;lt;/MouseRect&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Aircraft Design]]&lt;br /&gt;
[[Category:Panel and Gauge Design]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=XML:_Increment_Variable_w/Modulo_Reset&amp;diff=8487</id>
		<title>XML: Increment Variable w/Modulo Reset</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=XML:_Increment_Variable_w/Modulo_Reset&amp;diff=8487"/>
		<updated>2012-06-28T23:01:04Z</updated>

		<summary type="html">&lt;p&gt;N4gix: New page: ==XML: Increment Variable w/Modulo Reset==  {{Infobox-Applicable-FSVersion | FSXA = true | FSX = true | FS2004 = true | FS2002 = false | XP10 = false  | XP9 = false  }}  The following scri...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==XML: Increment Variable w/Modulo Reset==&lt;br /&gt;
&lt;br /&gt;
{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = true&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| XP10 = false &lt;br /&gt;
| XP9 = false &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The following script shows how to increment the custom (L:Variable,unit) value by 1 on each &amp;quot;click&amp;quot;. The number preceeding the modulo operator (%) is the upper limit, at which point the variable will reset back to zero!&lt;br /&gt;
&lt;br /&gt;
 0 + click = 1; 1 mod 5 = 1&lt;br /&gt;
 1 + click = 2; 2 mod 5 = 2&lt;br /&gt;
 2 + click = 3; 3 mod 5 = 3&lt;br /&gt;
 3 + click = 4; 4 mod 5 = 4&lt;br /&gt;
 4 + click = 5; 5 mod 5 = 0&lt;br /&gt;
&lt;br /&gt;
    &amp;lt;MouseRect&amp;gt;&lt;br /&gt;
      &amp;lt;Cursor&amp;gt;Hand&amp;lt;/Cursor&amp;gt;&lt;br /&gt;
      &amp;lt;TooltipText&amp;gt;Window Left&amp;lt;/TooltipText&amp;gt;&lt;br /&gt;
      &amp;lt;CallbackCode&amp;gt;&lt;br /&gt;
        (L:SwitchWindowLeft, enum) ++ 5 % (&amp;gt;L:SwitchWindowLeft, enum)&lt;br /&gt;
      &amp;lt;/CallbackCode&amp;gt;&lt;br /&gt;
    &amp;lt;/MouseRect&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Aircraft Design]]&lt;br /&gt;
[[Category:Panel and Gauge Design]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=C:_Decimal_to_BCD&amp;diff=8486</id>
		<title>C: Decimal to BCD</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=C:_Decimal_to_BCD&amp;diff=8486"/>
		<updated>2012-06-13T14:43:22Z</updated>

		<summary type="html">&lt;p&gt;N4gix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = true&lt;br /&gt;
| FS2002 = true&lt;br /&gt;
| FS2000 = true&lt;br /&gt;
| FS98 = true&lt;br /&gt;
}}&lt;br /&gt;
== C: BCD to Decimal and Decimal to BCD ==&lt;br /&gt;
&lt;br /&gt;
This scheme was supplied by Arne Bartels which allows BCD conversion in both directions. Add the following to the master source file:-&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;math.h&amp;gt;&lt;br /&gt;
 #define Bcd2Dec(BcdNum) HornerScheme(BcdNum,0x10,10)&lt;br /&gt;
 #define Dec2Bcd(DecNum) HornerScheme(DecNum,10,0x10)&lt;br /&gt;
 &lt;br /&gt;
 UINT32 HornerScheme(UINT32 Num,UINT32 Divider,UINT32 Factor)&lt;br /&gt;
 {&lt;br /&gt;
    UINT32 Remainder=0,Quotient=0,Result=0;&lt;br /&gt;
    Remainder=Num%Divider;&lt;br /&gt;
    Quotient=Num/Divider;&lt;br /&gt;
    if(!(Quotient==0&amp;amp;&amp;amp;Remainder==0))&lt;br /&gt;
    Result+=HornerScheme(Quotient,Divider,Factor)*Factor+Remainder;&lt;br /&gt;
    return Result;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Then for each sub-gauge that requires a BCD conversion use the following syntax:-&lt;br /&gt;
&lt;br /&gt;
 Bcd2Dec(bcd_number) for BCD to decimal and&lt;br /&gt;
 Dec2Bcd(dec_number) for decimal to BCD conversions.&lt;br /&gt;
&lt;br /&gt;
[[Category:Aircraft Design]]&lt;br /&gt;
[[Category:Panel and Gauge Design]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=C:_Decimal_to_BCD&amp;diff=8485</id>
		<title>C: Decimal to BCD</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=C:_Decimal_to_BCD&amp;diff=8485"/>
		<updated>2012-06-13T14:42:30Z</updated>

		<summary type="html">&lt;p&gt;N4gix: New page: {{Infobox-Applicable-FSVersion | FSXI = false | FSXA = true | FSX = true | FS2004 = true | FS2002 = false | FS2000 = unknown | FS98 = unknown }} == C: BCD to Decimal and Decimal to BCD == ...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = true&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| FS2000 = unknown&lt;br /&gt;
| FS98 = unknown&lt;br /&gt;
}}&lt;br /&gt;
== C: BCD to Decimal and Decimal to BCD ==&lt;br /&gt;
&lt;br /&gt;
This scheme was supplied by Arne Bartels which allows BCD conversion in both directions. Add the following to the master source file:-&lt;br /&gt;
&lt;br /&gt;
 #include &amp;lt;math.h&amp;gt;&lt;br /&gt;
 #define Bcd2Dec(BcdNum) HornerScheme(BcdNum,0x10,10)&lt;br /&gt;
 #define Dec2Bcd(DecNum) HornerScheme(DecNum,10,0x10)&lt;br /&gt;
 &lt;br /&gt;
 UINT32 HornerScheme(UINT32 Num,UINT32 Divider,UINT32 Factor)&lt;br /&gt;
 {&lt;br /&gt;
    UINT32 Remainder=0,Quotient=0,Result=0;&lt;br /&gt;
    Remainder=Num%Divider;&lt;br /&gt;
    Quotient=Num/Divider;&lt;br /&gt;
    if(!(Quotient==0&amp;amp;&amp;amp;Remainder==0))&lt;br /&gt;
    Result+=HornerScheme(Quotient,Divider,Factor)*Factor+Remainder;&lt;br /&gt;
    return Result;&lt;br /&gt;
 }&lt;br /&gt;
&lt;br /&gt;
Then for each sub-gauge that requires a BCD conversion use the following syntax:-&lt;br /&gt;
&lt;br /&gt;
 Bcd2Dec(bcd_number) for BCD to decimal and&lt;br /&gt;
 Dec2Bcd(dec_number) for decimal to BCD conversions.&lt;br /&gt;
&lt;br /&gt;
[[Category:Aircraft Design]]&lt;br /&gt;
[[Category:Panel and Gauge Design]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=XML:_Set_ADF_Frequency&amp;diff=8329</id>
		<title>XML: Set ADF Frequency</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=XML:_Set_ADF_Frequency&amp;diff=8329"/>
		<updated>2012-04-20T17:31:10Z</updated>

		<summary type="html">&lt;p&gt;N4gix: New page: {{Infobox-Applicable-FSVersion | FSXI = false | FSXA = true | FSX = true | FS2004 = true | FS2002 = false | FS2000 = unknown | FS98 = unknown }}  ==XML: Set ADF Frequency== We need to conv...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = true&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| FS2000 = unknown&lt;br /&gt;
| FS98 = unknown&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==XML: Set ADF Frequency==&lt;br /&gt;
We need to convert the desired ADF Frequency (KHz) to BCD format. This simple @Macro will do the job painlessly for us.&lt;br /&gt;
&lt;br /&gt;
Note the use of lower case L in &#039;&#039;&#039;l0&#039;&#039;&#039; and &#039;&#039;&#039;l2&#039;&#039;&#039;, this is [[not]] a number 1:&lt;br /&gt;
&lt;br /&gt;
e.g., s2 &#039;&#039;&#039;[[l]]&#039;&#039;&#039;0 10 / flr 10 % 16 * &#039;&#039;&#039;[[l]]&#039;&#039;&#039;2 +&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;SetADF&amp;quot;&amp;gt;&lt;br /&gt;
        (* UPDATE ADF FREQUENCY *)&lt;br /&gt;
        10000 * s0 10 %&lt;br /&gt;
        s2 l0 10 / flr 10 % 16 * l2 +&lt;br /&gt;
        s2 l0 100 / flr 10 % 256 * l2 +&lt;br /&gt;
        s2 l0 1000 / flr 10 % 4096 * l2 +&lt;br /&gt;
        s2 l0 10000 / flr 10 % 65536 * l2 +&lt;br /&gt;
        s2 l0 100000 / flr 10 % 1048576 * l2 +&lt;br /&gt;
        s2 l0 1000000 / flr 10 % 16777216 * l2 +&lt;br /&gt;
        s2 l0 10000000 / flr 10 % 268435456 * l2 +&lt;br /&gt;
        s2 (&amp;gt;K:ADF_COMPLETE_SET)&lt;br /&gt;
 &amp;lt;/Macro&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Usage: &lt;br /&gt;
 @SetADF((L:ADF1 Frequency,Khz))&lt;br /&gt;
&lt;br /&gt;
[[category:Aircraft Design]]&lt;br /&gt;
[[category:Panel and Gauge Design]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=XML:_Decode_Flags&amp;diff=8328</id>
		<title>XML: Decode Flags</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=XML:_Decode_Flags&amp;diff=8328"/>
		<updated>2012-04-20T15:47:27Z</updated>

		<summary type="html">&lt;p&gt;N4gix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = true&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| FS2000 = unknown&lt;br /&gt;
| FS98 = unknown&lt;br /&gt;
}}&lt;br /&gt;
== XML Decode Macros ==&lt;br /&gt;
&lt;br /&gt;
There are several XML variables that are returned as &amp;quot;flags&amp;quot; in an 8bit format. In order to use them you must &amp;quot;decode&amp;quot; them. This is an easy method to use as all the script is encapsulated in a set of &amp;lt;Macro&amp;gt;s for quick and simple use. Just copy/paste these &amp;lt;Macro&amp;gt; definitions to your XML gauge script.&lt;br /&gt;
&lt;br /&gt;
Examples of usage are at the bottom of this entry.&lt;br /&gt;
&lt;br /&gt;
 // DO NOT COPY THIS! It is for reference only //&lt;br /&gt;
 128 BIT7: 0 = VOR  1= Localizer  &lt;br /&gt;
 64  BIT6: 1 = glideslope available  &lt;br /&gt;
 32  BIT5: 1 = no localizer backcourse  &lt;br /&gt;
 16  BIT4: 1 = DME transmitter at glide slope transmitter  &lt;br /&gt;
 8   BIT3: 1 = no nav signal available  &lt;br /&gt;
 4   BIT2: 1 = voice available  &lt;br /&gt;
 2   BIT1: 1 = TACAN available  &lt;br /&gt;
 1   BIT0: 1 = DME available&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MACRO Definitions for the NAV CODES variable&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;IsVor&amp;quot;&amp;gt;(A:NAV CODES:1, flags) 128 &amp;amp;#38;&amp;amp;#97;&amp;amp;#109;&amp;amp;#112;&amp;amp;#59; 128 !=&amp;lt;/Macro&amp;gt;&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;IsLoc&amp;quot;&amp;gt;(A:NAV CODES:1, flags) 128 &amp;amp;#38;&amp;amp;#97;&amp;amp;#109;&amp;amp;#112;&amp;amp;#59; 128 ==&amp;lt;/Macro&amp;gt;&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;HasGS&amp;quot;&amp;gt;(A:NAV CODES:1, flags) 64 &amp;amp;#38;&amp;amp;#97;&amp;amp;#109;&amp;amp;#112;&amp;amp;#59; 64 ==&amp;lt;/Macro&amp;gt;&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;HasBCGS&amp;quot;&amp;gt;(A:NAV CODES:1, flags) 32 &amp;amp;#38;&amp;amp;#97;&amp;amp;#109;&amp;amp;#112;&amp;amp;#59; 32 !=&amp;lt;/Macro&amp;gt;&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;HasDMEatGS&amp;quot;&amp;gt;(A:NAV CODES:1, flags) 16 &amp;amp;#38;&amp;amp;#97;&amp;amp;#109;&amp;amp;#112;&amp;amp;#59; 16 ==&amp;lt;/Macro&amp;gt;&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;HasNAVsignal&amp;quot;&amp;gt;(A:NAV CODES:1, flags) 8 &amp;amp;#38;&amp;amp;#97;&amp;amp;#109;&amp;amp;#112;&amp;amp;#59; 8 !=&amp;lt;/Macro&amp;gt;&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;HasVoice&amp;quot;&amp;gt;(A:NAV CODES:1, flags) 4 &amp;amp;#38;&amp;amp;#97;&amp;amp;#109;&amp;amp;#112;&amp;amp;#59; 4 ==&amp;lt;/Macro&amp;gt;&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;IsTacan&amp;quot;&amp;gt;(A:NAV CODES:1, flags) 2 &amp;amp;#38;&amp;amp;#97;&amp;amp;#109;&amp;amp;#112;&amp;amp;#59; 2 ==&amp;lt;/Macro&amp;gt;&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;HasDME&amp;quot;&amp;gt;(A:NAV CODES:1, flags) 1 &amp;amp;#38;&amp;amp;#97;&amp;amp;#109;&amp;amp;#112;&amp;amp;#59; 1 ==&amp;lt;/Macro&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 // DO NOT COPY THIS! It is for reference only //&lt;br /&gt;
 1   BIT0: 1 = back course available&lt;br /&gt;
 2   BIT1: 1 = localizer tuned in&lt;br /&gt;
 4   BIT2: 1 = on course&lt;br /&gt;
 128 BIT7: 1 = station active&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MACRO Definitions for the NAV BACK COURSE FLAGS variable&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;IsBCavailable&amp;quot;&amp;gt;(A:NAV BACK COURSE FLAGS:1, flags) 1 &amp;amp;#38;&amp;amp;#97;&amp;amp;#109;&amp;amp;#112;&amp;amp;#59; 1 ==&amp;lt;/Macro&amp;gt;&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;IsLocalizerTuned&amp;quot;&amp;gt;(A:NAV BACK COURSE FLAGS:1, flags) 2 &amp;amp;#38;&amp;amp;#97;&amp;amp;#109;&amp;amp;#112;&amp;amp;#59; 2 ==&amp;lt;/Macro&amp;gt;&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;IsOnCourse&amp;quot;&amp;gt;(A:NAV BACK COURSE FLAGS:1, flags) 4 &amp;amp;#38;&amp;amp;#97;&amp;amp;#109;&amp;amp;#112;&amp;amp;#59; 4 ==&amp;lt;/Macro&amp;gt;&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;IsStationActive&amp;quot;&amp;gt;(A:NAV BACK COURSE FLAGS:1, flags) 128 &amp;amp;#38;&amp;amp;#97;&amp;amp;#109;&amp;amp;#112;&amp;amp;#59; 128 ==&amp;lt;/Macro&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Aircraft Design]]&lt;br /&gt;
[[Category:Panel and Gauge Design]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=XML:_Decimal_To_BCD_Macro_-_Set_Nav/Com_Freq&amp;diff=8324</id>
		<title>XML: Decimal To BCD Macro - Set Nav/Com Freq</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=XML:_Decimal_To_BCD_Macro_-_Set_Nav/Com_Freq&amp;diff=8324"/>
		<updated>2012-04-19T17:28:36Z</updated>

		<summary type="html">&lt;p&gt;N4gix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = true&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| FS2000 = unknown&lt;br /&gt;
| FS98 = unknown&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==XML:Decimal to BCD Macro==&lt;br /&gt;
&lt;br /&gt;
A very simple but useful @macro to convert any decimal frequency to BCD format to allow direct SETting of COM and NAV frequencies in FS:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;Dec2Bcd&amp;quot;&amp;gt;&lt;br /&gt;
   100 * 10000 % int&lt;br /&gt;
   d 10 % r 10 / int&lt;br /&gt;
   d 10 % r 10 / int&lt;br /&gt;
   d 10 % r 10 / int&lt;br /&gt;
   16 * +&lt;br /&gt;
   16 * +&lt;br /&gt;
   16 * +&lt;br /&gt;
 &amp;lt;/Macro&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Usage is then as simple as passing the decimal frequency to the @macro the issuing the appropriate _SET key event:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Click&amp;gt;&lt;br /&gt;
     @Dec2Bcd(112.30) (&amp;gt;K:NAV2_RADIO_SET)&lt;br /&gt;
 &amp;lt;/Click&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You could also use a custom L:var to pass a &amp;quot;tuned&amp;quot; frequency:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Click&amp;gt;&lt;br /&gt;
@XPDRSet((L:XPDR_Code,number)) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
     @Dec2Bcd((L:Nav2Freq,enum)) (&amp;gt;K:NAV2_RADIO_SET)&lt;br /&gt;
 &amp;lt;/Click&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Aircraft Design]]&lt;br /&gt;
[[Category:Panel and Gauge Design]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=XML:_Decimal_To_BCD_Macro_-_Set_Nav/Com_Freq&amp;diff=8323</id>
		<title>XML: Decimal To BCD Macro - Set Nav/Com Freq</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=XML:_Decimal_To_BCD_Macro_-_Set_Nav/Com_Freq&amp;diff=8323"/>
		<updated>2012-04-19T17:21:46Z</updated>

		<summary type="html">&lt;p&gt;N4gix: New page: {{Infobox-Applicable-FSVersion | FSXI = false | FSXA = true | FSX = true | FS2004 = true | FS2002 = false | FS2000 = unknown | FS98 = unknown }}  ==XML:Decimal to BCD Macro==  A very simpl...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = true&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| FS2000 = unknown&lt;br /&gt;
| FS98 = unknown&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==XML:Decimal to BCD Macro==&lt;br /&gt;
&lt;br /&gt;
A very simple but useful @macro to convert any decimal frequency to BCD format to allow direct SETting of COM and NAV frequencies in FS:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;Dec2Bcd&amp;quot;&amp;gt;&lt;br /&gt;
   100 * 10000 % int&lt;br /&gt;
   d 10 % r 10 / int&lt;br /&gt;
   d 10 % r 10 / int&lt;br /&gt;
   d 10 % r 10 / int&lt;br /&gt;
   16 * +&lt;br /&gt;
   16 * +&lt;br /&gt;
   16 * +&lt;br /&gt;
 &amp;lt;/Macro&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Usage is then as simple as passing the decimal frequency to the @macro the issuing the appropriate _SET key event:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Click&amp;gt;&lt;br /&gt;
     112.30 @Dec2Bcd (&amp;gt;K:NAV2_RADIO_SET)&lt;br /&gt;
 &amp;lt;/Click&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You could also use a custom L:var to pass a &amp;quot;tuned&amp;quot; frequency:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Click&amp;gt;&lt;br /&gt;
     (L:Nav2Freq,enum) @Dec2Bcd (&amp;gt;K:NAV2_RADIO_SET)&lt;br /&gt;
 &amp;lt;/Click&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Aircraft Design]]&lt;br /&gt;
[[Category:Panel and Gauge Design]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=XML:_Decode_Flags&amp;diff=8322</id>
		<title>XML: Decode Flags</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=XML:_Decode_Flags&amp;diff=8322"/>
		<updated>2012-04-19T16:22:12Z</updated>

		<summary type="html">&lt;p&gt;N4gix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = true&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| FS2000 = unknown&lt;br /&gt;
| FS98 = unknown&lt;br /&gt;
}}&lt;br /&gt;
== XML Decode Macros ==&lt;br /&gt;
&lt;br /&gt;
There are several XML variables that are returned as &amp;quot;flags&amp;quot; in an 8bit format. In order to use them you must &amp;quot;decode&amp;quot; them. This is an easy method to use as all the script is encapsulated in a set of &amp;lt;Macro&amp;gt;s for quick and simple use. Just copy/paste these &amp;lt;Macro&amp;gt; definitions to your XML gauge script.&lt;br /&gt;
&lt;br /&gt;
Examples of usage are at the bottom of this entry.&lt;br /&gt;
&lt;br /&gt;
 // DO NOT COPY THIS! It is for reference only //&lt;br /&gt;
 128 BIT7: 0= VOR  1= Localizer  &lt;br /&gt;
 64  BIT6: 1= glideslope available  &lt;br /&gt;
 32  BIT5: 1= no localizer backcourse  &lt;br /&gt;
 16  BIT4: 1= DME transmitter at glide slope transmitter  &lt;br /&gt;
 8   BIT3: 1= no nav signal available  &lt;br /&gt;
 4   BIT2: 1= voice available  &lt;br /&gt;
 2   BIT1: 1 = TACAN available  &lt;br /&gt;
 1   BIT0: 1= DME available&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MACRO Definitions for the NAV CODES variable&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;IsVor&amp;quot;&amp;gt;(A:NAV CODES:1, flags) 128 and !&amp;lt;/Macro&amp;gt;&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;IsLoc&amp;quot;&amp;gt;(A:NAV CODES:1, flags) 128 and&amp;lt;/Macro&amp;gt;&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;HasGS&amp;quot;&amp;gt;(A:NAV CODES:1, flags) 64 and&amp;lt;/Macro&amp;gt;&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;HasBCGS&amp;quot;&amp;gt;(A:NAV CODES:1, flags) 32 and !&amp;lt;/Macro&amp;gt;&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;HasDMEatGS&amp;quot;&amp;gt;(A:NAV CODES:1, flags) 16 and&amp;lt;/Macro&amp;gt;&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;HasNAVsignal&amp;quot;&amp;gt;(A:NAV CODES:1, flags) 8 and !&amp;lt;/Macro&amp;gt;&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;HasVoice&amp;quot;&amp;gt;(A:NAV CODES:1, flags) 4 and&amp;lt;/Macro&amp;gt;&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;IsTacan&amp;quot;&amp;gt;(A:NAV CODES:1, flags) 2 and&amp;lt;/Macro&amp;gt;&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;HasDME&amp;quot;&amp;gt;(A:NAV CODES:1, flags) 1 and&amp;lt;/Macro&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 // DO NOT COPY THIS! It is for reference only //&lt;br /&gt;
 1   BIT0: 1=back course available&lt;br /&gt;
 2   BIT1: 1=localizer tuned in&lt;br /&gt;
 4   BIT2: 1=on course&lt;br /&gt;
 128 BIT7: 1=station active&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;MACRO Definitions for the NAV BACK COURSE FLAGS variable&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;IsBCavailable&amp;quot;&amp;gt;(A:NAV BACK COURSE FLAGS:1, flags) 1 and&amp;lt;/Macro&amp;gt;&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;IsLocalizerTuned&amp;quot;&amp;gt;(A:NAV BACK COURSE FLAGS:1, flags) 2 and&amp;lt;/Macro&amp;gt;&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;IsOnCourse&amp;quot;&amp;gt;(A:NAV BACK COURSE FLAGS:1, flags) 4 and&amp;lt;/Macro&amp;gt;&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;IsStationActive&amp;quot;&amp;gt;(A:NAV BACK COURSE FLAGS:1, flags) 128 and&amp;lt;/Macro&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Aircraft Design]]&lt;br /&gt;
[[Category:Panel and Gauge Design]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=GaugeSound.dll&amp;diff=8313</id>
		<title>GaugeSound.dll</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=GaugeSound.dll&amp;diff=8313"/>
		<updated>2012-04-06T00:20:40Z</updated>

		<summary type="html">&lt;p&gt;N4gix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = true&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| FS2000 = false&lt;br /&gt;
| FS98 = false&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
If you wish to use the GaugeSound.dll in your gauge(s), the first step is to declare the following in your main gauge (.cpp) file:&lt;br /&gt;
&lt;br /&gt;
 // Sound declarations&lt;br /&gt;
 	typedef VOID (*TGaugePlaySound)(LPTSTR,LPSTR,int);&lt;br /&gt;
 	typedef VOID (*TGaugeStopSound)(LPTSTR);&lt;br /&gt;
 	typedef VOID (*TTerminateSounds)();&lt;br /&gt;
 	TGaugePlaySound GaugePlaySound;&lt;br /&gt;
 	TGaugeStopSound GaugeStopSound;&lt;br /&gt;
 	TTerminateSounds TerminateSounds;&lt;br /&gt;
 	HMODULE MGaugeSound;&lt;br /&gt;
 &lt;br /&gt;
 	// If you need to &amp;quot;loop&amp;quot; some sounds, define the &amp;quot;stop loop string names&amp;quot;&lt;br /&gt;
 	LPSTR flap = &amp;quot;flap&amp;quot;;&lt;br /&gt;
 	LPSTR gearhorn = &amp;quot;gearhorn&amp;quot;;&lt;br /&gt;
 	LPSTR overspeed = &amp;quot;overspeed&amp;quot;;&lt;br /&gt;
 	LPSTR firetest = &amp;quot;firetest&amp;quot;;&lt;br /&gt;
 	LPSTR geartest = &amp;quot;geartest&amp;quot;;&lt;br /&gt;
 	LPSTR speedtest = &amp;quot;speedtest&amp;quot;;&lt;br /&gt;
 	LPSTR warning = &amp;quot;warning&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Next, initialize the following in the PANEL_SERVICE_PRE_INITIALIZE case:&lt;br /&gt;
&lt;br /&gt;
 	case PANEL_SERVICE_PRE_INITIALIZE:&lt;br /&gt;
 		if (MGaugeSound == NULL) {MGaugeSound = LoadLibrary(&amp;quot;GaugeSound&amp;quot;);}&lt;br /&gt;
 		GaugePlaySound = (TGaugePlaySound)GetProcAddress(MGaugeSound,&amp;quot;GaugePlaySound&amp;quot;);&lt;br /&gt;
 		GaugeStopSound = (TGaugeStopSound)GetProcAddress(MGaugeSound,&amp;quot;GaugeStopSound&amp;quot;);&lt;br /&gt;
 		TerminateSounds = (TTerminateSounds)GetProcAddress(MGaugeSound,&amp;quot;TerminateSounds&amp;quot;);&lt;br /&gt;
  	break;&lt;br /&gt;
&lt;br /&gt;
Next, add the following to the PANEL_SERVICE_PRE_UPDATE case:&lt;br /&gt;
&lt;br /&gt;
 	case PANEL_SERVICE_PRE_UPDATE:&lt;br /&gt;
 		MGaugeSound = GetModuleHandle(&amp;quot;GaugeSound&amp;quot;);&lt;br /&gt;
 		if (MGaugeSound == NULL) {MGaugeSound = LoadLibrary(&amp;quot;GaugeSound&amp;quot;);}&lt;br /&gt;
 		GaugePlaySound = (TGaugePlaySound)GetProcAddress(MGaugeSound,&amp;quot;GaugePlaySound&amp;quot;);&lt;br /&gt;
 		GaugeStopSound = (TGaugeStopSound)GetProcAddress(MGaugeSound,&amp;quot;GaugeStopSound&amp;quot;);&lt;br /&gt;
 		TerminateSounds = (TTerminateSounds)GetProcAddress(MGaugeSound,&amp;quot;TerminateSounds&amp;quot;);&lt;br /&gt;
  	break;&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Finally, add this to the PANEL_SERVICE_PRE_KILL case:&lt;br /&gt;
&lt;br /&gt;
 	case PANEL_SERVICE_PRE_KILL:&lt;br /&gt;
 		MGaugeSound = GetModuleHandle(&amp;quot;GaugeSound&amp;quot;);&lt;br /&gt;
 		if (MGaugeSound == NULL) {MGaugeSound = LoadLibrary(&amp;quot;GaugeSound&amp;quot;);}&lt;br /&gt;
 		GaugePlaySound = (TGaugePlaySound)GetProcAddress(MGaugeSound,&amp;quot;GaugePlaySound&amp;quot;);&lt;br /&gt;
 		GaugeStopSound = (TGaugeStopSound)GetProcAddress(MGaugeSound,&amp;quot;GaugeStopSound&amp;quot;);&lt;br /&gt;
 		TerminateSounds = (TTerminateSounds)GetProcAddress(MGaugeSound,&amp;quot;TerminateSounds&amp;quot;);&lt;br /&gt;
 		(TerminateSounds)();&lt;br /&gt;
 		FreeLibrary(MGaugeSound);&lt;br /&gt;
  	break;&lt;br /&gt;
&lt;br /&gt;
To play a sound, use one of the following examples in a mouse callback. Note that &amp;quot;PathName&amp;quot; is the sub-folder name in the default FS ..\Sound folder, e.g., ..\Sound\Milviz. &amp;quot;SoundName&amp;quot; is for example push.wav:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Play once:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
     (GaugePlaySound)(&amp;quot;sound\\PathName\\SoundName.wav&amp;quot;,&amp;quot;&amp;quot;,0) ; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Loop Sound:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Looping a sound continuously require that you specify a &amp;quot;stop loop string name&amp;quot; and set the third parameter to 1 (0 = play once, 1 = loop continuously).&lt;br /&gt;
&lt;br /&gt;
      if ( *rotartest == 2 ) &lt;br /&gt;
           { (GaugePlaySound)(&amp;quot;soundesdggearhorn.wav&amp;quot;,geartest,1) ; } &lt;br /&gt;
      else { (GaugeStopSound)(geartest); }&lt;br /&gt;
&lt;br /&gt;
[[category:Aircraft Design]]&lt;br /&gt;
[[category:Panel and Gauge Design]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=GaugeSound.dll&amp;diff=8312</id>
		<title>GaugeSound.dll</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=GaugeSound.dll&amp;diff=8312"/>
		<updated>2012-04-06T00:19:44Z</updated>

		<summary type="html">&lt;p&gt;N4gix: New page: {{Infobox-Applicable-FSVersion | FSXI = false | FSXA = true | FSX = true | FS2004 = true | FS2002 = false | FS2000 = false | FS98 = false }}  If you wish to use the GaugeSound.dll in your ...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = true&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| FS2000 = false&lt;br /&gt;
| FS98 = false&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
If you wish to use the GaugeSound.dll in your gauge(s), the first step is to declare the following in your main gauge (.cpp) file:&lt;br /&gt;
&lt;br /&gt;
 // Sound declarations&lt;br /&gt;
 	typedef VOID (*TGaugePlaySound)(LPTSTR,LPSTR,int);&lt;br /&gt;
 	typedef VOID (*TGaugeStopSound)(LPTSTR);&lt;br /&gt;
 	typedef VOID (*TTerminateSounds)();&lt;br /&gt;
 	TGaugePlaySound GaugePlaySound;&lt;br /&gt;
 	TGaugeStopSound GaugeStopSound;&lt;br /&gt;
 	TTerminateSounds TerminateSounds;&lt;br /&gt;
 	HMODULE MGaugeSound;&lt;br /&gt;
 &lt;br /&gt;
 	// If you need to &amp;quot;loop&amp;quot; some sounds, define the &amp;quot;stop loop string names&amp;quot;&lt;br /&gt;
 	LPSTR flap = &amp;quot;flap&amp;quot;;&lt;br /&gt;
 	LPSTR gearhorn = &amp;quot;gearhorn&amp;quot;;&lt;br /&gt;
 	LPSTR overspeed = &amp;quot;overspeed&amp;quot;;&lt;br /&gt;
 	LPSTR firetest = &amp;quot;firetest&amp;quot;;&lt;br /&gt;
 	LPSTR geartest = &amp;quot;geartest&amp;quot;;&lt;br /&gt;
 	LPSTR speedtest = &amp;quot;speedtest&amp;quot;;&lt;br /&gt;
 	LPSTR warning = &amp;quot;warning&amp;quot;;&lt;br /&gt;
&lt;br /&gt;
Next, initialize the following in the PANEL_SERVICE_PRE_INITIALIZE case:&lt;br /&gt;
&lt;br /&gt;
 	case PANEL_SERVICE_PRE_INITIALIZE:&lt;br /&gt;
 		rtu1_bg_element = (PELEMENT_STATIC_IMAGE)pgauge-&amp;gt;elements_list[0];&lt;br /&gt;
 		if (MGaugeSound == NULL) {MGaugeSound = LoadLibrary(&amp;quot;GaugeSound&amp;quot;);}&lt;br /&gt;
 		GaugePlaySound = (TGaugePlaySound)GetProcAddress(MGaugeSound,&amp;quot;GaugePlaySound&amp;quot;);&lt;br /&gt;
 		GaugeStopSound = (TGaugeStopSound)GetProcAddress(MGaugeSound,&amp;quot;GaugeStopSound&amp;quot;);&lt;br /&gt;
 		TerminateSounds = (TTerminateSounds)GetProcAddress(MGaugeSound,&amp;quot;TerminateSounds&amp;quot;);&lt;br /&gt;
  	break;&lt;br /&gt;
&lt;br /&gt;
Next, add the following to the PANEL_SERVICE_PRE_UPDATE case:&lt;br /&gt;
&lt;br /&gt;
 	case PANEL_SERVICE_PRE_UPDATE:&lt;br /&gt;
 		MGaugeSound = GetModuleHandle(&amp;quot;GaugeSound&amp;quot;);&lt;br /&gt;
 		if (MGaugeSound == NULL) {MGaugeSound = LoadLibrary(&amp;quot;GaugeSound&amp;quot;);}&lt;br /&gt;
 		GaugePlaySound = (TGaugePlaySound)GetProcAddress(MGaugeSound,&amp;quot;GaugePlaySound&amp;quot;);&lt;br /&gt;
 		GaugeStopSound = (TGaugeStopSound)GetProcAddress(MGaugeSound,&amp;quot;GaugeStopSound&amp;quot;);&lt;br /&gt;
 		TerminateSounds = (TTerminateSounds)GetProcAddress(MGaugeSound,&amp;quot;TerminateSounds&amp;quot;);&lt;br /&gt;
  	break;&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
Finally, add this to the PANEL_SERVICE_PRE_KILL case:&lt;br /&gt;
&lt;br /&gt;
 	case PANEL_SERVICE_PRE_KILL:&lt;br /&gt;
 		MGaugeSound = GetModuleHandle(&amp;quot;GaugeSound&amp;quot;);&lt;br /&gt;
 		if (MGaugeSound == NULL) {MGaugeSound = LoadLibrary(&amp;quot;GaugeSound&amp;quot;);}&lt;br /&gt;
 		GaugePlaySound = (TGaugePlaySound)GetProcAddress(MGaugeSound,&amp;quot;GaugePlaySound&amp;quot;);&lt;br /&gt;
 		GaugeStopSound = (TGaugeStopSound)GetProcAddress(MGaugeSound,&amp;quot;GaugeStopSound&amp;quot;);&lt;br /&gt;
 		TerminateSounds = (TTerminateSounds)GetProcAddress(MGaugeSound,&amp;quot;TerminateSounds&amp;quot;);&lt;br /&gt;
 		(TerminateSounds)();&lt;br /&gt;
 		FreeLibrary(MGaugeSound);&lt;br /&gt;
  	break;&lt;br /&gt;
&lt;br /&gt;
To play a sound, use one of the following examples in a mouse callback. Note that &amp;quot;PathName&amp;quot; is the sub-folder name in the default FS ..\Sound folder, e.g., ..\Sound\Milviz. &amp;quot;SoundName&amp;quot; is for example push.wav:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Play once:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
     (GaugePlaySound)(&amp;quot;sound\\PathName\\SoundName.wav&amp;quot;,&amp;quot;&amp;quot;,0) ; &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Loop Sound:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Looping a sound continuously require that you specify a &amp;quot;stop loop string name&amp;quot; and set the third parameter to 1 (0 = play once, 1 = loop continuously).&lt;br /&gt;
&lt;br /&gt;
      if ( *rotartest == 2 ) &lt;br /&gt;
           { (GaugePlaySound)(&amp;quot;soundesdggearhorn.wav&amp;quot;,geartest,1) ; } &lt;br /&gt;
      else { (GaugeStopSound)(geartest); }&lt;br /&gt;
&lt;br /&gt;
[[category:Aircraft Design]]&lt;br /&gt;
[[category:Panel and Gauge Design]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=XML:_Macros_-_Set_Xpndr_Code&amp;diff=8205</id>
		<title>XML: Macros - Set Xpndr Code</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=XML:_Macros_-_Set_Xpndr_Code&amp;diff=8205"/>
		<updated>2011-09-14T20:40:45Z</updated>

		<summary type="html">&lt;p&gt;N4gix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = false&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| FS2000 = false&lt;br /&gt;
| FS98 = false&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;== Transponder Set Macro ==&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Macro id=&amp;quot;XPDR Set&amp;quot; Name=&amp;quot;XPDRSet&amp;quot;&amp;gt;&lt;br /&gt;
   &amp;lt;MacroValue&amp;gt;&lt;br /&gt;
      @1 s0 10 % l0 10 /&lt;br /&gt;
      int 10 % 16 * + l0 100 /&lt;br /&gt;
      int 10 % 256 * + l0 1000 /&lt;br /&gt;
      int 4096 * + (&amp;amp;gt;K:XPNDR_SET) &lt;br /&gt;
   &amp;lt;/MacroValue&amp;gt;&lt;br /&gt;
 &amp;lt;/Macro&amp;gt;&lt;br /&gt;
&lt;br /&gt;
@XPDRSet(1200)&lt;br /&gt;
&lt;br /&gt;
@XPDRSet((L:XPDR_Code,number))&lt;br /&gt;
&lt;br /&gt;
[[category:Aircraft Design]]&lt;br /&gt;
[[category:Panel and Gauge Design]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=XML:_Displaying_only_part_of_a_string_-_ssub&amp;diff=8194</id>
		<title>XML: Displaying only part of a string - ssub</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=XML:_Displaying_only_part_of_a_string_-_ssub&amp;diff=8194"/>
		<updated>2011-09-04T16:40:05Z</updated>

		<summary type="html">&lt;p&gt;N4gix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = true&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| FS2000 = false&lt;br /&gt;
| FS98 = false&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== XML: Displaying only part of a string ==&lt;br /&gt;
&lt;br /&gt;
Thanks go to Paul EGLD (AVSIM Forum,18 March 2011) for pointing out this undocumented capability of the &#039;&#039;&#039;ssub&#039;&#039;&#039; string operator:&lt;br /&gt;
&lt;br /&gt;
 &#039;ABCDEFGHIJK&#039; 0 4 ssub &lt;br /&gt;
extracts characters 0 through 4 of the string.  So,&lt;br /&gt;
&lt;br /&gt;
 &#039;ABCDEFGHIJK&#039; 0 4 ssub &lt;br /&gt;
results in &#039;ABCDE&#039;, and&lt;br /&gt;
 &#039;ABCDEFGHIJK&#039; 3 6 ssub &lt;br /&gt;
results in &#039;DEFG&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This compliments the SDK which states only&lt;br /&gt;
&lt;br /&gt;
 &#039;ab&#039; &#039;abcde&#039; ssub &lt;br /&gt;
&lt;br /&gt;
results in &#039;cde&#039;&lt;br /&gt;
[[Category:Aircraft Design]]&lt;br /&gt;
[[Category:Panel and Gauge Design]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=XML:_Loop_Using_a_Goto&amp;diff=8167</id>
		<title>XML: Loop Using a Goto</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=XML:_Loop_Using_a_Goto&amp;diff=8167"/>
		<updated>2011-09-02T17:35:40Z</updated>

		<summary type="html">&lt;p&gt;N4gix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = true&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| XP10 = false &lt;br /&gt;
| XP9 = false &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==XML: Loop Using a Goto==&lt;br /&gt;
&lt;br /&gt;
A Loop can be easy simulated using a [[g]] (goto) command which uses :&#039;&#039;number_label&#039;&#039; for its target:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Update&amp;gt;&lt;br /&gt;
   100 sp0 (* initialize, reg.0 = loop counter, 100 cycles *)&lt;br /&gt;
   :12345 (* loop label *)&lt;br /&gt;
 &lt;br /&gt;
 	(* do something *)&lt;br /&gt;
 	&lt;br /&gt;
   l0 -- s0 0 &amp;gt; if{ g12345 } (* next *)&lt;br /&gt;
 &amp;lt;/Update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An alternative to using the stack pointer operators (and makes the script more clear!) is this form:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Update&amp;gt;&lt;br /&gt;
    100 (&amp;gt;L:LoopCounter,enum) (* initialize the counter&#039;s stack, 100 cycles *)&lt;br /&gt;
    :12345 (* loop label *)&lt;br /&gt;
 &lt;br /&gt;
 	(* do something *)&lt;br /&gt;
 &lt;br /&gt;
    (L:LoopCounter,enum) 1 - (&amp;gt;L:LoopCounter,enum)	(* decrement -1 *)&lt;br /&gt;
    (L:LoopCounter,enum) 0 &amp;gt; if{ g12345 } (* next *)&lt;br /&gt;
 &amp;lt;/Update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
 1. loop label can be any unique number&lt;br /&gt;
 2. This &amp;quot;loop&amp;quot; will execute completely on [[every]] gauge cycle (18Hz), so you may wish to &amp;quot;slow it down&amp;quot; by using a master timer.&lt;br /&gt;
--[[User:N4gix|N4gix]] 13:35, 2 September 2011 (EDT)&lt;br /&gt;
[[Category:Aircraft Design]]&lt;br /&gt;
[[Category:Panel and Gauge Design]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=XML:_Loop_Using_a_Goto&amp;diff=8166</id>
		<title>XML: Loop Using a Goto</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=XML:_Loop_Using_a_Goto&amp;diff=8166"/>
		<updated>2011-09-02T17:33:40Z</updated>

		<summary type="html">&lt;p&gt;N4gix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = true&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| XP10 = false &lt;br /&gt;
| XP9 = false &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==XML: Loop Using a Goto==&lt;br /&gt;
&lt;br /&gt;
A Loop can be easy simulated using a [[g]] (goto) command which uses :&#039;&#039;number_label&#039;&#039; for its target:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Update&amp;gt;&lt;br /&gt;
   100 sp0 (* initialize, reg.0 = loop counter, 100 cycles *)&lt;br /&gt;
   :12345 (* loop label *)&lt;br /&gt;
 &lt;br /&gt;
 	(* do something *)&lt;br /&gt;
 	&lt;br /&gt;
   l0 -- s0 0 &amp;gt; if{ g12345 } (* next *)&lt;br /&gt;
 &amp;lt;/Update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An alternative to using the stack pointer operators (and makes the script more clear!) is this form:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Update&amp;gt;&lt;br /&gt;
    100 (&amp;gt;L:LoopCounter,enum) (* initialize the counter&#039;s stack, 100 cycles *)&lt;br /&gt;
    :12345 (* loop label *)&lt;br /&gt;
 &lt;br /&gt;
 	(* do something *)&lt;br /&gt;
 &lt;br /&gt;
    (L:LoopCounter,enum) 1 - (&amp;gt;L:LoopCounter,enum)	(* decrement -1 *)&lt;br /&gt;
    (L:LoopCounter,enum) 0 &amp;gt; if{ g12345 } (* next *)&lt;br /&gt;
 &amp;lt;/Update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
 1. loop label can be any unique number&lt;br /&gt;
 2. This &amp;quot;loop&amp;quot; will execute completely on [[every]] gauge cycle (18Hz), so you may wish to &amp;quot;slow it down&amp;quot; by using a master timer.&lt;br /&gt;
[[Category:Aircraft Design]]&lt;br /&gt;
[[Category:Panel and Gauge Design]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=XML:_Loop_Using_a_Goto&amp;diff=8165</id>
		<title>XML: Loop Using a Goto</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=XML:_Loop_Using_a_Goto&amp;diff=8165"/>
		<updated>2011-09-02T17:29:19Z</updated>

		<summary type="html">&lt;p&gt;N4gix: New page: {{Infobox-Applicable-FSVersion | FSXI = false | FSXA = true | FSX = true | FS2004 = true | FS2002 = false | XP10 = false  | XP9 = false  }}  ==XML: Loop Using a Goto==  A Loop can be easy ...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = true&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| XP10 = false &lt;br /&gt;
| XP9 = false &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==XML: Loop Using a Goto==&lt;br /&gt;
&lt;br /&gt;
A Loop can be easy simulated using a g (goto) command which uses :&#039;&#039;number_label&#039;&#039; for its target:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Update&amp;gt;&lt;br /&gt;
   100 sp0 (* initialize, reg.0 = loop counter, 100 cycles *)&lt;br /&gt;
   :12345 (* loop label *)&lt;br /&gt;
 &lt;br /&gt;
 	(* do something *)&lt;br /&gt;
 	&lt;br /&gt;
   l0 -- s0 0 &amp;gt; if{ g12345 } (* next *)&lt;br /&gt;
 &amp;lt;/Update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
An alternative to using the stack pointer operators (and makes the script more clear!) is this form:&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Update&amp;gt;&lt;br /&gt;
    100 (&amp;gt;L:LoopCounter,enum) (* initialize the counter&#039;s stack, 100 cycles *)&lt;br /&gt;
    :12345 (* loop label *)&lt;br /&gt;
 &lt;br /&gt;
 	(* do something *)&lt;br /&gt;
 &lt;br /&gt;
    (L:LoopCounter,enum) 1 - (&amp;gt;L:LoopCounter,enum)	(* decrement -1 *)&lt;br /&gt;
    (L:LoopCounter,enum) 0 &amp;gt; if{ g12345 } (* next *)&lt;br /&gt;
 &amp;lt;/Update&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Notes:&lt;br /&gt;
 1. loop label can be any unique number&lt;br /&gt;
 2. This &amp;quot;loop&amp;quot; will execute completely on [[every]] gauge cycle (18Hz), so you may wish to &amp;quot;slow it down&amp;quot; by using a master timer.&lt;br /&gt;
[[Category:Aircraft Design]]&lt;br /&gt;
[[Category:Panel and Gauge Design]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=XML:_Macros_-_Extracting_Digits&amp;diff=8164</id>
		<title>XML: Macros - Extracting Digits</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=XML:_Macros_-_Extracting_Digits&amp;diff=8164"/>
		<updated>2011-08-29T20:15:16Z</updated>

		<summary type="html">&lt;p&gt;N4gix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = true&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| FS2000 = unknown&lt;br /&gt;
| FS98 = unknown&lt;br /&gt;
}}&lt;br /&gt;
&#039;&#039;&#039; Extract Digits Macro &#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
Quite frequently it is necessary to extract the &#039;&#039;nth&#039;&#039; digit of a number for any number of reasons.&lt;br /&gt;
This XML Macro is very handy for the purpose, as it is &amp;quot;universal&amp;quot; and does not care what the number is...&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;ExtDigit&amp;quot;&amp;gt; &lt;br /&gt;
 @1 sp0 &lt;br /&gt;
 @3 0 &amp;gt;  &lt;br /&gt;
 if{ l0 10 @3 pow * sp0 } &lt;br /&gt;
 l0 int 10 @2 pow % 10 @2 1 - 0 max pow / int  &lt;br /&gt;
 &amp;lt;/Macro&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 @ExtDigit((ALGVar),nDigit,nDecimals)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
 &lt;br /&gt;
 Where: &lt;br /&gt;
 (ALGVar) is the A,L or G var from where to extract the digit &lt;br /&gt;
 nDigit is the position of the digit to extract, starting from the right. &lt;br /&gt;
 nDecimals is the number of decimals to be included in the calcs. &lt;br /&gt;
 &lt;br /&gt;
 For instance&lt;br /&gt;
 for a value of 123.456789999999 &lt;br /&gt;
 &lt;br /&gt;
 @ExtDigit(lVar,1,0) means I want to extract the right most, discarding the decimals. It returns 3 &lt;br /&gt;
 @ExtDigit(lVar,2,0) returns 2 ; &lt;br /&gt;
 @ExtDigit(lVar,3,0) returns 1 and &lt;br /&gt;
 @ExtDigit(lVar,4,0) and up returns 0 &lt;br /&gt;
 &lt;br /&gt;
 using decimals: &lt;br /&gt;
 @ExtDigit(lVar,1,2) returns 5  &lt;br /&gt;
 @ExtDigit(lVar,2,2) returns 4  &lt;br /&gt;
 @ExtDigit(lVar,3,2) returns 3  &lt;br /&gt;
 @ExtDigit(lVar,4,2) returns 2  &lt;br /&gt;
&lt;br /&gt;
==NOTES:==&lt;br /&gt;
&lt;br /&gt;
 1. &#039;&#039;&#039;@1 sp0&#039;&#039;&#039; - this s(tores) the value of @1 in register 0 (zero) and p(ops) the number from the stack&lt;br /&gt;
 2. &#039;&#039;&#039;l0&#039;&#039;&#039; - this is a lower case L, and not a 1 (one)! This means l(oad) the value from the 0 (zero) register&lt;br /&gt;
 3. &#039;&#039;&#039;@1 @2 @3&#039;&#039;&#039; - this is how an @Macro passes parameters. The @1 is the first parameter passed from it, etc. Used like so:&lt;br /&gt;
     @Macro1(Param1,Param2,Param3)&lt;br /&gt;
     @1 passes Param1 &lt;br /&gt;
     @2 passes Param2&lt;br /&gt;
     @3 passes Param3&lt;br /&gt;
&lt;br /&gt;
[[category:Aircraft Design]]&lt;br /&gt;
[[category:Panel and Gauge Design]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=XML:_RNOR_Bug!&amp;diff=8161</id>
		<title>XML: RNOR Bug!</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=XML:_RNOR_Bug!&amp;diff=8161"/>
		<updated>2011-08-29T15:42:21Z</updated>

		<summary type="html">&lt;p&gt;N4gix: New page: {{Infobox-Applicable-FSVersion | FSXI = false | FSXA = true | FSX = true | FS2004 = true | FS2002 = true | XP10 = false  | XP9 = false  }}   == XML: RNOR Bug! ==  There is a bug in the rno...&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = true&lt;br /&gt;
| FS2002 = true&lt;br /&gt;
| XP10 = false &lt;br /&gt;
| XP9 = false &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== XML: RNOR Bug! ==&lt;br /&gt;
&lt;br /&gt;
There is a bug in the rnor function that can be used in XML scripts (in both gauges and modeldef.xml).&lt;br /&gt;
&lt;br /&gt;
The expression 4.0 rnor should be 4.0, not 0.86 as FS returns.  The problem is that the parsing engine is doing a mod by pi instead of 2 pi.&lt;br /&gt;
&lt;br /&gt;
What to do about this?  I would suggest taking a number and converting to degress (using the rddg function), then using dnor (to normalize the number of degrees to a range between 0 and 360). and then convert back to radians using dgrd.  Take care to mind your d&#039;s and r&#039;s and g&#039;s, though!&lt;br /&gt;
&lt;br /&gt;
[[Category:Aircraft Design]]&lt;br /&gt;
[[Category:Panel and Gauge Design]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=Gauges:_Resource_Numbering&amp;diff=7970</id>
		<title>Gauges: Resource Numbering</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=Gauges:_Resource_Numbering&amp;diff=7970"/>
		<updated>2011-05-08T14:10:09Z</updated>

		<summary type="html">&lt;p&gt;N4gix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = true&lt;br /&gt;
| FS2002 = true&lt;br /&gt;
| FS2000 = unknown&lt;br /&gt;
| FS98 = unknown&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
Original Entry: Bill Leaming&lt;br /&gt;
&lt;br /&gt;
One of the major shortcomings of the SDK is that absolutely no mention is made of the requirements for resource numbers, including the various auto-offsets that the panel system will look for...&lt;br /&gt;
&lt;br /&gt;
Every bitmap used in a C gauge&#039;s .rc file requires a resource number allocated in the gauge&#039;s .h file.&lt;br /&gt;
&lt;br /&gt;
Each such resource allocation actually reserves &#039;&#039;&#039;FOUR&#039;&#039;&#039; resource numbers (in FSX) although only &#039;&#039;&#039;TWO&#039;&#039;&#039; in FS9 and earlier gauges.&lt;br /&gt;
&lt;br /&gt;
For example (using decimal numbers), the background image for a gauge might be 1000. Therefore, the following table applies:&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
1000 - background image&lt;br /&gt;
&lt;br /&gt;
1500 - optional hi-resolution version of background image&lt;br /&gt;
&lt;br /&gt;
41000 - optional night version of background image (FSX+ only)&lt;br /&gt;
&lt;br /&gt;
41500 - optional night version of hi-res background image (FSX+ only)&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
So, even if we don&#039;t provide any of the &amp;quot;optional&amp;quot; bitmaps, the &#039;&#039;&#039;resource numbers&#039;&#039;&#039; are already &amp;quot;reserved,&amp;quot; hence unavailable for use by any other bitmaps!&lt;br /&gt;
&lt;br /&gt;
Some months ago, Jean-Luc suggested one possible scheme that at least has the virtue of being guaranteed &amp;quot;safe,&amp;quot; since it takes into account all of the conditions placed by the panel system on resource numbers.&lt;br /&gt;
&lt;br /&gt;
I&#039;ve since expanded the list to take advantage of the full dynamic range of allowable numbers. Below is the complete list of &amp;quot;Safe Ranges:&amp;quot;&lt;br /&gt;
&lt;br /&gt;
// 0x0100-0x02F3 0x0500-0x06F3 0x0900-0x0AF3&lt;br /&gt;
&lt;br /&gt;
// 0x1100-0x12F3 0x1500-0x16F3 0x1900-0x1AF3&lt;br /&gt;
&lt;br /&gt;
// 0x2100-0x22F3 0x2500-0x26F3 0x2900-0x2AF3&lt;br /&gt;
&lt;br /&gt;
// 0x3100-0x32F3 0x3500-0x36F3 0x3900-0x3AF3&lt;br /&gt;
&lt;br /&gt;
// 0x4100-0x42F3 0x4500-0x46F3 0x4900-0x4AF3&lt;br /&gt;
&lt;br /&gt;
// 0x5100-0x52F3 0x5500-0x56F3 0x5900-0x6AF3&lt;br /&gt;
&lt;br /&gt;
// 0x6100-0x62F3&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;NOTE: A handy site for hex-decimal-binary conversion is:&lt;br /&gt;
http://flor.nl/dec2hex.html&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
It&#039;s critical to recognize that, even though the &amp;quot;old system&amp;quot; of dual-resolution bitmaps is no longer canon for FSX gauge code, because of the necessity for &amp;quot;backwards compatibility&amp;quot; the auto-offset of 500(decimal) in resource numbers is still respected.&lt;br /&gt;
&lt;br /&gt;
Of course, this is only one possible scheme, but it has the advantage of being rational and consistent.  As long as you allocate resources within these ranges, you will &#039;&#039;&#039;NEVER&#039;&#039;&#039; run into a problem with contention. :)&lt;br /&gt;
&lt;br /&gt;
The complete range of allowable resources is of course 0x0000 to 0xffff.  The reason the above table stops at 0x62f3 is because in FSX, if one takes into account the 40,000 (decimal) auto-offset that the night time bitmap &amp;quot;swap code&amp;quot; looks for, then the highest possible number would be 0x63bf, which of course one could use, but it &amp;quot;breaks&amp;quot; the consistency of the tabular range scheme. ;)&lt;br /&gt;
&lt;br /&gt;
Aside from which, with 9,500 allowable id&#039;s, I cannot conceive of &#039;&#039;&#039;any&#039;&#039;&#039; multigauge cluster that would come close to exhausting the list of numbers provided by restricting one&#039;s choices to the table&#039;s range...&lt;br /&gt;
&lt;br /&gt;
...at least not one which would actually load and run efficiently!&lt;br /&gt;
&lt;br /&gt;
[[category:Aircraft Design]]&lt;br /&gt;
[[category:Panel &amp;amp; Gauge Design]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=GPS:_Missing_Airspace_Options&amp;diff=7963</id>
		<title>GPS: Missing Airspace Options</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=GPS:_Missing_Airspace_Options&amp;diff=7963"/>
		<updated>2011-04-13T17:57:22Z</updated>

		<summary type="html">&lt;p&gt;N4gix: /* &amp;#039;&amp;#039;&amp;#039;GPS: Missing Airspace Options&amp;#039;&amp;#039;&amp;#039; */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = true&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| FS2000 = false&lt;br /&gt;
| FS98 = false&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;GPS: Missing Airspace Options&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
I highly suggest visitors to this Wiki entry to refer to this most excellent guide:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;BlackBox Website - GPS Guidebook&#039;&#039;&#039;[http://www.robbiemcelrath.com/blackbox/?guide]&lt;br /&gt;
&lt;br /&gt;
The tabular data previously listed on this entry has proven to be incomplete and or incorrect...&lt;br /&gt;
&lt;br /&gt;
[[Category:Aircraft Design]]&lt;br /&gt;
[[Category:Panel &amp;amp; Gauge Design]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=GPS:_Missing_Airspace_Options&amp;diff=7962</id>
		<title>GPS: Missing Airspace Options</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=GPS:_Missing_Airspace_Options&amp;diff=7962"/>
		<updated>2011-04-13T17:56:04Z</updated>

		<summary type="html">&lt;p&gt;N4gix: /* &amp;#039;&amp;#039;&amp;#039;GPS: Missing Airspace Options&amp;#039;&amp;#039;&amp;#039; */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = true&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| FS2000 = false&lt;br /&gt;
| FS98 = false&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;GPS: Missing Airspace Options&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
I highly suggest visitors to this Wiki entry to refer to this most excellent guide:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;BlackBox Website - GPS Guidebook&#039;&#039;&#039;[http://www.robbiemcelrath.com/blackbox/?guide]&lt;br /&gt;
[[Category:Aircraft Design]]&lt;br /&gt;
[[Category:Panel &amp;amp; Gauge Design]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=GPS:_Missing_Airspace_Options&amp;diff=7961</id>
		<title>GPS: Missing Airspace Options</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=GPS:_Missing_Airspace_Options&amp;diff=7961"/>
		<updated>2011-04-12T17:22:21Z</updated>

		<summary type="html">&lt;p&gt;N4gix: /* &amp;#039;&amp;#039;&amp;#039;GPS: Missing Airspace Options&amp;#039;&amp;#039;&amp;#039; */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = true&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| FS2000 = false&lt;br /&gt;
| FS98 = false&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;GPS: Missing Airspace Options&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
I highly suggest visitors to this Wiki entry to refer to this most excellent guide:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;BlackBox Website - GPS Guidebook&#039;&#039;&#039;[http://www.robbiemcelrath.com/blackbox/?guide]&lt;br /&gt;
&lt;br /&gt;
Here is a list of known* input parameters for this token:&lt;br /&gt;
&lt;br /&gt;
 -1       - default&lt;br /&gt;
 0        - NONE = 0&lt;br /&gt;
 8        - CENTER = 1&lt;br /&gt;
 16       - CLASS_A = 2&lt;br /&gt;
 32       - CLASS_B = 3&lt;br /&gt;
 64       - CLASS_C = 4&lt;br /&gt;
 128      - CLASS_D = 5&lt;br /&gt;
 264      - CLASS_E = 6&lt;br /&gt;
 528      - CLASS_F = 7&lt;br /&gt;
 1024     - CLASS_G = 8&lt;br /&gt;
 2048     - TOWER = 9&lt;br /&gt;
 4096     - CLEARANCE = 10&lt;br /&gt;
 8192     - GROUND = 11&lt;br /&gt;
 16384    - DEPARTURE = 12&lt;br /&gt;
 32768    - APPROACH = 13&lt;br /&gt;
 65536    - MOA = 14&lt;br /&gt;
 131072   - RESTRICTED = 15&lt;br /&gt;
 262144   - PROHIBITED = 16&lt;br /&gt;
 524288   - WARNING = 17&lt;br /&gt;
 1048576  - ALERT = 18&lt;br /&gt;
 2097152  - DANGER = 19&lt;br /&gt;
 4194304  - NATIONAL_PARK = 20&lt;br /&gt;
 8388608  - MODE_C = 21&lt;br /&gt;
 16777216 - RADAR = 22&lt;br /&gt;
 33554432 - TRAINING = 23 &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;* NOTA BENE: This is a work in progress and may (probably does) contain errors of ommission or commission!&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can create Macro entries for use in your gauge to display selected airspaces by summing the input parameters for each type:&lt;br /&gt;
&lt;br /&gt;
 B, C, D, MOA, RESTRICTED, PROHIBITED, WARNING, ALERT, DANGER, MODE_C, RADAR, TRAINING&lt;br /&gt;
 8, 16,32, 64,    128,        256,       512     1024   2048    4096    8192   16384&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;DisplayedAirspaces&amp;quot;&amp;gt;0xEFC038&amp;lt;/Macro&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 MOA, RESTRICTED, PROHIBITED, WARNING, ALERT, DANGER&lt;br /&gt;
 64      128         256        512    1024    2048&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;AlwaysDisplayedAirspaces&amp;quot;&amp;gt;0x0FC000&amp;lt;/Macro&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Aircraft Design]]&lt;br /&gt;
[[Category:Panel &amp;amp; Gauge Design]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=GPS:_Missing_Airspace_Options&amp;diff=7960</id>
		<title>GPS: Missing Airspace Options</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=GPS:_Missing_Airspace_Options&amp;diff=7960"/>
		<updated>2011-04-12T17:18:37Z</updated>

		<summary type="html">&lt;p&gt;N4gix: /* &amp;#039;&amp;#039;&amp;#039;GPS: Missing Airspace Options&amp;#039;&amp;#039;&amp;#039; */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = true&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| FS2000 = false&lt;br /&gt;
| FS98 = false&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;GPS: Missing Airspace Options&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
I have found a very curious OMISSION in the FSX SDK on the XML Map parameters...&lt;br /&gt;
&lt;br /&gt;
ObjectDetailLayerAirspaces &lt;br /&gt;
 -1 = Default&lt;br /&gt;
 0 = Draw nothing &lt;br /&gt;
&lt;br /&gt;
This is woefully incomplete!  Here is a list of known* input parameters for this token:&lt;br /&gt;
&lt;br /&gt;
 -1       - default&lt;br /&gt;
 0        - NONE = 0&lt;br /&gt;
 8        - CENTER = 1&lt;br /&gt;
 16       - CLASS_A = 2&lt;br /&gt;
 32       - CLASS_B = 3&lt;br /&gt;
 64       - CLASS_C = 4&lt;br /&gt;
 128      - CLASS_D = 5&lt;br /&gt;
 264      - CLASS_E = 6&lt;br /&gt;
 528      - CLASS_F = 7&lt;br /&gt;
 1024     - CLASS_G = 8&lt;br /&gt;
 2048     - TOWER = 9&lt;br /&gt;
 4096     - CLEARANCE = 10&lt;br /&gt;
 8192     - GROUND = 11&lt;br /&gt;
 16384    - DEPARTURE = 12&lt;br /&gt;
 32768    - APPROACH = 13&lt;br /&gt;
 65536    - MOA = 14&lt;br /&gt;
 131072   - RESTRICTED = 15&lt;br /&gt;
 262144   - PROHIBITED = 16&lt;br /&gt;
 524288   - WARNING = 17&lt;br /&gt;
 1048576  - ALERT = 18&lt;br /&gt;
 2097152  - DANGER = 19&lt;br /&gt;
 4194304  - NATIONAL_PARK = 20&lt;br /&gt;
 8388608  - MODE_C = 21&lt;br /&gt;
 16777216 - RADAR = 22&lt;br /&gt;
 33554432 - TRAINING = 23 &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;* NOTA BENE: This is a work in progress and may (probably does) contain errors of ommission or commission!&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
You can create Macro entries for use in your gauge to display selected airspaces by summing the input parameters for each type:&lt;br /&gt;
&lt;br /&gt;
 B, C, D, MOA, RESTRICTED, PROHIBITED, WARNING, ALERT, DANGER, MODE_C, RADAR, TRAINING&lt;br /&gt;
 8, 16,32, 64,    128,        256,       512     1024   2048    4096    8192   16384&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;DisplayedAirspaces&amp;quot;&amp;gt;0xEFC038&amp;lt;/Macro&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 MOA, RESTRICTED, PROHIBITED, WARNING, ALERT, DANGER&lt;br /&gt;
 64      128         256        512    1024    2048&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;AlwaysDisplayedAirspaces&amp;quot;&amp;gt;0x0FC000&amp;lt;/Macro&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Aircraft Design]]&lt;br /&gt;
[[Category:Panel &amp;amp; Gauge Design]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=GPS:_Missing_Airspace_Options&amp;diff=7959</id>
		<title>GPS: Missing Airspace Options</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=GPS:_Missing_Airspace_Options&amp;diff=7959"/>
		<updated>2011-04-12T17:17:46Z</updated>

		<summary type="html">&lt;p&gt;N4gix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = true&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| FS2000 = false&lt;br /&gt;
| FS98 = false&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;GPS: Missing Airspace Options&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
I have found a very curious OMISSION in the FSX SDK on the XML Map parameters...&lt;br /&gt;
&lt;br /&gt;
ObjectDetailLayerAirspaces &lt;br /&gt;
 -1 = Default&lt;br /&gt;
 0 = Draw nothing &lt;br /&gt;
&lt;br /&gt;
This is woefully incomplete!  Here is a list of known* input parameters for this token:&lt;br /&gt;
&lt;br /&gt;
 -1       - default&lt;br /&gt;
 0        - NONE = 0&lt;br /&gt;
 8        - CENTER = 1&lt;br /&gt;
 16       - CLASS_A = 2&lt;br /&gt;
 32       - CLASS_B = 3&lt;br /&gt;
 64       - CLASS_C = 4&lt;br /&gt;
 128      - CLASS_D = 5&lt;br /&gt;
 264      - CLASS_E = 6&lt;br /&gt;
 528      - CLASS_F = 7&lt;br /&gt;
 1024     - CLASS_G = 8&lt;br /&gt;
 2048     - TOWER = 9&lt;br /&gt;
 4096     - CLEARANCE = 10&lt;br /&gt;
 8192     - GROUND = 11&lt;br /&gt;
 16384    - DEPARTURE = 12&lt;br /&gt;
 32768    - APPROACH = 13&lt;br /&gt;
 65536    - MOA = 14&lt;br /&gt;
 131072   - RESTRICTED = 15&lt;br /&gt;
 262144   - PROHIBITED = 16&lt;br /&gt;
 524288   - WARNING = 17&lt;br /&gt;
 1048576  - ALERT = 18&lt;br /&gt;
 2097152  - DANGER = 19&lt;br /&gt;
 4194304  - NATIONAL_PARK = 20&lt;br /&gt;
 8388608  - MODE_C = 21&lt;br /&gt;
 16777216 - RADAR = 22&lt;br /&gt;
 33554432 - TRAINING = 23 &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;* NOTA BENE: This is a work in progress and may (probably does) contain errors of ommission or commission!&#039;&#039;&lt;br /&gt;
You can create Macro entries for use in your gauge to display selected airspaces by summing the input parameters for each type:&lt;br /&gt;
&lt;br /&gt;
 B, C, D, MOA, RESTRICTED, PROHIBITED, WARNING, ALERT, DANGER, MODE_C, RADAR, TRAINING&lt;br /&gt;
 8, 16,32, 64,    128,        256,       512     1024   2048    4096    8192   16384&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;DisplayedAirspaces&amp;quot;&amp;gt;0xEFC038&amp;lt;/Macro&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 MOA, RESTRICTED, PROHIBITED, WARNING, ALERT, DANGER&lt;br /&gt;
 64      128         256        512    1024    2048&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;AlwaysDisplayedAirspaces&amp;quot;&amp;gt;0x0FC000&amp;lt;/Macro&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Aircraft Design]]&lt;br /&gt;
[[Category:Panel &amp;amp; Gauge Design]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=GPS:_Missing_Airspace_Options&amp;diff=7958</id>
		<title>GPS: Missing Airspace Options</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=GPS:_Missing_Airspace_Options&amp;diff=7958"/>
		<updated>2011-04-12T17:00:07Z</updated>

		<summary type="html">&lt;p&gt;N4gix: /* &amp;#039;&amp;#039;&amp;#039;GPS: Missing Airspace Options&amp;#039;&amp;#039;&amp;#039; */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = true&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| FS2000 = false&lt;br /&gt;
| FS98 = false&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;GPS: Missing Airspace Options&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
I have found a very curious OMISSION in the FSX SDK on the XML Map parameters...&lt;br /&gt;
&lt;br /&gt;
ObjectDetailLayerAirspaces &lt;br /&gt;
 -1 = Default&lt;br /&gt;
 0 = Draw nothing &lt;br /&gt;
&lt;br /&gt;
This is woefully incomplete!  Here is a list of known input parameters for this token:&lt;br /&gt;
&lt;br /&gt;
 -1    - default&lt;br /&gt;
 0     - Draw Nothing&lt;br /&gt;
 8     - Class B&lt;br /&gt;
 16    - Class C&lt;br /&gt;
 32    - Class D&lt;br /&gt;
 64    - MOA&lt;br /&gt;
 128   - Restricted&lt;br /&gt;
 256   - Prohibited&lt;br /&gt;
 512   - Warning&lt;br /&gt;
 1024  - Alert&lt;br /&gt;
 2048  - Danger&lt;br /&gt;
 4096  - Mode C&lt;br /&gt;
 8192  - Radar&lt;br /&gt;
 16384 - Training&lt;br /&gt;
&lt;br /&gt;
You can create Macro entries for use in your gauge to display selected airspaces by summing the input parameters for each type:&lt;br /&gt;
&lt;br /&gt;
 B, C, D, MOA, RESTRICTED, PROHIBITED, WARNING, ALERT, DANGER, MODE_C, RADAR, TRAINING&lt;br /&gt;
 8, 16,32, 64,    128,        256,       512     1024   2048    4096    8192   16384&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;DisplayedAirspaces&amp;quot;&amp;gt;0xEFC038&amp;lt;/Macro&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 MOA, RESTRICTED, PROHIBITED, WARNING, ALERT, DANGER&lt;br /&gt;
 64      128         256        512    1024    2048&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;AlwaysDisplayedAirspaces&amp;quot;&amp;gt;0x0FC000&amp;lt;/Macro&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Aircraft Design]]&lt;br /&gt;
[[Category:Panel &amp;amp; Gauge Design]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
	<entry>
		<id>http://www.fsdeveloper.com/wiki/index.php?title=GPS:_Missing_Airspace_Options&amp;diff=7957</id>
		<title>GPS: Missing Airspace Options</title>
		<link rel="alternate" type="text/html" href="http://www.fsdeveloper.com/wiki/index.php?title=GPS:_Missing_Airspace_Options&amp;diff=7957"/>
		<updated>2011-04-12T16:33:00Z</updated>

		<summary type="html">&lt;p&gt;N4gix: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{Infobox-Applicable-FSVersion&lt;br /&gt;
| FSXI = false&lt;br /&gt;
| FSXA = true&lt;br /&gt;
| FSX = true&lt;br /&gt;
| FS2004 = true&lt;br /&gt;
| FS2002 = false&lt;br /&gt;
| FS2000 = false&lt;br /&gt;
| FS98 = false&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===&#039;&#039;&#039;GPS: Missing Airspace Options&#039;&#039;&#039;===&lt;br /&gt;
&lt;br /&gt;
I have found a very curious OMISSION in the FSX SDK on the XML Map parameters...&lt;br /&gt;
&lt;br /&gt;
ObjectDetailLayerAirspaces &lt;br /&gt;
 -1 = Default&lt;br /&gt;
 0 = Draw nothing &lt;br /&gt;
&lt;br /&gt;
This is woefully incomplete!  Here is a list of known input parameters for this token:&lt;br /&gt;
&lt;br /&gt;
 -1    - default&lt;br /&gt;
 0     - Draw Nothing&lt;br /&gt;
 8     - Class B&lt;br /&gt;
 16    - Class C&lt;br /&gt;
 32    - Class D&lt;br /&gt;
 64    - MOA&lt;br /&gt;
 128   - Restricted&lt;br /&gt;
 256   - Prohibited&lt;br /&gt;
 512   - Warning&lt;br /&gt;
 1024  - Alert&lt;br /&gt;
 2048  - Danger&lt;br /&gt;
 4096  - Mode C&lt;br /&gt;
 8192  - Radar&lt;br /&gt;
 16384 - Training&lt;br /&gt;
&lt;br /&gt;
You can create Macro entries for use in your gauge to display selected airspaces by summing the input parameters for each type:&lt;br /&gt;
&lt;br /&gt;
 B, C, D, MOA, RESTRICTED, PROHIBITED, WARNING, ALERT, DANGER, MODE_C, RADAR, TRAINING&lt;br /&gt;
 8, 16,32, 64,    128,        256,       512     1024   2048    4096    8192   16384&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;DisplayedAirspaces&amp;quot;&amp;gt;0x7FF800&amp;lt;/Macro&amp;gt;&lt;br /&gt;
&lt;br /&gt;
 MOA, RESTRICTED, PROHIBITED, WARNING, ALERT, DANGER&lt;br /&gt;
 64      128         256        512    1024    2048&lt;br /&gt;
 &amp;lt;Macro Name=&amp;quot;AlwaysDisplayedAirspaces&amp;quot;&amp;gt;0x0FC000&amp;lt;/Macro&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Aircraft Design]]&lt;br /&gt;
[[Category:Panel &amp;amp; Gauge Design]]&lt;/div&gt;</summary>
		<author><name>N4gix</name></author>
	</entry>
</feed>