Jump to content
Sign in to follow this  
phjvh

Is it possible in XML to do.......

Recommended Posts

Guest danowat

Hi,Is it possible, in XML, to create a gauge that reads, oil pressure or oil temperature or both, then once a particular pressure or temperature is reached starts a counter and when this counter hits a certain number causes the planes engine/s to stop?.CheersDan.

Share this post


Link to post
Share on other sites

You mean:If the set temp/pressure is exceeded, the counter is incremented. And when both temp/pressure drop below the set value, and then exceed it again, the counter is incremented again.And this repeats untill the counter exceeds a set maximum.This is very easy to make in XML (about 10-20 lines of code), for one engine. Even to make the pressure/temp threshold and counter settable (via mouseclicks), but that's more work of course.Would be a nice exercise to learn XML gauge programming :-)Rob

Share this post


Link to post
Share on other sites
Guest danowat

Hi Rob,Yes thats exactly what I am after.How would I even start to program this in XML, I have "dabbled" in XML before but really simple stuff, ASI, VSI etc.I had a look at the thread mention, but unfortunatly I cannot really understand it.Could someone give me a leg up in this, just to get me started?.Thanks very muchDan.

Share this post


Link to post
Share on other sites

Hi Dan,Just an example, this one should work:(A:General eng1 oil temperature,celsius) 100 > if{ (G:Var1) 0 == if{ 1 (>G:Var1) (P:Local Time, seconds) 10 + (>G:Var2) } } els{ 0 (>G:Var1) } (G:Var1) 1 == if{ (P:Local Time, seconds) (G:Var2) > if{ (>K:MIXTURE1_LEAN) } }If oil temperature gets higher than 100, the engine will shut off after 10 seconds.When you manage to keep temp below 100, nothing will happen.Variations in time and parameters are possible of course.Jan"Procul Negotiis"

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  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...