Sign in to follow this  
rcbarend

Automatic Control of Afterburners in FS9

Recommended Posts

Hi,Can anyone suggest why this code does not work: (A:general eng1 throttle lever position,part) 0.805 > (A:Turb eng1 N1,percent) 89 > && if{ (A:Turb Eng1 Afterburner,bool) ! if{ 1 (>K:TOGGLE_AFTERBURNER1) } } els{ (A:Turb Eng1 Afterburner,bool) if{ 1 (>K:TOGGLE_AFTERBURNER1) } } Afterburners are enabled in the aircraft.cfg. 1 (>K:TOGGLE_AFTERBURNER1)in another gauge on the same panel toggles A/B1 fine but no way does the automatic code either turn the A/B on or off.Trevor.

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

You have missed the point of this question.I am trying to control the Afterburners in an F-15 Eagle, not trying to control a sound file.FYI I have my own sound control files for XML in FS9 using either ADF or Prop variables.Trevor.

Share this post


Link to post
Share on other sites

I haven't checked, but one possible point: there is often not a direct response between K: toggle-event and the associated A: variable. It might be necessary to wait a short period before firing the K: event again, but again it might also be something else, I haven't checked.Arne Bartels

Share this post


Link to post
Share on other sites

Hi Trevor,I tried this, which is your code except the "1" for the toggle event (not needed). (A:general eng1 throttle lever position,part) 0.805 > (A:Turb eng1 N1,percent) 89 > & if{ (A:Turb Eng1 Afterburner,bool) ! if{ (>K:TOGGLE_AFTERBURNER1) } } els{ (A:Turb Eng1 Afterburner,bool) if{ (>K:TOGGLE_AFTERBURNER1) } } Works fine ...So it must be something else..Are you sure you made the 2D cockpit visible at least once (if you added the gauge to a [Window**] section ?Rob

Share this post


Link to post
Share on other sites

Hi,Tried it and it works ok.Only in my case i hear only an endless amounts of "Clicks" because i still use the afterburner1 event for a "click" sound using late B. Morad's xml-sound gauge.I enabled afterburner in aircraft.cfg and airfile, but no effect on the 767-300.Jan"Procul Negotiis"

Share this post


Link to post
Share on other sites

Hi Guys,Thanks for your efforts. I have discovered the source of my problems.The code I posted was part of one section from an omnibus XML gauge which I use to perform initialisations and various calculations which are used in more than one gauge and which presents no visible image on the aircraft panel. (It has a 10x10 pixel transparent image just to make it easy to position using Panel Studio or similar)I have known for some time that there is a limit to how much code can be put in one section and have all the calculations and decisions perform properly, but I can now report that in gauges with a number of different elements it appears that (>K:XXXXXXXXXXX) commands within the code do not (always) perform. The moment I did as you guys had done and created a dedicated gauge for A/B control everthing worked a treat, even when I added the second half of the code to control No 2 engine afterburner.Trevor

Share this post


Link to post
Share on other sites

Hi Trevor,""I have known for some time that there is a limit to how muchcode can be put in one section""Yes, I have also stumbled on that problem once.But are you saying that also the number of ... sections is limited ??Rob

Share this post


Link to post
Share on other sites

Rob"are you saying that also the number of ... sections is limited ??"No, but it appears that if you embed something of the form(>K:TOGGLE_SOME_CONTROL)in the .... code of 3rd or 4th ... section of an omnibus gauge the event is not triggered!!!This is the only way to explain the problem I encountered with my original Afterburner control logic.Trevor.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this