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.

VOR_CODE

Featured Replies

  • Moderator

In the SDK, I find the following #defines:// defines for VOR_INFO.CODE field#define VOR_CODE_IS_LOCALIZER BIT7 // bit7 = 0= VOR 1= Localizer#define VOR_CODE_GLIDESLOPE BIT6 // bit6 = 1= Glideslope Available#define VOR_CODE_BACKCOURSE_UNAVAIL BIT5 // bit5 = 1= no localizer backcourse#define VOR_CODE_DME_AT_GLIDE_SLOPE BIT4 // bit4 = 1= DME transmitter at Glide Slope Transmitter#define VOR_CODE_NAV_UNAVAILABLE BIT3 // bit3 = 1= no nav signal available#define VOR_CODE_VOICE_AVAILABLE BIT2 // bit2 = Voice Available#define VOR_CODE_TACAN BIT1 // bit1 = TACAN#define VOR_CODE_DME_AVAILABLE BIT0 // bit0 = DMEHow does one go about USING them though???

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

You need to do a bitwise AND (&) operation to test if the bits you are looking for are set.In C++ you would do this if you were testing to see if VOR1 has a localizer:MODULE_VAR FSVARS_vor1code = { VOR1_CODE };lookup_var(&FSVARS_vor1code);if(FSVARS_vor1code.var_value.f & VOR_CODE_IS_LOCALIZER) return(true);else return(false);I can't help you with XML I'm afraid as that's not my thing.Mark

Hi there Bill I've been looking for that info for ages(I am just a dumb scenery type) so that would explain why I did not see it LOL. Anyway for you "gageheads" many airports put the dme xmitter at the G.S ant I.E. co-locate both the G.S and dme thus your dme would read zero at the glide path intercept point with the ground instead of the distance to the localizer when the dme is co-located with the localizer the others should be self-explanitory I.E. say voice on the localizer freq etc.The above post does however tell one how to use the above. Sorry duh I should really read you post as you no doubt know what all the displys do and how they need to be programmed I hope I've been of some help .though Dan Martin

  • Author
  • Moderator

>You need to do a bitwise AND (&) operation to test if the>bits you are looking for are set.>>In C++ you would do this if you were testing to see if VOR1>has a localizer:>>MODULE_VAR FSVARS_vor1code = { VOR1_CODE };>lookup_var(&FSVARS_vor1code);>if(FSVARS_vor1code.var_value.f & VOR_CODE_IS_LOCALIZER)> return(true);>else> return(false);>>I can't help you with XML I'm afraid as that's not my thing.Were I asking an XML question, I wouldn't have posted code from the fs9gauges.h file, would I? ;)I have been using this, but thought there MUST be an easier way... ;) MODULE_VAR mvvorcode = { VOR1_CODE }; FLOAT64 vorcode = 0; FLOAT64 vor_code = 0; FLOAT64 vorcodeisloc = 0; FLOAT64 vorcodegsavail = 0; FLOAT64 vorcodeisbc = 0; lookup_var (&mvvorcode); vorcode = mvvorcode.var_value.f; /* Update Variables */ if (vorcode >= 128) { vorcodeisloc = 1 ; } else { vorcodeisloc = 0 ; } if (vorcode >= 128) { vor_code = vorcode - 128; if (vor_code >= 64) {vorcodegsavail = 1;} else {vorcodegsavail = 0; } } if (vor_code >= 64) { vor_code = vor_code - 64; if(vor_code >= 32) {vorcodeisbc = 0;} else {vorcodeisbc=1;} }

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
  • Author
  • Moderator

Thanks again, Mark... Now I know how to work with these as well!// Back course flags for VOR gauges#define BC_FLAG_BACKCOURSE_AVAILABLE BIT0#define BC_FLAG_LOCALIZER_TUNED_IN BIT1#define BC_FLAG_ON_BACKCOURSE BIT2#define BC_FLAG_STATION_ACTIVE BIT7I was puzzled why I couldn't find a way to determine whether I was on a normal localizer or a backcourse localizer approach. I needed to invert the drawing code for the HSI needle: if (mvbcflags.var_value.f & BC_FLAG_ON_BACKCOURSE) { vorbcavail = 1 ; } else { vorbcavail = 0 ; } /* Localizer */ if (hsivertvalid == -1 && vorcodeisloc == 1) { if (vorbcavail == 0) { graphics.TranslateTransform (152.0f + (hsivert*50), 157.0f); } if (vorbcavail == 1) { graphics.TranslateTransform (152.0f - (hsivert*50), 157.0f); } PointF fd_vert [] = { PointF (-4.0f, -60.0f), PointF (4.0f, -60.0f), PointF (4.0f, 60.0f), PointF (-4.0f, 60.0f), }; graphics.FillPolygon (&yellowBrush, fd_vert, 4);

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

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.