Jump to content
Sign in to follow this  
Guest

XML Gauge question

Recommended Posts

Guest danowat

Hi All,I have been trying to make some gauges in XML, using the baron ones as a `Template`.I have made a RPM gauge which works as I would like, but know I want to have a numerical display of the RPM as well as the needle ,on the same gauge.I can't seem to figure out how to do this.Thanks in advanceDan.

Share this post


Link to post
Share on other sites

Dan, Take a look at the Baron clock, It will show you what a "string" is..A can do many things, just as you described and more. But... Not having the right "syntax" can lead to problems. An example may be...%RPM = %((A:General eng1 rpm, rpm))%!6.2f!%Where, when printed out in the locaton as described by the tags / (other... X= /Y= /Axis etc.... ) will give you the always visible "RPM =" followed by the RPM number printed in the format where there are 2 significant digits after the decimal... (The print code... IE !6.2f! ) The only place ( I know ) so far to inquire about print codes is what Arne has provided in XMLgau01.zip here at the AVSIM library. Just an example and not tested..A string has a different "syntax" overall than does the the normal XML style and if not done correctly may foul things up badly. Try and experiment using a variable you need... I.E. RPM Hope this helps... 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 danowat

Hi Roman,Thank you very much for your response, I will have a go tonight when I get home.Also do you know of any xml gauge tutorials?.I find it quite infuriating that xml gauges seem to be easy and very difficult at the same time.Best WishesDan.

Share this post


Link to post
Share on other sites
Guest danowat

Hi Roman,I tried it last night, and it works like a dream.ThanksDan.

Share this post


Link to post
Share on other sites
Guest

>%RPM = %((A:General eng1 rpm, rpm))%!6.2f!% Hi, Roman!Actually, since RPM gauges rarely require such precision, !6d! will work better. Note the "signed integer, d" instead of "f", since no decimal precision is required.The "unsigned integer, u" could also be used, since RPM rarely goes negative... :) But, it also has the unfortunate effect of being left justified, which just looks strange!You know, having a precision graphical display of CHT/EGT sure puts engine management into better perspective. I am going to try programming in the EDM 700's optional display of "shock cooling" temperature, along with a couple of other neat features, such as "Find Lean," a tool used to determine the optimum leaning for mixture, that will balance the EGT/CHT across all cylinders.I'm not going to bother with the 'Fuel Management,' on the EDM, since I've got to create a Shadin Fuel Management System anyway.See ya later, bye! :)

Share this post


Link to post
Share on other sites
Guest bartels

In my experience a format in float has some advantages, mainly it includes a proper rounding. If you use !...d! the decimals are cut away, if you use !... .0f! it is proper rounded (the same effect is possible with a 'near' as last operation before printing and a !d! format,of course).Arne Bartels

Share this post


Link to post
Share on other sites
Guest

>In my experience a format in float has some advantages, >mainly it includes a proper rounding. If you use !...d! the >decimals are cut away, if you use !... .0f! it is proper >rounded (the same effect is possible with a 'near' as last >operation before printing and a !d! format,of course). >Arne Bartels Thanks for the additional insight, Arne! It's much appreciated...I'm beginning to get the 'hang' of XML gauge construction (I hesitate to actually call it 'programming')!! :) I find that I'm able to put even something as complex as the EDM 700 CHT/CGT gauge together in just a couple of hours...

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