Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

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

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

XML function "RNOR" BUG !!

Featured Replies

After 2 day's (and nights :-() of debugging I finally detected why my "great-circle" formula's don't work properly.....Unlike what you would expect (and what is specified in the FS2004 panel SDK), the RNOR function doesnot normalise at "2-PI" (360 degrees, like DNOR), but only at "PI" (180 degrees).Another caution: The Modulo (%) function for negative values might work differently then you would expect:Example: "-1 4 %" gives result "-1", NOT "+3"Not a bug, but just MS'XML implementation of Modulo (this appears to be programming-language / implementation dependant).Hope this saves you some sleepsless nights :-)Cheers, Rob Barendregt

  • Commercial Member

Yeah:(A couple ways around that:Convert to degrees and apply dnor then if necessary, convert back.The other method would be to use mod where:6.45771823 = 370 degrees in radians (6.45771823 pi 2 * %) = 0.17453 = 10 degrees normalized--Jon

I didn' write it it too clearly in my xmlgau1 doc that rnor does not work as expected. The modulo functions in any language are not really what you expect mathematically when dealing with negative numbers. That's the reason for some strange huge offsets for some stripe type gauges. Just add a very big number to the altitude and you get a positve number, applying % later will get you back to the normal range anyway.Arne Bartels

  • Author

Hi Jon, ArneYes, solutions are usually easy once you know the problem :-)Cheers, Rob

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

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