January 3, 200323 yr 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!
January 3, 200323 yr 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 >
January 3, 200323 yr 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
January 3, 200323 yr 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.
January 3, 200323 yr 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).
January 3, 200323 yr 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?
January 3, 200323 yr Author 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 Jan "Beatus ille qui procul negotiis..."
Create an account or sign in to comment