<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.technet.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>The panel and gauge side of MS Flight Simulator : XML gauge script</title><link>http://blogs.technet.com/engauged/archive/tags/XML+gauge+script/default.aspx</link><description>Tags: XML gauge script</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>RNOR - a bit of a bug</title><link>http://blogs.technet.com/engauged/archive/2007/02/27/rnor-a-bit-of-a-bugger.aspx</link><pubDate>Wed, 28 Feb 2007 02:01:00 GMT</pubDate><guid isPermaLink="false">d5e57398-b9ef-4490-9955-07cbb4e4a80d:664856</guid><dc:creator>EnGauged</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.technet.com/engauged/comments/664856.aspx</comments><wfw:commentRss>http://blogs.technet.com/engauged/commentrss.aspx?PostID=664856</wfw:commentRss><description>&lt;P&gt;So, our friend &lt;FONT size=2&gt;Rafael dos Santos pointed out to us last week that there was a bug in the &lt;STRONG&gt;rnor&lt;/STRONG&gt; function that can be used in XML scripts (in both gauges and modeldef.xml).&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;He noticed that &lt;STRONG&gt;4.0 rnor&lt;/STRONG&gt; should be&lt;STRONG&gt; 4.0&lt;/STRONG&gt;, not &lt;STRONG&gt;0.86&lt;/STRONG&gt; as FS returns.&amp;nbsp; The problem is that we're doing a mod by pi instead of 2 pi.&amp;nbsp; (oops)&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT size=2&gt;What to do about this?&amp;nbsp; I would suggest taking a number and converting to degress (using the &lt;STRONG&gt;rddg&lt;/STRONG&gt; function), then using dnor (to normalize the number of degrees to a range between 0 and 360). and then convert back to radians using &lt;STRONG&gt;dgrd&lt;/STRONG&gt;.&amp;nbsp; Take care to mind your d's and r's and g's, though!&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT size=2&gt;And yes, this will be fixed at some point in a future release...&lt;/FONT&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT size=2&gt;&lt;FONT size=2&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT size=2&gt;Thank you, Rafael, for noticing a bug that's been shipped in our product, in all likelihood,&amp;nbsp;for the last 3 versions! (2002, 2004, FSX).&amp;nbsp; And since I wasn't here when the code was written, I'm absolved of all responsibility for its existence.&amp;nbsp; Right?&amp;nbsp; ; )&lt;/FONT&gt;&lt;/FONT&gt;&lt;FONT size=2&gt;&lt;FONT size=2&gt;&lt;/P&gt;&lt;/FONT&gt;&lt;/FONT&gt;&lt;img src="http://blogs.technet.com/aggbug.aspx?PostID=664856" width="1" height="1"&gt;</description><category domain="http://blogs.technet.com/engauged/archive/tags/XML+gauge+script/default.aspx">XML gauge script</category></item></channel></rss>