Sign in to follow this  
Au MaV

XML fuel gauge with a twist

Recommended Posts

HiThis is gunna be hard to explain:)Ive built a fuel gauge which is an old floating ball type which has been animated in FSDS as concord nose.Now I know I can set the concord nose at different angles by using the default concord gauge for the visor/nose and watching the ball move in fs9 to up(full) 1/2 and down (emty).Now what I need to do is work out the syntax linking it to fuel quantitywith the concord nose possie,so far I have the following syntax(A:FUEL TOTAL QUANTITY,gallons)(A:FUEL TOTAL CAPACITY,gallons)(>K:DECREASE_CONCORDE_NOSE_VISOR)(>K:INCREASE_CONCORDE_NOSE_VISOR)and I put them together like this :)%((A:FUEL TOTAL QUANTITY,gallons) (A:FUEL TOTALCAPACITY,gallons) / 100 *)%!d! if{ 100 (>K:DECREASE_CONCORDE_NOSE_VISOR) } els{ (>K:INCREASE_CONCORDE_NOSE_VISOR) } But even though the ball moves in the op direction it stays there no matter how much fuel,what I really need is for it to move in increaments as fuel is added/removed.I know I could just make a simple xml gauge with BMP'S,but Im trying to limit myself to just 2 panel pollys to keep gauges as smooth as possible in the VCThanks in Advance Warwick

Share this post


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

Maybe try this, it takes the same basic code, stores it in a temp memory and then it compares it to what position the concorde nose is in before moving it. This is done using whole numbers so the gauge is not always active adjusting the nose for every tenth of gallon perse.%((A:FUEL TOTAL QUANTITY,gallons) (A:FUEL TOTALCAPACITY,gallons) / 100 * s1)%!d! l1 int (A:CONCORDE VISOR POSITION PERCENT, percent) int > if { (>K:DECREASE_CONCORDE_NOSE_VISOR) } els{ l1 int (A:CONCORDE VISOR POSITION PERCENT, percent) int < if{ (>K:INCREASE_CONCORDE_NOSE_VISOR) } }BTW not sure what your doing with the string... so just left it there. Regards,Roman(KGRB)

Share this post


Link to post
Share on other sites

Thanks for the replyI have no Idea either as to why the sting value :) Thought it was a formular to calc the fuel level (hey Im a dweeb when it comes to code :D )I think I see what your doing with the above code so Ill hit the SDK and see if I cant get it to work Thanks Warwick

Share this post


Link to post
Share on other sites

Ok Im beat :)Nothing I try works all that happens is the nose stays lockedwhy oh why duz XML have to be so hard :)Ive droped the sting value this is what Ive got (FUEL TANK CENTER LEVEL,gallons) l1 int(A:CONCORDE VISOR POSITION PERCENT, percent) int > if{ (>K:DECREASE_CONCORDE_NOSE_VISOR) } els{ l1 int(A:CONCORDE VISOR POSITION PERCENT, percent) int < if{(>K:INCREASE_CONCORDE_NOSE_VISOR) } } ThanksWarwick

Share this post


Link to post
Share on other sites

Hi,You could try: (A:FUEL TOTAL QUANTITY,gallons) (A:FUEL TOTAL CAPACITY,gallons) / 100 * (A:CONCORDE VISOR POSITION PERCENT, percent) > if{ (>K:DECREASE_CONCORDE_NOSE_VISOR) } els{ (>K:INCREASE_CONCORDE_NOSE_VISOR) }May be it helps,Jan"Beatus Ille Procul Negotiis"

Share this post


Link to post
Share on other sites

Nope still no go:( I was wondering if there is any way to tie in percent of concord nose using this gauge (its plan B if the animation link is a no go)(A:Fuel tank center quantity,gallons) Using the item value above is there anyway of inserting a concord nose percent say of 1/5 of each step so the nose animation is locked into each item value?Thanks for ya help keep the ideas comming :)Warwick

Share this post


Link to post
Share on other sites

Hi,I have no experience with the Concorde Nose.I could imagine that the command Increase or Decrease does deploy the Nose right from Up to Down vv.In that case you only have 2 positions.But if not, may be you can use one of the A:Var's like CONCORDE_VISOR_POS_PCT to give Inc and Dec commandsFor example:(CONCORDE_VISOR_POS_PCT,percent) s0 19 < if{ (>K:INCREASE_CONCORDE_NOSE_VISOR) } els( l1 20 > if{ (>K:DECREASE_CONCORDE_NOSE_VISOR) } }etc.In this case the Nose should stay between 19 and 20%.The drawback is a continuus firing of commands.You can link now this position with the amount of fuel (I think)May be an idea,Jan"Beatus Ille Procul Negotiis"

Share this post


Link to post
Share on other sites

HiThanks for all the help but after 2 days it looks like its a to hard basket case :D,have decided to go with the extra panel and a bmp xml gauge.heres what Im working on if ya interested :)Thanks againWarwick

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