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

FSXA automatic Landing Lights

Messages
56
Country
belgium
hello , i want to create a gauge or xml that makes my plane engages the landing lights below 10000 feet en disengages above 10000 feet.

can sombody create that for mé plz? ,
 
i am looking for help , here . otherwise i would look it up how , but its too much. i am a flyer not a disigner.
 
i am a flyer not a disigner.

And we're not the salvation army.

But since it's nearly Crapmas...

Code:
<?xml version="1.0" encoding="UTF-8"?>
<Gauge Name="Ldg lights" Version="1.0">
   <Element>
   <Shift>
   <Value>(A:PLANE ALTITUDE,feet) 10000 &gt;
(A:LIGHT LANDING, bool) 0 &gt;
and
if{ (>K:LANDING_LIGHTS_OFF) }
els{ (>K:LANDING_LIGHTS_ON) }</Value>
   </Shift>
   </Element>
</Gauge>

That should work. Maybe.

- Copy & paste into text file, save as "[something].xml" (no quotation marks)
- Create folder named "[blah]" (no quotation marks) in [FS9/X]\Gauges
- Put "[something].xml" into "[blah]"
- Open panel.cfg of the aircraft in question, copy and paste this after the last "gaugeXX=" line:
gaugeXX=[blah]![something],0,0,1,1

Make sure to replace "XX" with the next number in sequence.
- Save and close the panel.cfg and you're done.
 
Code:
<?xml version="1.0" encoding="UTF-8"?>
<Gauge Name="autolandlights">
   <Element>
   <Shift>
   <Value>(A:PLANE ALTITUDE,feet) 10000 &gt;
(A:LIGHT LANDING, bool) 1 &gt;
and
if{ (>K:LANDING_LIGHTS_OFF) }
els{ (>K:LANDING_LIGHTS_ON) }</Value>
   </Shift>
   </Element>
</Gauge>

first it did not work so i changed te gauge name then i changed the 0 to 1 next to light landing bool , now my landinglight burns always , olso above 10000 even at 14000 ft above the water . any ideas?
this is my entry in panelcfg in cesna172 under window00, gauge55=autolandlight!autolandlights, 0,0,1,1 and under VCockpit01
gauge19=autolandlight!autolandlights, 0,0,1,1
 
Hi cba999,

Just curious did you mange to get the landing lights function as intended ?

Thanks
Hash
 
Code:
<?xml version="1.0" encoding="UTF-8"?>
<Gauge Name="autolandlights">
   <Element>
   <Shift>
   <Value>(A:INDICATED ALTITUDE,feet) 10000 &gt;
(A:LIGHT LANDING, bool) 0 &gt;
and
if{ (>K:LANDING_LIGHTS_OFF) }
els{ (>K:LANDING_LIGHTS_ON) }</Value>
   </Shift>
   </Element>
</Gauge>

ok i changed PLANE ALTIDUDE to INDICATED ALTITUDE and LIGHT LANDING back to 0 , now its workin but not fully , so landinglights goes on below 10K and above 10K it starts to go on and off abaut 10 times a second , if i click on the landing lights above 10K it stays going on and off , so it works olmost , any ideas
 
Hi cba999,

Just curious did you mange to get the landing lights function as intended ?

Thanks
Hash
almost , stil workin on it , but i reseting my flight and restarting my sim for a 100 times to find the right code ,lol pfwiew
 
ok i changed PLANE ALTIDUDE to INDICATED ALTITUDE and LIGHT LANDING back to 0 , now its workin but not fully , so landinglights goes on below 10K and above 10K it starts to go on and off abaut 10 times a second , if i click on the landing lights above 10K it stays going on and off , so it works olmost , any ideas

Of course it's going to toggle on/off continuously since that's what you've told it to do...

Limit the condition to EQUAL TO ONE and it will work. Boolean variables can only be 0 or 1 (false or true), so it never makes any sense to check for more-than or less-than.

(A:LIGHT LANDING, bool) 1 ==

The logic in simple English is:

If aircraft is more than 10,000'
and
the landing lights are on
then
turn off landing lights
else
turn on landing lights

That is what this script does:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<Gauge Name="autolandlights">
   <Element>
      <Value>
         (A:INDICATED ALTITUDE,feet) 10000 &gt;
         (A:LIGHT LANDING, bool) 1 ==
         and
         if{ (>K:LANDING_LIGHTS_OFF) }
         els{ (>K:LANDING_LIGHTS_ON) }
      </Value>
   </Element>
</Gauge>
 
Am I missing something? Doesn 't

Code:
If aircraft is more than 10,000' 
and 
the landing lights are on
then
turn off landing lights
else
turn on landing lights

turn off the landing light off if it's on and the aircraft is more than 10000 ft but promptly turns it on when it's next executed - with the cycle repeating indefinitely?

Wouldn't

Code:
If aircraft is more than 10,000' 
then
turn on landing lights
else
turn off landing lights

do it - assuming no harm's done by turning on/off a light that's already on/off?
 
Last edited:
Am I missing something? Doesn 't

Code:
If aircraft is more than 10,000' 
and 
the landing lights are on
then
turn off landing lights
else
turn on landing lights

turn off the landing light off if it's on and the aircraft is more than 10000 ft but promptly turns it on when it's next executed - with the cycle repeating indefinitely?

AS I see it, if the aircraft passes through 10,000ft AND the landing lights are on, THEN the landing lights are turned OFF. IF the landing lights are already off as the aircraft passes through 10,000', THEN nothing happens.

If the aircraft comes back down below 10,000' with landing lights off, the condition is not met, and the lights are turned on.

Wouldn't

Code:
If aircraft is more than 10,000' 
then
turn on landing lights
else
turn off landing lights

do it - assuming no harm's done by turning on/off a light that's already on/off?

In this case, I see the logic to be that as the aircraft passes through 10,000ft, and the landing lights are already off, they'll be turned ON. ...
 
What I believe happens is that below 10000 ft the lights are always ON. Above 10000 ft they alternate (flicker) between ON and OFF

Code:
[B]Altitude/Lights         ON                  OFF[/B]
[B]Above 10000[/B]	Turn lights OFF      Turn Lights ON
[B]Below 10000[/B]	Turn Lights ON       Turn Lights ON
 
sigh....


Kindness is a cool thing.

thumbs-up_01.jpg I totally agree, Bill!
 
Back
Top