Sign in to follow this  
Au MaV

COWLFLAP1_SET xml gauge Help

Recommended Posts

HiIm trying very badly to link the cowl flaps animations to fuel level.I know I asked about it in another thread,but that was concord nose animation which didnt work.So Im back to the prob but this time using the cowl flaps,as I can now use the _set comand.This works kind of :) (A:FUEL TOTAL QUANTITY,gallons) 20 > if{ (A:RECIP ENG1 COWL FLAP POSITION, percent) 95 < if{ 16383 (>K:COWLFLAP1_SET) } } els{ 2 < if{ (A:RECIP ENG1 COWL FLAP POSITION, percent) 5 > if{ 0 (>K:COWLFLAP1_SET) }}But what I need is min 3 settings(full 1/2 empty) prefered 5 (full 3/4 1/2 1/4 empty) at present the gauge only has 2 full and empty Any help much appreciatedThanksWarwick

Share this post


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

(A:FUEL TOTAL QUANTITY,part) 4 * near 4 / s0 16383 * s1 (A:RECIP ENG1 COWL FLAP POSITION, part) l0 != if{ l1 (>K:COWLFLAP1_SET) } Should work for what you were asking. If I recall your previous thread, you are looking to make a fuel gauge float... Do you really want it to have only 0, 1/4, 1/2, 3/4, and full as it's possible indications? It's even simpler to have a smooth animation by using the following: (A:RECIP ENG1 COWL FLAP POSITION, part) (A:FUEL TOTAL QUANTITY,part) != if{ (A:FUEL TOTAL QUANTITY,part) 16383 * (>K:COWLFLAP1_SET) }

Share this post


Link to post
Share on other sites

Here's a possible way, not tested but, in theory should work. Also gives 100 different settings and can work with any aircraft.(A:FUEL TOTAL QUANTITY, gallons) (A:FUEL TOTAL CAPACITY, gallons) / 100 * near 163.84 * s1 d (A:RECIP ENG1 COWL FLAP POSITION, number) != if{ l1 (>K:COWLFLAP1_SET) }1. Find the ratio of fuel available to the total capacity2. Multiply by 100, use the nearest integer function to get nearest whole percentage3. multiply by 163.84 to get a value for camparing and setting cowl flap4. store it for later use and duplicate it for the next part.5. this part will work as long as (A:RECIP ENG1 COWL FLAP POSITION, number) returns a number of 0 - 16384, if not see below. If it does, compare the current calculated fuel number to the current cowl position. If equal do nothing, else go to # 66. Use the stored calculated fuel number to set cowl flaps. (A:FUEL TOTAL QUANTITY, gallons) (A:FUEL TOTAL CAPACITY, gallons) / 100 * near 163.84 * s1 d (A:RECIP ENG1 COWL FLAP POSITION, percent) 163.84 * near != if{ l1 (>K:COWLFLAP1_SET) }By using a whole percentage number it will keep the gauge system from continually firing away at the (>K:COWLFLAP1_SET) causing the multiple keyboard command lockout. Regards,Roman

Share this post


Link to post
Share on other sites

Dan, same time response :-) basically the same thing :-)Regards,Roman

Share this post


Link to post
Share on other sites

>Dan,>> same time response :-) basically the same thing :-)>>Regards,>RomanThus proving that there's more than one way to do it :) Actually, I made the assumption that you can get (A:TOTAL FUEL QUANTITY) as a "PART" type variable... I know it works for individual fuel tanks. It may be that you need to divide the quantity in gallons by the capacity in gallons to synthesize your own fuel qty fraction.Dan

Share this post


Link to post
Share on other sites

>Hi>Im trying very badly to link the cowl flaps animations to fuel>level.I just have to ask "why cowlflaps?" Are you using FSDS2 so custom XML animations aren't available (yet)?

Share this post


Link to post
Share on other sites

HiThanks for the response but no luck with the above The fuel level is acting like its stuck on 0 (empty)The total fuel is 22 gal and in 1 center tank,Ive checked the airfile/aircraft.cfg and all looks ok. The fuel gauge float responds to the deafult keystroks so Im assuming that there is nothing missing thereBill yes this is for fsds Im trying to keep the VC panel to 1 by using unused animations as gauges (at the rate Im going The FSDS update will be out :D ) ThanksWarwick

Share this post


Link to post
Share on other sites

Warwick,After replying,, no matter how it's done my example has 2 major flaws after looking at it a 2nd time..( it was never tested, just theory )If you are still boggled, send me a private E-mail, glad to help out.. I'd give it a few tests beforehand.Regards,Roman

Share this post


Link to post
Share on other sites

Hi Im still waiting to hear back from Roman not complaining just keeping the subject warm :Dok Heres what Ive got so far its rough but works (sort of) as you can see Im getting a consistant firing of the K:COWLFLAP1_SET,any suggestions for shutting it up once its at the setting.The General Eng1 Fuel Valve,bool is to tie the gauge to the fuel valve and is not needed it was just my feeble attempt at trying to give the gauge somthing else to do (didnt work :( )ThanksWarwick (A:FUEL TOTAL QUANTITY,gallons) 20 > if{ (A:RECIP ENG1 COWL FLAP POSITION, percent) 100 < if{ 16383 (>K:COWLFLAP1_SET) } } els{ (A:General Eng1 Fuel Valve,bool) ! if{ 0 (>K:COWLFLAP1_SET) } } (A:FUEL TOTAL QUANTITY,gallons) 20 < (A:FUEL TOTAL QUANTITY,gallons) 15 > and if{ (A:RECIP ENG1 COWL FLAP POSITION, percent) 100 < if{ 12700 (>K:COWLFLAP1_SET) } } els{ (A:General Eng1 Fuel Valve,bool) ! if{ 0 (>K:COWLFLAP1_SET) } }(A:FUEL TOTAL QUANTITY,gallons) 15 < (A:FUEL TOTAL QUANTITY,gallons) 8 > and if{ (A:RECIP ENG1 COWL FLAP POSITION, percent) 100 < if{ 8700 (>K:COWLFLAP1_SET) } } els{ (A:General Eng1 Fuel Valve,bool) ! if{ 0 (>K:COWLFLAP1_SET) } }(A:FUEL TOTAL QUANTITY,gallons) 8 < (A:FUEL TOTAL QUANTITY,gallons) 2 > and if{ (A:RECIP ENG1 COWL FLAP POSITION, percent) 100 < if{ 4300 (>K:COWLFLAP1_SET) } } els{ (A:General Eng1 Fuel Valve,bool) ! if{ 0 (>K:COWLFLAP1_SET) } }(A:FUEL TOTAL QUANTITY,gallons) 2 < if{ (A:RECIP ENG1 COWL FLAP POSITION, percent) 100 < if{ 10 (>K:COWLFLAP1_SET) } } els{ (A:General Eng1 Fuel Valve,bool) ! if{ 0 (>K:COWLFLAP1_SET) } }

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