Search the archive:
YaBB - Yet another Bulletin Board
 
   
 
Page Index Toggle Pages: 1
Send Topic Print
Need help with an XML code that doesn't work. (Read 488 times)
Mar 13th, 2006 at 9:35am

DeepSpace   Offline
Colonel
I love to fly!
Israel

Gender: male
Posts: 434
*****
 
Hi. I'd appreciate it if someone would be able to tell me why the following XML code doesn't work... Thanks in advanced.

<Gauge Name="FS2004 vapor trails Control" Version="1.0">
  <Comment>This gauge controls vapor trails when taking off and landing in a humid air.
   </Comment>
  .
  <Element>
  <Select>
  <Value>(A:AIRSPEED INDICATED, number) 140 > (A:LIGHT CABIN,bool) ! && if{ (>K:TOGGLE_CABIN_LIGHTS) } (A:AIRSPEED INDICATED, number) 165 < (A:LIGHT CABIN,bool) && if{ (>K:TOGGLE_CABIN_LIGHTS) }</Value>
  </Select>
  </Element>
</Gauge>
 
IP Logged
 
Reply #1 - Mar 13th, 2006 at 2:30pm

microlight   Offline
Colonel
It's a bird...
Southern UK

Gender: male
Posts: 2236
*****
 
I have very similar logic in a gauge that I wrote that does something very similar, but it works off the smokesystem rather than the cabin lights. This turns the smokesystem on if three targets are met:

<Value>(A:RADIO HEIGHT,feet) 100 > if{ (>K:SMOKE_ON) } els{ (>K:SMOKE_OFF) } (A:INDICATED ALTITUDE,feet) 9000 < if{ (>K:SMOKE_ON) } els{ (>K:SMOKE_OFF) } (A:KOHLSMAN SETTING MB,millibars) 1014 < if{ (>K:SMOKE_ON) } els{ (>K:SMOKE_OFF) } (A:TOTAL AIR TEMPERATURE,farenheit) 40 < if{ (>K:SMOKE_ON) } els{ (>K:SMOKE_OFF) }
</Value>

I have 'if' amd 'els' arguments, whereas yours have no 'els' arguments. Another difference is that my gauge uses A variables with numerical values as switches. I haven't had much luck either with boolean logic.

Let us know how you get on.

Wink
 

...
BAe ATP for FS9 now available! www.enigmasim.com
IP Logged
 
Reply #2 - Mar 13th, 2006 at 2:42pm

DeepSpace   Offline
Colonel
I love to fly!
Israel

Gender: male
Posts: 434
*****
 
Thanks for the reply Smiley
I'm not sure I'm fully getting the logic behind your code.
Does it mean that if the radio height is more than 100 feet , the indicated alt. is less than 9000 feet and the weather conditions are as written the smoke system will kick in?
It looks like only one of these is needed inorder for the smoke system to work.

Also, would it work the same way if instead of (>K:SMOKE_ON) and (>K:SMOKE_OFF) I'll use (>K:TOGGLE_CABIN_LIGHTS)?

Thanks a lot for your help  Wink
« Last Edit: Mar 14th, 2006 at 12:52am by DeepSpace »  
IP Logged
 
Reply #3 - Mar 14th, 2006 at 1:00am

DeepSpace   Offline
Colonel
I love to fly!
Israel

Gender: male
Posts: 434
*****
 
Also, could it be that the gauge is not loaded correctly into the panel?  I put this line in the panel.cfg file:

gaugexx=y!name_of_xml_file, 0,0,20,20

of course, "xx" is a number following the gauge before, and "y" is a name of a folder inside the gauge folder where the xml gauge is in.
 
IP Logged
 
Reply #4 - Mar 14th, 2006 at 4:21am

microlight   Offline
Colonel
It's a bird...
Southern UK

Gender: male
Posts: 2236
*****
 
What it means is that there have to be a combination of circumstances before the smoke kicks in: that is, the height has to between 100 and 9000 feet, the temperature has to be less than 40F and the pressure has to be less than standard before the vortices show up.

Wink
 

...
BAe ATP for FS9 now available! www.enigmasim.com
IP Logged
 
Reply #5 - Mar 14th, 2006 at 5:31am

DeepSpace   Offline
Colonel
I love to fly!
Israel

Gender: male
Posts: 434
*****
 
Got it, will give it a try. Smiley
 
IP Logged
 
Reply #6 - Mar 14th, 2006 at 5:44am

DeepSpace   Offline
Colonel
I love to fly!
Israel

Gender: male
Posts: 434
*****
 
I've gotta be doing something wrong, because it doesn't work for me  Sad Cry
 
IP Logged
 
Page Index Toggle Pages: 1
Send Topic Print