Jump to content
Sign in to follow this  

Recommended Posts

Guest

Hi all,Can someone write me an XML gauge which does the following:(a bit in VB style, I think it's the best way to describe it)If WingsAreFolded = True then Throttle%Max = 10% 'or 5% has to be decided yetElse Throttle%Max = 100%End ifWhat I want to accomplish here is that if the wings are folded then the aircraft shouldn't be able to reach a speed beyond the taxispeed.Thanks in advance.[/Edit]Also, can someone point me to a link of a tutorial on how to write XML gauges. Some dummy guide or so. I know quite a few programming languages (C#.NET, Java, JSP, PHP, VB & VBA), but I've never tried XML (which is what? a structure language?). Thanks!

Share this post


Link to post
Share on other sites
Guest Eugen

Look for Arne Bartel's xml gauge tutorial in the file lib.BrgdsEugen

Share this post


Link to post
Share on other sites
Guest

Thanks! If I understood everything well sofar then this should be the code for what I'm trying to accomplish (can't test it right now cause I haven't gor FS installed at work...): (A:FOLDING WING RIGHT PERCENT, percent) 1 >(A:GENERAL ENG1 THROTTLE LEVER POSITION, percent) 10 >

Share this post


Link to post
Share on other sites
Guest bartels

Almost, what you've done is reading two variables, but you haven't limited the throttle.try <Value>(A:FOLDING WING RIGHT PERCENT, percent) 1 > if{ (A:GENERAL ENG1 THROTTLE LEVER POSITION, percent) 10 > if{ 16384 0.1 * int (>K:THROTTLE1_SET) } }</Value>See also one recent message thread by Mathis Lieberecht for limiting throttle movement.Arne Bartels

Share this post


Link to post
Share on other sites
Guest

Very cool! Thanks Arne. Additional question though as I'm of the other programming side. I'm used to threading to keep checking the value. Do I need to do this here aswell? Also as far I understand the code: it also reads two values and then sets the throttle. What I would like to do is read the wing fold percentage and if the condition is met limit the throttle to maximum of 10% of normal maximum power.Thanks.

Share this post


Link to post
Share on other sites
Guest bartels

To actually control the power to 10% you ned a lot of code to makesomething like an autothrottle. Much simpler is to estimate at which throttle setting the power is 10% by trying. Then you can use these values for the trhottle gauge. Be aware that ...THROTTLE POSITION,percent) gives a value between 0 and 100, whereas (>K:THROTTLEx_SET) needs values between 0 (idle) and 16384 (full power).Arne BartelsP.S. all gauges are executed repeatedly, so placing some "active" code in a gauge leads to repeatedly execution (usually 18 times per second).

Share this post


Link to post
Share on other sites
Guest

Hehe, nothing to worry then about threading. :) Arne, thank you very much for the information. As I'm getting more and more into this XML gauges stuff I think it is very well possible to make a very sophisticated airplane model.To illustrate to what this gauge is good for: "Don't you just hate when passenger planes actually can depart with open doors or have them open during flight?" What I'm going to do is bind the doors to wingfolding event and then limit the max throttle so you actually can taxi, but never will reach a speed above the max taxispeed. Quite a thought, right?

Share this post


Link to post
Share on other sites

Hi,To prevent a takeoff with open doors, i use this one, fun too!It uses the emer lights switch on the overhead panel.(A:CANOPY OPEN,bool) (L:doors,bool)doors open!0 (>K:TOGGLE_ENGINE1_FAILURE) (>K:TOGGLE_ENGINE2_FAILURE) (K:TOGGLE_AIRCRAFT_EXIT,bool) ! (>K:TOGGLE_AIRCRAFT_EXIT,bool) (L:doors, bool) ! (>L:doors, bool) 1 (>K:TOGGLE_AFTERBURNER1)http://community.webshots.com/storage/1/v4...75aouncN_th.jpg

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