Jump to content
Sign in to follow this  
Guest bartels

stuck with some xml code

Recommended Posts

Guest Eugen

Hi,I am stuck with some xml code that I cant get to work. Seems that only the airspeed is shown ??any help is very appreciated.BrgdsEugen %((A:Airspeed select indicated or true, knots) (A:Total weight, lbs) 100000 - 1000 / 0.914 * 171 +)-)%!05d!(A:indicated or true, knots)((A:Total weight, lbs) 100000 - 1000 / 0.914 * 171 +) -

Share this post


Link to post
Share on other sites
Guest bartels

Apart from the fact that I can't make out what you want to achieve, there are too much brackets in both lines. <String> has a ")" between + and - which won't work. The <Value.. line has an opening bracket "((A:Total..." and the closing bracket between + and -, which won't work. You can't use brackets this "mathematical" way in XML-gauges (they seem to be treated as comments), apart from that the reverse polish notation of XML gauges has already an effect similar to bracketing, provided your formula is correct of course.(A:indicated or true, knots) (A:Total weight, lbs) 100000 - 1000 / 0.914 * 171 + -First (A:indicated or true, knots) is stacked for later use, then (A:Total weight, lbs) 100000 - 1000 / 0.914 * 171 +consists of stacking (A:Total weight, lbs) and then proper pairs of cvalues and binary operators follow, so the above expression is calculated and with the last - the result is combined with the first stacked value: no bracketing needed (apart from the impossibility of bracketing).The resulting calculation is:(A:indicated or true, knots)-((((A:Total weight, lbs)-100000)/1000)*0.914+171)Is that what you wanted? Then remove the unnecessary brackets and it should work.Arne Bartels

Share this post


Link to post
Share on other sites
Guest Eugen

Thanks it worked! :-)What I am is doing is to calculate different speed values like clean config green dot, vfe, vfe next v1 v2 etc showing them on a speedtape. I was bit tired last night so missed the airspeed oops but you handled it anyway :-). I learned something new about brackets, I had until now always thougt that they are needed to capsule expresion.BrgdsEugen

Share this post


Link to post
Share on other sites
Guest bartels

Brackets only to get events or variables like (A:...) (P:...) (G:...) (L:...) (>K:...) (>G:...) (>L:...).Or to encapsule experssions within strings, they are always relaed to "%"s. <String>%(...)%!f!</String>Otherwise brackets aren't allowed except maybe for comments...(* this is a comment inside an expression *)...Arne Bartels

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