• 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.

FSX VOR/LOC/GS Indicator Lights

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
Gah! There aren't enough working variables in FS to support this indicator properly...

The early 737-xxx series has two rows of indicator lights showing the status of VOR/LOC and GS arm and capture. The left set is for the Flightdirector, the right set is for the Autopilot.

FD..........................AP
When tuned freq is localizer or VOR:
VOR/LOC............VOR/LOC

If glideslope is available:
GS.....................GS

FD..........................AP
If signal strength is reliable:
VOR/LOC............VOR/LOC
If signal strength is reliable and glideslope is available:
GS.....................GS

The biggest problem is that the "signal strength" for a tuned localizer is always 256 or 0. There is no "inbetween..."

The signal strength for a VOR however varies from 0 to >8000...

I have the GS set working fine, but the VOR/LOC set is driving me nuts!

The conditions required for the FD set is:
VOR/LOC
Code:
    (A:AUTOPILOT FLIGHT DIRECTOR ACTIVE,bool) 0 >
    if{
    <!-- TURN ON AMBER LABEL -->
    @IsLoc 
    @IsVor 
    (A:NAV SIGNAL:1,enum) 1000 &lt; 
    and 
    (A:NAV SIGNAL:1,enum) 0 != 
    and
    or 
    (L:B737_FD_VorLocAmber_Light, enum) ! 
    and 
    if{ 1 (>L:B737_FD_VorLocAmber_Light, enum) }

    <!-- TURN OFF AMBER LABEL -->
    @IsLoc ! 
    @IsVor ! 
    and 
    (L:B737_FD_VorLocAmber_Light, enum) 
    and 
    (A:NAV SIGNAL:1,enum) 1000 &gt;= 
    or
    if{ 0 (>L:B737_FD_VorLocAmber_Light, enum) }
    
    <!-- TURN ON GREEN LABEL -->
    @IsLoc 
    @IsVor 
    (L:B737_FD_VorLocGreen_Light, enum) ! 
    and 
    or 
    (A:NAV SIGNAL:1,enum) 1000 &gt; 
    and
    if{ 1 (>L:B737_FD_VorLocGreen_Light, enum) }

    <!-- TURN OFF GREEN LABEL -->
    @IsLoc ! 
    @IsVor ! 
    and 
    (L:B737_FD_VorLocGreen_Light, enum) 
    and 
    (A:NAV SIGNAL:1,enum) 0 == 
    and
    if{ 0 (>L:B737_FD_VorLocGreen_Light, enum) }

The problem is that the amber label never disappears... Can anyone spot my error?
 
Yup,

When the apparently simplest code misbehaves, that's always the part that drives me nuts too.

Concerning this sequence:

Code:
(L:B737_FD_VorLocAmber_Light, enum) and

what is the condition of the amber light that is being evaluated? I might understand it if it were a bool, but in my sophmore level XML understanding, I expect some numerical condition for an enum such as
Code:
(L:B737_FD_VorLocAmber_Light, enum) 1 == and

but I would actually need to try it the way you have it to see if there really is an issue here.

The GREEN light is also interesting. Is the intended order

(L:B737_FD_VorLocGreen_Light, enum) ! followed by and, or the other way around? I guess there is no syntax problem either way...

I dunno ...

Bob
 
Bill,

Check the logic in your routine to turn the amber light on. I'm not sure it's what you're looking for. My crack at turning it into infix notation ended up with this:

(
@IsLoc or
(
(@IsVor and (A:NAV SIGNAL:1,enum) &lt; 1000) and (A:NAV SIGNAL:1,enum) != 0
)
)
and
(L:B737_FD_VorLocAmber_Light, enum) !


Doug
 
....
The problem is that the amber label never disappears... Can anyone spot my error?

Bill,

I think the best way to handle inverse logical conditionals is precisely by inverting the entire condition tested for positive, and then adding the test for the current situation (positive/negative)

In your case,for example is an amber light must be on when

-Is an ILS or is a VOR + n Conditions,

then you can do something like:

@IsVOR
(L:Cond1) and
(L:Cond2) and
...etc
@IsILS
or s0
(L:LightIsOn,bool) ! and
if{ Turn Light On }

l0 !
(L:LightIsOn,bool) and
if{ Turn Light Off }

Much easier to debug because there is only one condition that is saved in a register and in the following evaluation that value is negated (inverted) to test for the opposite situation.
Also a good saving of extra code :D

Tom
 
AAARRRRGGGGHHHH!

I absolutely HATE all of the duplicated A:vars in this bloody sim, as well as those that don't behave as expected!

First of all, all of these so-called "different" A:vars produce identical results:

(A:NAV HAS GLIDE SLOPE:1,bool)
(A:HSI GSI NEEDLE VALID,bool)
(A:NAV CODES:1, flags) 64 &amp; 64 ==
(A:NAV GS FLAG:1,bool)

Then the so-called "signal strength" will either give 0 or 256 if a localizer is tuned in.

I only want the "GLIDE SLOPE" indicator to light amber if the localizer has a glideslope transmitter...

...and only light up green if the signal strength is reliable. That's where everything falls apart. :(

At least I've finally got the LOC/VOR indicators working, so that's progress! :cool:
 
Last edited:
AAARRRRGGGGHHHH!
I only want the "GLIDE SLOPE" indicator to light amber if the localizer has a glideslope transmitter...

...and only light up green if the signal strength is reliable. That's where everything falls apart. :(
Is the glideslope signal ever unreliable in FS?
It seems to be an on/off matter AFAIK.

Your idea (other thread) of determining the sensitivity based on how far you are from the GS is good.
Perhaps you could use the distance to the runway to determine the signal strength in a similar way?
 
Is the glideslope signal ever unreliable in FS?
It seems to be an on/off matter AFAIK.

Your idea (other thread) of determining the sensitivity based on how far you are from the GS is good.
Perhaps you could use the distance to the runway to determine the signal strength in a similar way?
It is in fact strictly binary, unlike the VOR signal strength that does vary depending on many factors such as distance, altitude, and terrain obstruction!

If there were some variable that would return "distance to runway" that would be a workable solution, but there isn't such a critter...
 
It is in fact strictly binary, unlike the VOR signal strength that does vary depending on many factors such as distance, altitude, and terrain obstruction!

If there were some variable that would return "distance to runway" that would be a workable solution, but there isn't such a critter...

The GPS interface will give us the lat/lon/alt of the runway, won't it.
A little bit of string stick-handling will enable you to determine which ILS/LOC relates to which runway. The only tricky bit would be an offset localizer.

Doug
 
The GPS interface will give us the lat/lon/alt of the runway, won't it.
A little bit of string stick-handling will enable you to determine which ILS/LOC relates to which runway. The only tricky bit would be an offset localizer.

Doug

Doug, I was unable to get any return from the GPS interface with the AP in Nav mode. In any case, the scheme I worked out at least provides the illusion of working. Frankly I've spent far too much time on what is a relatively minor feature that 9,999 out of 10,000 won't even notice anyway! :eek:
 
Back
Top