Jump to content
Sign in to follow this  
Guest philstix

Metric fuel gauge XML

Recommended Posts

Guest philstix

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
Guest Patrick_Waugh

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
Guest philstix

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
Guest philstix

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  

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