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

Multiple conditions on BGL light using separation_Plane

Messages
6
Country
australia
Is it possible to get a nav light to display under under a and/or query using the separation_plane. The reason I ask is that unlike a PAPI system where if in the separation plane the white light is on and if not the the light is red. A T-VASI has lights that indicate to flyup or flydown.

The crosspiece (t) lights are easy enough to code on their own they work on the principle that the white light is always on unless the plane is in a gross undershoot and they will all display red so I worked out the separation plane for gross undershoot and can code them to display under these conditions.

The trouble begins when trying to get to show either high or low, on the low side if you are slightly low then one white light displays if you are low then two white lights display showing flyup and if verylow then three white will show pointing up to the crosspiece (the T) and on a gross undershoot they will all show red showing pull up quick.

The three lights above the t have only a white light that show slightly high, high and very high, they have no red light.

The trouble is the conditional displays if the slightly low is on then I can use a separation plane, but if it meets the argument to get two lights to show in the next stage of the Separation_Plane low, that is the plane is on the right area to be low but I need to show both the low and slightly low lights piointing up to the t. On the very low I need to get the verylow, low and slightly low white nav lights to show pointing up to the T.

Also unlike the PAPI I dont want the red lights on if the sep_plane condition is not met I only want them on a gross undershoot.

This is what I had a try with but I feel I'm missing something:

;first check are we on the right side

SEPARATION_PLANE nolgt1, -29697,0,13848,32678

;check gross undershoot
SEPARATION_PLANE nolgt2, 1295 , 32736 , -604 , 32678
BGL_LIGHT LIGHT_NAV, 14.359, 2.217, -12.755, 20, 0.60, 0.40, 0FFFF0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 30
BGL_LIGHT LIGHT_NAV, 14.359, 2.217, -6.295, 20, 0.60, 0.40, 0FFFF0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 60
BGL_LIGHT LIGHT_NAV, 13.854, 2.217, 5.801, 20, 0.60, 0.40, 0FFFF0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 90
BGL_LIGHT LIGHT_NAV, 14.176, 2.217, 11.817, 20, 0.60, 0.40, 0FFFF0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 120
BGL_LIGHT LIGHT_NAV, -31.033, 2.217, -0.098, 20, 0.60, 0.40, 0FFFF0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 122
BGL_LIGHT LIGHT_NAV, -128.270, 2.217, -0.395, 20, 0.60, 0.40, 0FFFF0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 152
BGL_LIGHT LIGHT_NAV, -128.270, 2.217, -0.395, 20, 0.60, 0.40, 0FFFF0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 152
BGL_LIGHT LIGHT_NAV, -218.061, 2.217, -0.693, 20, 0.60, 0.40, 0FFFF0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 181
;if these lights are used skip to end
BGL_JUMP_32 nolgt1
nolgt2 label BGLCODE

;check low side
SEPARATION_PLANE nolgt3, 1546,32723,-721,32678
BGL_LIGHT LIGHT_NAV, -31.033, 2.217, 0.794, 20, 0.60, 0.40, 0FFFFFFFFh, 0.000000, 0.000000, 1.000000 ; source poly num = 121
nolgt3 label BGLCODE
SEPARATION_PLANE nolgt4, 0 , 32726 , 1648 , 32678
BGL_LIGHT LIGHT_NAV, -31.033, 2.217, 0.794, 20, 0.60, 0.40, 0FFFFFFFFh, 0.000000, 0.000000, 1.000000 ; source poly num = 121
BGL_LIGHT LIGHT_NAV, -128.270, 2.217, 0.497, 20, 0.60, 0.40, 0FFFFFFFFh, 0.000000, 0.000000, 1.000000 ; source poly num = 151
nolgt4 label BGLCODE
SEPARATION_PLANE nolgt5, 84 , 32727 , 1608 , 32678
BGL_LIGHT LIGHT_NAV, -31.033, 2.217, 0.794, 20, 0.60, 0.40, 0FFFFFFFFh, 0.000000, 0.000000, 1.000000 ; source poly num = 121
BGL_LIGHT LIGHT_NAV, -128.270, 2.217, 0.497, 20, 0.60, 0.40, 0FFFFFFFFh, 0.000000, 0.000000, 1.000000 ; source poly num = 151
BGL_LIGHT LIGHT_NAV, -218.061, 2.217, 0.200, 20, 0.60, 0.40, 0FFFFFFFFh, 0.000000, 0.000000, 1.000000 ; source poly num = 182
nolgt5 label BGLCODE
;check high
SEPARATION_PLANE nolgt6, 1563 , 32722 , -729 , 32678
BGL_LIGHT LIGHT_NAV, 66.726, 2.217, 0.268, 20, 0.60, 0.40, 0FFFFFFFFh, 0.000000, 0.000000, 1.000000 ; source poly num = 239
nolgt6 label BGLCODE
SEPARATION_PLANE nolgt7, 93 , 32719 , 1779 , 32678
BGL_LIGHT LIGHT_NAV, 66.726, 2.217, 0.268, 20, 0.60, 0.40, 0FFFFFFFFh, 0.000000, 0.000000, 1.000000 ; source poly num = 239
BGL_LIGHT LIGHT_NAV, 164.491, 2.217, 1.209, 20, 0.60, 0.40, 0FFFFFFFFh, 0.000000, 0.000000, 1.000000 ; source poly num = 240
nolgt7 label BGLCODE
SEPARATION_PLANE nolgt8, 0 , 32716 , 1820 , 32678
BGL_LIGHT LIGHT_NAV, 66.726, 2.217, 0.268, 20, 0.60, 0.40, 0FFFFFFFFh, 0.000000, 0.000000, 1.000000 ; source poly num = 239
BGL_LIGHT LIGHT_NAV, 164.491, 2.217, 1.209, 20, 0.60, 0.40, 0FFFFFFFFh, 0.000000, 0.000000, 1.000000 ; source poly num = 240
BGL_LIGHT LIGHT_NAV, 264.844, 2.217, 0.370, 20, 0.60, 0.40, 0FFFFFFFFh, 0.000000, 0.000000, 1.000000 ; source poly num = 269
BGL_JUMP_32 nolgt1
nolgt8 label BGLCODE


BGL_LIGHT LIGHT_NAV, 14.359, 2.217, -11.862, 20, 0.60, 0.40, 0FFFFFFFFh, 0.000000, 0.000000, 1.000000 ; source poly num = 29
BGL_LIGHT LIGHT_NAV, 14.359, 2.217, -5.403, 20, 0.60, 0.40, 0FFFFFFFFh, 0.000000, 0.000000, 1.000000 ; source poly num = 31
BGL_LIGHT LIGHT_NAV, 13.854, 2.217, 6.693, 20, 0.60, 0.40, 0FFFFFFFFh, 0.000000, 0.000000, 1.000000 ; source poly num = 61
BGL_LIGHT LIGHT_NAV, 14.176, 2.217, 12.710, 20, 0.60, 0.40, 0FFFFFFFFh, 0.000000, 0.000000, 1.000000 ; source poly num = 91
nolgt1 label BGLCODE

BGL_RETURN
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,859
Country
netherlands
Hi,

I am a bit confused about what you want to do with the lights exactly. But yes, it is possible. You can use different SEPARATION_PLANE commands to get different conditions for the lights.
 
Messages
6
Country
australia
hmm - yes that was too ambitious for me too :)

Maybe i break it down into simpler steps. For instance how to get one light to switch onor off based upon Separatioin_Plane. Here I just want this red light to be on when I am below the glideslope of 2.2 degrees? This code does not work it seems:

TVASIS_red_MasterScale_1 label BGLCODE
SEPARATION_PLANE WrongSide, -29697,0,13848,32678

SEPARATION_PLANE below1, 1140 , 32743 , -532 , 32678
BGL_LIGHT LIGHT_NAV, -0.074, 0.052, 0.000, 20, 0.60, 0.40, 0FF9C0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 1

below1 label BGLCODE

WrongSide label word
BGL_RETURN
 
Messages
6
Country
australia
ok - so maybe picture will work better for me, The sep_plane is testing area in the blue (here a 30 degree slope) and if the plane is not in this area it skips the white code to turn a light red with a PAPI, But for a VASI i only want it red in the area below the sep plane, maybe I can rotate whole plane to a negative angle ? maybe like picture 2?
 

Attachments

  • sepplane3.jpg
    sepplane3.jpg
    78.2 KB · Views: 448
  • seplane2.jpg
    seplane2.jpg
    91.9 KB · Views: 488
Messages
6
Country
australia
Ok so I worked out some code to get the red to show below the 2.2 plane:)

SEPARATION_PLANE WrongSide, -29697,0,-13848,32678

SEPARATION_PLANE belowred, 1140 , 32743 , 532 , 32678
BGL_JUMP_32 lbl_end
belowred label word
BGL_LIGHT LIGHT_NAV, -0.074, 0.052, 0.000, 20, 0.60, 0.40, 0FF9C0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 1
lbl_end label word
WrongSide label word
BGL_RETURN

SEPARATION_PLANE WrongSide, -29697,0,-13848,32678

Edit : the same effect can be had by reversing all the components
SEPARATION_PLANE belowred, -1140 , -32743 , -532 , -32678
BGL_LIGHT LIGHT_NAV, -0.074, 0.052, 0.000, 20, 0.60, 0.40, 0FF9C0000h, 0.000000, 0.000000, 1.000000 ; source poly num = 1
belowred label word
WrongSide label word
BGL_RETURN

Much Cleaner and it is all here on this site :)



Now I want to know how to check below the 2.7deg plane and above the 2.2 plane? Can you perform a between two planes check?

and this is also possible using the negative vaules to define the top fo the wedge and your lower values from glideslope calcs

SEPARATION_PLANE WrongSide, -29697,0,-13848,32678
SEPARATION_PLANE below7, -1399 , -32731 , -652 , -32678
SEPARATION_PLANE below8, 1140 , 32743 , 532 , 32678
BGL_LIGHT LIGHT_NAV, -0.074, 0.052, 0.000, 20, 0.60, 0.40, 0FFF3ECC4h, 0.000000, 0.000000, 1.000000 ; source poly num = 1
below7 label word
below8 label word
WrongSide label word
BGL_RETURN

This seems to work too ;-)
 

Attachments

  • seplane4.jpg
    seplane4.jpg
    77.1 KB · Views: 430
Last edited:

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,859
Country
netherlands
Hi,

If you want different angles you would do it like this:

Code:
SEPARATION_PLANE above less2.2
   code
   JUMP end
label above
SEPARATION_PLANE above2 less2.7
   code
   JUMP end
label above2
   ...
   etc
   ...
label end

So if it is not below 2.2, you will jump to the next check. This will check if it is less than 2.9, if it is it must be above 2.2 as well (else the first one would have been true).
 
Messages
6
Country
australia
Thanks Arno

That makes sense will give it a try ;-) On another note how do I offset lights not at the origin, on light is 235 metres towrads the aircraft from the origin of the other Vasi lights?
 

arno

Administrator
Staff member
FSDevConf team
Resource contributor
Messages
32,859
Country
netherlands
Hi,

If possible I would make the lights always with a local origin nearby, that makes the tweaking a lot easier. So maybe you can split it into two files?

If that is not possible, you will have to use the 4th argument of the separation plane command to specify an offset of the polygon. The first three specify the orientation of the plane, the last the offset from the origin.
 
Top