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.

Enabling VOR / Nav 2 Autopilot

Featured Replies

After a query for a VOR2 gauge, with a working Glideslope, over at Flightsim.com, Jim Robinson pointed us to one he created.I had made the erroneous assumption that the AP wouldn't respond to it. Father Bill(n4gix) pointed out the events necessary for that function.

1 (>K:AP_NAV_SELECT_SET ) (* Select Nav1 to drive autopilot *)2 (>K:AP_NAV_SELECT_SET ) (* Select Nav2 to drive autopilot *)
I proceeded to make a 3 way knob with Nav1, GPS, and Nav2, click spots.After fooling with it for a few hours, and no luck, I made the following quickie test gauge and it won't function either.I used the variable called out in the SDK and the text string returns a 0(zero)!The clickspots are recognised(changes to cursor) and the tooltips display properly.
<?xml version="1.0" encoding="utf-8"?><Gauge Name="Autopilot Nav Radio Select Switch" Version="1.0">  <Image Name="AP_Dig_Source_Bkgnd.bmp" Luminous="No" />  <Element>	<Text X="18" Y="24" Bright="yes" Length="1" Font="Arial" Color="White" Adjust="Center" VerticalAdjust="Center" Fixed="no">  	<String>%(A:AUTOPILOT NAV SELECTED, number)%!1d!</String>	</Text>  </Element>  <Mouse>	<Area Left="0" Right="18" Top="0" Bottom="12">  	<Cursor Type="Hand"></Cursor>  	<Click>1 (>K:AP_NAV_SELECT_SET )</Click>  	<Tooltip>%Select Autopilot Nav 1 Mode</Tooltip>	</Area>	<Area Left="0" Right="18" Top="13" Bottom="24">  	<Cursor Type="Hand"></Cursor>  	<Click>2 (>K:AP_NAV_SELECT_SET )</Click>  	<Tooltip>%Select Autopilot Nav 2 Mode</Tooltip>	</Area>  </Mouse></Gauge>

I fear there is something I've missed...Don

Shouldn't it be<String>%( (A:AUTOPILOT NAV SELECTED, number) )%!1d!</String>?

Jeroen is right, you need the extra set of brackets.However, that does not change the truly bizarre fact that in XML, the K:Event doesn't work, and in C, the A:Var doesn't work.I'll flip you a C gauge that will set the state. Doug

  • Author

I'll try that. I made so many different changes of spacing, characters, and punctuation I can't remember!Originally, I just copied that element from a working gauge, but could have mucked it when I changed the Variable. I also had a text element in the knob version, that returned zero so, I had bitmaps assigned to 0, 1, and 2 when I was testing that version and they wouldn't change state either. Here's the last full version I tried:

<?xml version="1.0" encoding="utf-8"?><Gauge Name="Autopilot Nav Radio Select Switch" Version="1.0">  <Image Name="AP_Source_Bkgnd.bmp" Luminous="No" />  <Element>	<Text X="18" Y="24" Bright="yes" Length="1" Font="Arial" Color="White" Adjust="Center" VerticalAdjust="Center" Fixed="no">  	<String>%(A:AUTOPILOT NAV SELECTED,number)%!1d!</String>	</Text>	<!--From the SDK: "AUTOPILOT NAV SELECTED" Index of Nav radio selected "Number" -->  </Element>  <Element>	<Visible>(A:GPS DRIVES NAV1,bool) ! </Visible>	<Select>  	<Value>(A:AUTOPILOT NAV SELECTED,number)</Value>  	<Case Value="0">    	<Image Name="Nav_0_Selected.bmp"></Image>  	</Case>  	<Case Value="1">    	<Image Name="Nav_1_Selected.bmp"></Image>  	</Case>  	<Case Value="2">    	<Image Name="Nav_2_Selected.bmp"></Image>  	</Case>	</Select>  </Element>  <Mouse>	<Tooltip>%Autopilot Nav/GPS Select</Tooltip>	<Area Left="1" Right="35" Top="41" Bottom="76">  	<Cursor Type="Hand"></Cursor>  	<Click>(A:GPS DRIVES NAV1,bool) if{ 1 (>K:TOGGLE_GPS_DRIVES_NAV1) }1 (>K:AP_NAV_SELECT_SET )</Click>  	<Tooltip>%Select Autopilot Nav 1 Mode</Tooltip>	</Area>	<Area Left="63" Right="97" Top="41" Bottom="76">  	<Cursor Type="Hand"></Cursor>  	<Click>(A:GPS DRIVES NAV1,bool) if{ 1 (>K:TOGGLE_GPS_DRIVES_NAV1) }2 (>K:AP_NAV_SELECT_SET )</Click>  	<Tooltip>%Select Autopilot Nav 2 Mode</Tooltip>	</Area>	<Area Left="32" Right="66" Top="6" Bottom="40">  	<Cursor Type="Hand"></Cursor>  	<Click>(A:GPS DRIVES NAV1,bool) ! (>K:TOGGLE_GPS_DRIVES_NAV1)</Click>  	<Tooltip>%Select GPS Mode</Tooltip>	</Area>  </Mouse></Gauge>

Clicking the GPS spot toggles GPS mode properly. Clicking either NAV 1 or 2 spot turns off the GPS mode if enabled and shows me the Nav_0_Selected.bmp. I flew a couple of approaches and tried enabling it with a properly tuned NAV 2, no joy...Don

  • Author
Jeroen is right, you need the extra set of brackets.However, that does not change the truly bizarre fact that in XML, the K:Event doesn't work, and in C, the A:Var doesn't work.I'll flip you a C gauge that will set the state. Doug
Thanks Doug! I was quite baffled why I couldn't find the problem with the event, then further confusion reigned, with the Var retuning zero...Don [edit] the extra brackets fixed the digit as you folks said it would. Thanks BTW, Doug, my handle at yahoo.com

Yep! the XML strings need to be coded whit double parenthesis. Aditionally there is no Nav 0 for the auto pilot Nav Selected A: parameter it just accept Nav 1 or Nav 2 values. Javier

  • Author

Ha-Ha, I love it! LOL.gif How embarrassing!! Those missing parenthesis are things that should be second nature to me by now.Literally, hundreds of gauges, and a dozen or so panels, uploaded and shared. The last couple of days though, I have had my head tucked firmly where the sun don't shine!Hypnotized.gif I had no clue what (A:AUTOPILOT NAV SELECTED,number) might actually return, so I created the digital version.Idea.gifIt returned a 0. I had not even thought that it could be mucked up, of course! Cry.gif Jeroen and Doug to the rescue! Thanks again, fellas. Also, thanks to Mr Dawson, I now have in my posession a neat little xml-->C translator for those Events."xml L:Event" goes in, "C++ K: Event" comes out. Works a treat!It allowed me to complete my little selector knob, which was the source of my pain and embarrassment! Now to start learning C gauges!(Yeah, Right!)...Don

  • 2 months later...
However, that does not change the truly bizarre fact that in XML, the K:Event doesn't work, and in C, the A:Var doesn't work.
This XML code appears to work for me:
<Gauge Name="AP NAV switch" Version="2.0">    <Element>	    <Select>		    <Value>(A:Autopilot NAV selected,number)</Value>		    <Case Value="1">			    <Image Name="APNAV1.bmp" />		    </Case>		    <Case Value="2">			    <Image Name="APNAV2.bmp" />		    </Case>	    </Select>    </Element>    <Mouse>	    <Help ID="AP NAV1/NAV2" />	    <Cursor Type="Hand" />	    <Click>		   (A:Autopilot NAV selected,number) (>L:APNAV,number)		   (L:APNAV,number)  1 == if{ 2 (>K:AP_NAV_SELECT_SET) }		   (L:APNAV,number)  2 == if{ 1 (>K:AP_NAV_SELECT_SET) }	    </Click>    </Mouse></Gauge>

Bert

Given my XML skills, it is entirely possible that it was my test gauge that was the problem... blush.png

Does this mean you can create 2 ILS gauges with glideslope needles (one on the captain's side and one on the copilot's side) and have them switch independently between NAV1 and NAV2? (i.e. each has a NAV1/NAV2 switch).And does this work in FS9?Thanks,

Yes,You can display nav 1 or nav 2 on both sides or nav 1 on one side & nav 2 on the other and if tuned to the same ILS fequency you can change the coupling from 1 to 2 during the approach or fly the approach on nav 2.

Paul EGLD

  • 3 weeks later...

Hi pve,I tryied all .xml codes posted in this tread but for me none it's working as you said.I 'm using RFP 742.Please can you post the right working code as you explained in your post?Gianfranco

Hi pve,I tryied all .xml codes posted in this tread but for me none it's working as you said.I 'm using RFP 742.Please can you post the right working code as you explained in your post?Gianfranco
Check the [Radios] section of aircraft.cfgIs the aircraft configured to have an ILS on NAV2?Doug
  • Moderator
Does this mean you can create 2 ILS gauges with glideslope needles (one on the captain's side and one on the copilot's side) and have them switch independently between NAV1 and NAV2? (i.e. each has a NAV1/NAV2 switch).And does this work in FS9?Thanks,
Yes, although obviously only one source can drive the AP at a time... ;)One of my current projects has NAV1 driving the pilot's side, and NAV2 driving the copilot's side. In the event of a NAV1 failure, the copilot can take over as PIC and switch the AP to be driven by the NAV2 signals.

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

I did get this working as you said, thanks. NAV1 gauges on the captain's side and NAV2 gauges on the copilot's side. Works great. I haven't tried changing the AP, since on older AP's they were often driven by only one radio.Thanks again,

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.