• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

Help whit an Auto - ILS Course gauge

Messages
18
Country
argentina
Hi everyone:

I am trying to make a simple gauge in XML that, If NAV1 is an LOC o an ILS, OR If GPS is selected for NAV1, then automaticaly changes the OBS settings for NAV1 on the Autopilot for the ILS Course.

The ILS Course is get from the NAV1 LOCALIZER Variable.

Here is my code by now, It is not working and I don't know why:

Code:
<Gauge Name="ILS GPS Course" Version="1.0">
      <Value>(A:NAV1 HAS LOCALIZER, bool) (A:GPS DRIVES NAV1, bool) 1 || if{(A:NAV1 LOCALIZER, degree) (&gt;NAV1 OBS,degree)}</value>
</Gauge>

Any Help will be much apreciated!!!
 
Hi everyone:

I am trying to make a simple gauge in XML that, If NAV1 is an LOC o an ILS, OR If GPS is selected for NAV1, then automaticaly changes the OBS settings for NAV1 on the Autopilot for the ILS Course.

The ILS Course is get from the NAV1 LOCALIZER Variable.

Here is my code by now, It is not working and I don't know why:

Code:
<Gauge Name="ILS GPS Course" Version="1.0">
      <Value>(A:NAV1 HAS LOCALIZER, bool) (A:GPS DRIVES NAV1, bool) 1 || if{(A:NAV1 LOCALIZER, degree) (&gt;NAV1 OBS,degree)}</value>
</Gauge>

Any Help will be much apreciated!!!

NAV1 OBS,degree is a "read only token variable..."

If you wish to set the OBS pointer, you need to use the key_event command:

(&gt;K:VOR1_SET)

Code:
if{ (A:NAV1 LOCALIZER, degree) (&gt;K:VOR1_SET) }
 
Last edited:
Thanks Bill!

FS Version = 2004

Thanks Bill, the last few lines of your post were very helpful!

I have been trying to design a Visual Basic Program that will change certain Comm and Nav values by using the Number Pad on the Keyboard and using FSConnect.

One of the values I couldn't do was the Navigation Heading on the autopilot, mainly because I am not that good at Visual Basic really and also not that aware of all the terminology in FS. But from here and there I have managed it - pic attached of my Program Window.

Thanks again!

John aka warmingham
 
Last edited:
FS Version = 2004

Thanks Bill, the last few lines of your post were very helpful!

I have been trying to design a Visual Basic Program that will change certain Comm and Nav values by using the Number Pad on the Keyboard and using FSConnect.

One of the values I couldn't do was the Navigation Heading on the autopilot, mainly because I am not that good at Visual Basic really and also not that aware of all the terminology in FS. But from here and there I have managed it - pic attached of my Program Window.

Thanks, John. It took me a long time to figure that pne out...:eek:

K:VOR1_SET has to be the most obtuse and non-obvious key_event ever! :D

I was looking -of course- for something along the lines of setting an HSI needle or perhaps a CDI needle, which is what one might expect. I needed this key_event to implement an "auto-slew" function in a Sandel 3308a EHSI, so that the GPS CDI would automatically be set whenever the WP for the next leg of a flightplan was reached.
 
Hi Bill:

Thanks a lot for your help, but I don't make it work.

I tested putting the <Value>(A:NAV1 HAS LOCALIZER, bool) (A:GPS DRIVES NAV1, bool) 1 || if{(A:NAV1 LOCALIZER, degree) (&gt;NAV1 OBS,degree)}</value>
whitin an <Element> </Element>.

Even tryed to see what the parameter was doing when a change was set using a little peace of code:
<Element>
<Position X="18" Y="34"/>
<Text X="66" Y="15" Length="9" Fixed="Yes" Font="Quartz" FontHeight="0" FontWeight="400" Charset="Default" Attributes="Normal" Adjust="Center" VerticalAdjust="Center" Multiline="No" Color="#ff0000" BackgroundColor="transparent" HilightColor="white" Bright="Yes" UseTransparency="Yes">
<String>%(A:NAV1 HAS LOCALIZER, bool)%!5d!</String>
<Failures>
<SYSTEM_ELECTRICAL_PANELS Action=""/>
</Failures>
</Text>
</Element>

On the teory A:NAV1 HAS LOCALIZER, bool has to be on 1 when the tunned frecuency is an Localizer (or ILS, which has an LOC and an GP), and A:GPS DRIVES NAV1, bool, has to be on 1 when I select GPS for NAV1, but when I tryed to get that info whit the above code, it never changed from 0, so I think this is the main problem I have.

A:NAV1 LOCALIZER, degree gives the information that they should give when used on the Text code above.

What am I doing wrong? from where I should begain?

PS: This post is not for FS2002, is for FS2004, I don't Know why it was flaged for FS2002...
 
This will never work because it's not proper syntax:

<Value>(A:NAV1 HAS LOCALIZER, bool) (A:GPS DRIVES NAV1, bool) 1 || if{(A:NAV1 LOCALIZER, degree) (&gt;NAV1 OBS,degree)}</value>

I just told you in my previous reply that "NAV1 OBS,degree" is a read only token variable... You cannot "write" to a "read only" variable!

This might work, but I haven't tested it:

<Value>(A:NAV1 HAS LOCALIZER, bool) (A:GPS DRIVES NAV1, bool) 1 || if{ (A:NAV1 LOCALIZER, degree) (&gt;K:VOR1_SET) }</value>

Try this. It's the code I use in my EHSI:

Code:
<Update>
(A:GPS drives nav1, bool) 0 == 
	if{ (A:NAV1 radial,degrees) 180 + (&gt;K:VOR1_SET) }
	els{ (A:GPS WP DESIRED TRACK,degrees) (&gt;K:VOR1_SET) } 
</Update>
 
Last edited:
Upps!!!

Sorry Bill
I don't know why I copied the original code line again.
Yes I was using K:VOR1_SET in the code as you sugested, but did not work.
I will try whit your sugestion for the GPS Course and I will also try whit (A:NAV1 HAS LOCALIZER, bool) and (A:NAV1 LOCALIZER, degree) for an ILS Autopointer
 
Hi,

You might try this:

Code:
<Gauge Name="ILS GPS Course" Version="1.0">
  <Size X="10" Y="10"/>
  <Element>      
    <Select>
      <Value>
       (A:NAV1 HAS LOCALIZER, bool) (A:GPS DRIVES NAV1, bool) or if{ (A:NAV1 LOCALIZER, degrees) (>K:VOR1_SET) }
      </Value>
   </Element>
</Gauge>

Tom
 
Oops! :redflag:

I just realized that I had overlooked one other reason why your previous code wouldn't work...

...again, it's a syntax issue. It's not obvious because it's invisible, but the blank space following "if{ " and the blank space preceding the closing " }" is critical! :eek:
 
Hi All:

Finally It Worked, whith the Logic given by Bill whit some modifications:

Here is an guage that will make CDI auto point to the next GPS Waypoint, or to the ILS Course when selected.

Code:
<Gauge Name="ILS GPS Course" Version="1.0">
   <Update>
      (A:GPS drives nav1, bool) 0 == 
         if{ (A:NAV1 HAS LOCALIZER, bool) 0 == 
            if{  } 
            els{ (A:NAV1 LOCALIZER, degrees) (&gt;K:VOR1_SET) } } 
         els{ (A:GPS WP DESIRED TRACK,degrees) (&gt;K:VOR1_SET) } 
   </Update>
</Gauge>

This gauge will check if GPS is active, if is then will set NAV1 Course to the GPS Course, if not it will check if NAV1 Selected frecuency is a localizer, then it will set NAV1 Course to the course of the ILS, if none of the both are true, then will mantain last selected course.

It works perfect, so everyone is invited to use it.

THanks a lot Bill and Tom !!!
 
Back
Top