Jump to content

Recommended Posts

Guest Eugen

Hi,I am newbie trying to create an altimeter, I don't understand the syntax of the following values could someone be so kind and explain to me. (A:Indicated Altitude,feet) 100000 + 100000 % d 100 % 100 / r 100 / flr d 1 / 10 % flr r 1 % 9 == if{ + } and (A:Indicated Altitude,feet) 100000 + 100000 % 100 % 10 /What I would like to accomplish is to have an altimeter indicating single feet the above value indicates in units of 10 feet.Best regardsEugen

Share this post


Link to post
Share on other sites

:-hmmmI get confused everytime i try to see how it works.. The best way to understand is to use XMLgau01.zip ( Arne Bartels) docs and run through the formula one step at a time, and again and again.... Arne ?? you around ? You be the man for this... :-) Thank-You for all your help .. :-) I compiled a list of usable formulas for extracting numbers.. The snapped versions remove the rolling digits and snap to next value.To have scrolling tapes use original or based on original and remove the "flr" operator.For retrieving the ".01s" (High precision , scrolling ) 100000 + 100 * 10 % For retrieving the ".1s" ( high precision w/ snap ) 100000 + 100 * d 1 % r flr 100 % d 10 / flr r 10 % 9 == if{ + } -OR- (High precision based on original) 100000 + 10 * 10 % flr -OR- (ORIGINAL, scrolling) 10 * 10 % For retrieving the "ones" ( high precision w/ snap ) 100000 + 100 * d 1 % r flr 1000 % d 100 / flr r 100 % 99 == if{ + } -OR- (ORIGINAL, scrolling) 10 % For retrieving the "tens" ( high precision w/ snap ) 100000 + 100 * d 1 % r flr 10000 % d 1000 / flr r 1000 % 999 == if{ + } -OR- (High precision based on original) 100000 + 100 % 10 / flr -OR- (ORIGINAL) 100 % 10 / flr For retrieving the "hundreds" ( high precision w/ snap ) 100000 + d 1 % r flr 1000 % d 100 / flr r 100 % 99 == if{ + } -OR- (High precision based on original) 100000 + 1000 % 100 / flr -OR- (ORIGINAL) 1000 % 100 / flr For retrieving the "thousands" ( high precision w/ snap ) 100000 + d 1 % r flr 10000 % d 1000 / flr r 1000 % 999 == if{ + } -OR- (High precision based on original) 100000 + 100000 % 1000 % 100 / flr -OR- (ORIGINAL) 100000 % 1000 % 100 / flrMicrosoft originals Alt window 747.For "1s" scrolling - 10 %For "10s" snapped - s1 10 / 10 % flr l1 10 % 9 > if{ l1 10 % 9 - + }For "100s" snapped - s1 100 / 10 % flr l1 100 % 99 > if{ l1 10 % 9 - + }For "1000s" snapped - s1 1000 / 10 % flr l1 1000 % 999 > if{ l1 10 % 9 - + }For "10,000s" snapped - s1 10000 / 10 % flr l1 10000 % 9999 > if{ l1 10 % 9 - + }Hope this helps--- a little.. Sorry cannot describe how,, Would neeed half a bottle of aspirin to do so. :-8 *:-*Regards,RomanProject 737-400


20AUG21_Avsim_Sig.png?dl=1  FS RTWR   SHRS F-111   JoinFS   Little Navmap 
 

 

Share this post


Link to post
Share on other sites
Guest bartels

As Roman said, these are always the formulas that look most confusing. And I personally don't like to go through them, but I can of course if it's necessary, but not without paper and pencil to write down any single intermediate step to find out waht they are for. Roman did already gave a very good explanation, all I could do would be to write almost the same in my words (and that doesn't mean it would be easier to understand).Arne Bartels

Share this post


Link to post
Share on other sites
Guest Eugen

Hi again,Thanks for your help :-)I managed to work it out but I am not sure I understand it.I'don't want to give you a headache but I really appreciate if you could give some guidance to the values below. I'll try to explain and point to the parts that I don't understand? All right?100000 + 100 * d 1 % r flr 100 % d 10 / flr r 10 % 9 == if{ + } 100000 + {add hundred thousand to the altitude}100000 + 100 * { multiply with one hundred}100000 + 100 * d 1 % {duplicate stack 1 ???? why do we duplicate the stack?}100000 + 100 * d 1 % r flr { swap stack 1 and 2 why?? next smallest integer ?}100000 + 100 * d 1 % r flr 100 % {reamins 100?? how does remain work is it a string or integer variable that it is applied on?}Many thanks four support and helpBest regardsEugen

Share this post


Link to post
Share on other sites

Eugen, Alrighty where's the ibuprofen :-)Fist off I took the code and added S vars (store) after each operation.. I still donot understand why some things where done, all I know is if some items are taken out it doesn't work.. A visual like this may help.100000 + 100 * d 1 % r flr 100 % d 10 / flr r 10 % 9 == if{ + }becomes(G:Var1) 100000 + s1 100 * s2 d s3 1 % s4 r s5 flr s6 100 % s7 d s8 10 / s9 flr s10 r s11 10 % s12 9 == s13 if{ + s14 } s15(G:Var1) = 6.9999 for example, and we are retrieving the 0.1sG:Var1) 100000 + s1 (l1 = 100006.9999)l1 100 * ( l2 = 10000699.99 )l2 d ( l3 = 10000699.99 ) donot know why but removing the duplicate renders the formula useless. l3 1 % ( l4 = 0.99 ) donot know why but removing it renders the formula useless. I think may reflect a stack near the end of operation. l4 r ( l5 = 10000699.99 ) reverses stack with l2 hence the need for the previous duplicate l5 flr ( l6 = 10000699 )l6 100 % ( l7 = 99 )l7 d ( l8 = 99 )l8 10 / ( l9 = 9.9 )l9 flr (l10 = 9 )l10 r ( l11 = 99 ) reverses stack with l8 and hence the duplicate at l7 l11 10 % ( l12 = 9 )l12 9 == ( l13 = 1 )l13 if{ + } ( L14 = 9.99 ) adds stack l12 to l4 hence the need for the third op l15 = 9.99If G:Var1 = 6.9 l12 would = 0, l14 =0 and l15 = 9 So with the number 6.999 means we are in the middle of the "snap" to 0...Just doing this now sheds some light for me too.... Re: headache, well had too much fire water last night so this didn't help... Maybe hit the bottle again to cure it.... Just kiddin :-lolPS Boy is AVSIM slooooooooooooow today.Regards,RomanProject 737-400Note, the way it looks here on the forum is different since HTML has processed it. On paper the " < " would be " & l t ; " , the " > " would be " & g t ; " and the " & " would be " & a m p ; ". All without the quotes and remove spaces between characters.


20AUG21_Avsim_Sig.png?dl=1  FS RTWR   SHRS F-111   JoinFS   Little Navmap 
 

 

Share this post


Link to post
Share on other sites
Guest Eugen

Many thanks Roman :-)I'll study it carefully, I'll think that I need to dig a bit about c-programming, I am a delphi guy :-). Btw how is it going with your xml explorer?BrgdsEugen

Share this post


Link to post
Share on other sites

Eugen, The XMLExplorer project is stalled.... But very usable.. I use exclusivly for the 737-400 project I am invovled in.. It is available by e-mailing me @ spokes2112@new.rr.com .. I really need some one to step in and make some VB or some script to convert all the variables into a database.. ( I just donot have time to learn ) I would then call it done.. ( Many of the items I wanted to do are shelved. ) Regards,RomanProject 737-400


20AUG21_Avsim_Sig.png?dl=1  FS RTWR   SHRS F-111   JoinFS   Little Navmap 
 

 

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