Jump to content
Sign in to follow this  
phjvh

Transponder

Recommended Posts

Guest Eugen

Hi,Got 2 questions about xml.1. Is it possible to assign a value to the transponder variable ?2. is it possible to concatenate 4 L-vars into one new L-var ?BrgsEugen

Share this post


Link to post
Share on other sites

Eugen,Yes, you can use the K:XPNDR_SET event. Note that it takes a binary coded decimal as an argument.To set the transponder to 1350, you would use 4944 as your argument.(0 * 16^0) + (5 * 16^1) + (3 * 16^2) + (1 * 16^3) = 4944Not sure about concatenating L:Var's...Doug Dawson

Share this post


Link to post
Share on other sites
Guest Eugen

Thanks, Doug,Then I could probably use the scheme from Arne Bartels in FAQ 19.brgdsEugen

Share this post


Link to post
Share on other sites

Eugen,Had once succes with something like this one, though not sure: (L:One,enum) a == (L:Two,enum) b == (L:Three,enum) c == (L:Four,enum) d == && && && if{ (>L:Five,enum) } The resulting value (L:Five,enum) is usable elsewhere in a formula if needed. If this is what you mean.Jan"Procul Negotiis"

Share this post


Link to post
Share on other sites
Guest Eugen

Jan,What I want to do is for example I have 4 L-vars L1=1 L2=2 L3=3 L4=4 and I wanto to concatenate them to L5=1234BrgdsEugen

Share this post


Link to post
Share on other sites
Guest Karl R Pettersen

Something like: (L:V1,enum) 1000 * (L:V2,enum) 100 * + (L:V3,enum) 10 * + (L:V4,enum) + (>L:V5,enum)Haven't tried, but should work as "number concatenating"? Then you need to change this octal (decimal=) into a binary coded decimal as desribed in the faq and use the XPNDR_SET command.

Share this post


Link to post
Share on other sites

Eugen,Not sure, But a guess:Do you want to change numbers by the L:Var's and Set them to a transponder code with XPNDR_SET?See Karl!But there is still the normal way.Jan"Procul Negotiis"

Share this post


Link to post
Share on other sites
Guest Eugen

Hi Guys,Yeah this was what i was looking for, thanks for your help.I wonder if it is possible to create concatenation with letters as well any ideas?BrgdsEugen>Eugen,>>Not sure, >But a guess:>Do you want to change numbers by the L:Var's and Set them to a>transponder code with XPNDR_SET?>See Karl!>But there is still the normal way.>>Jan>>"Procul Negotiis"

Share this post


Link to post
Share on other sites

Eugen,Just tested this one a little bit: (G:Var4) (G:Var3) 16 * + (G:Var2) 256 * + (G:Var1) 4096 * + (>G:Var5) %((G:Var5))%!4d! (G:Var5) (>K:XPNDR_SET)Of course you have to set the G:Var's like: (G:Var1) 1 - 0 max (>G:Var1) (G:Var1) 1 + 7 min (>G:Var1)etc.Works, i think.Jan"Procul Negotiis"

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