Sign in to follow this  
Guest philstix

Metric fuel gauge XML

Recommended Posts

Having been unable to find any metric fuel gauges (litres + litres per hour) I've belatedly decided I'll have to write my own in XML.I've seen comments in the forum that the FS2004 XML will return fuel quantities in litres and flow rates in litres per hour, and a 'Units' file I found on FS2X.com lists both as available (albeit spelt 'liters').When I tried modifying the XML for the default Beech Baron 58 from (A:Eng fuel flow GPH:@ENGINE_NUMBER,gallons per hour)to (A:Eng fuel flow LPH:@ENGINE_NUMBER,liters per hour)it didn't work. Of course, this may be because the 'LPH' part is just a guess on my part - unfortunately I haven't been able to find anything about programming XML fuel gauges in metric units. I did notice that with FS2004 set to display metric units, the tooltip for the fuel flow gauge always displays '0 liters per hour', so it appears there's a bug in the default code as well.By now you've realised I'm a complete newb at this (although I do have C and C++ programming experience) so if anybody can point me in the right direction I would be very appreciative.Phil

Share this post


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

Well, start by reading the SDK, and in it you will find all the variables that are available. For FS9, it is on the web, for FSX, you'll need the deluxe version.For FSX, there is also an XML gauge creater that will help you in the SDK.Be sure to download the FSX SDK update if you go that route.

Share this post


Link to post
Share on other sites

Thanks. I didn't even realise the FS2004 SDK was still available - when I went to the Microsoft website every link I tried took me to the FSX SDK update page, so I assumed the FS2004 version had been withdrawn. After your comment, I did a search and found a link to it.I've now downloaded the Gauges and Panels SDK, and I'll see if I can dig out what I need.Phil

Share this post


Link to post
Share on other sites

Hi,100 gallon = 378.5412 literSo multiply fuel flow gph with 3.785412:in value:(A:Eng fuel flow GPH:@ENGINE_NUMBER,gallons per hour) 3.785412 * in string:%((A:Eng fuel flow GPH:@ENGINE_NUMBER,gallons per hour) 3.785412 *)%!2.2f!Jan"Beatus ille qui procul negotiis..."

Share this post


Link to post
Share on other sites

Jan,I think this sort of in-line conversion is what I'll have to do.While the SDK docs refer to metric values in places, I have been unable to get meaningful values by using them, so I'm guessing that they weren't implemented in FS2004 - this would explain why the fuel flow gauge in the default Baron 58 always shows the tooltip '0 liters per hour' when FS2004 is set to display metric values.Now it's just a matter of reworking the gauge bitmaps to display metric values...Phil

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