Archived

This topic is now archived and is closed to further replies.

Eberhard

New to creating Gauges Need a hint.

Recommended Posts

HelloI'm doing some research into the fuel consumption of the Realair Spitfire.I'm planning a tour and to refine the legs I need some data.There are a few problems with the Spitfire that led me to creating a temporary gauge for collecting data.The spitfire does not have any fuel flow indication either in real life or the add-on (and I will take out the temp gauge after collecting my data before doing my tour)The real life documentation does not have much in the form of fuel economy data as it likely wasn't a priority with the Luftwaffe at the door then again i don't know how close Realair's fuel consumption will be to the real thing without a fuel gauge.I've tried and failed adding the mooney's fuel gauge in a way I successfully added a battery switch to the h-1b which otherwise wouldn't start with my cold and dark mod.So I've opted to actually dive into the SDK, the fuel pressure tutorial seemed perfect and easy to adapt to being a fuel flow gauge.It looks fine in Ace.exe's preview window and FSX does not give me any errors either with or without GaugeDevDebug=1 in the fsx.cfg but the gauge just appears as a black square nothing else.I've tried Bright: TRUE on all elements but that doesn't seem to be the problem.If anyone could look over my code I would appreciate it a lot.Added the following to panel.cfg:[Window Titles]Window00=Main PanelWindow01=GPSWindow02=2D RadiosWindow03=Fuel Flow[Window03]size_mm=200, 200position=6visible=0ident=22220gauge00=Custom!FuelFlow, 0, 0and my gauge:<?xml version="1.0" encoding="UTF-8"?>AceXML DocumentCustom.xml0.000,0.000200,200TrueTrue105.000,110.000True0xfff9f3Chaparral Pro12Pounds per hour100,13True25.000,68.000True0xfff9f3LCD32%( (A:ESTIMATED FUEL FLOW) )%!4.2f!RIGHT140,32TrueCENTERAs it is now after lot's of fiddling, I've had the artwork dir set to complete path to the bmp as well before this. Same thing.All other text/embellishment is on the background texture.It just needs to be a simple counter showing me the fuel consumption numerically so I can collect data a bit better then using a stopwatch and pen and paper and the fuel capacity gauges.bare with me please, it's the first time I delved into gauges at all.

Share this post


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

I also had my fair share of frustration with ACE. Regarding the Art Directory. Try ArtDirectory="."Add a fullstop, instead of the backslash. That helped me displaying the bitmaps.There are a lot of specialists on this forum, so my help might not be that great and authoritative. I have decided to do the few of my XML gauges I have created to use the good old way of hand coding. Far less clutter and the code is much easier to read. But everyone has ists way of doing things.Regards------------------------------------Eberhard Haberkornbetatesterbanner.jpg

Share this post


Link to post
Share on other sites

Thanks for replying Eberhard :)I'll go and try the dot instead of slash after I post this.Even if it were just a bitmap problem shouldn't the dynamic parts still show up? e.g. the fuel counter numbers but not graphics underneath.EDIT.No the . instead of slash did not seem to do the trick.I'm guessing there is something fundamentally wrong with my gauge, it would figure but then it is the very first time i've tried anything along these lines for flight sim.I'll patiently wait for some more people to read the post :)But thanks Eberhard for taking the time to read and reply, very much appreciated.I get you on the handcoding, it's the only way I do websites, notepad or editpad :)The only thing i've done by hand on the gauge though is having the xml structure checked and just now changing the / into a . to try your suggestion.I've also tried compiling it into a spb gauge but it ends up exactly the same so I guess I have something not set right in the core of it.Cheers, Luggage

Share this post


Link to post
Share on other sites

Hi luggageI have again looked through your code and even loaded it into ACE. The only thing I can see wrong is in line 9 : Try changing the gauge id to "gauge", since this is not the name of the gauge but it defines the element in the xml.Hope it works.Regards------------------------------------Eberhard Haberkornbetatesterbanner.jpg

Share this post


Link to post
Share on other sites

I've just tried the following variations based on your 2 replies:id Gauge ; artdir /id gauge ; artdir /id Gauge ; artdir .id gauge ; artdir .I must have misunderstood something in the sdk then.If the simgauge id simply needs to be gauge, then where should I put the id name of the gauge, the one the panel.cfg calls for when I click instruments->fuel flow. Maybe it's simply black because the call for the gauge can't find it because it's not identified correcly (there is no other id or mention of FuelFlow in the xml apart from what was set in the simguage.gauge id.None of them seems to change anything.btw how is the gauge debug switch in fsx.cfg supposed to help? I'm not getting any feedback in the game opening my defective gauge.Again thank you for trying to help me out on this :)Edit:I put FuelFlow into the simgauge.gauge id string following and adapting the fuel pressure tutorial in the sdk which mentions the following:"If you then re-open it, you will see that the parent node properties includes Filename and id. Change the id to any string that helps identify the gauge, such as "Fuel Pressure Gauge" in this case."maybe the simbase ID needs to be FuelFlow in this case instead of Custom?I'm not to clear on how it id's everythingMy line of thought went like thisthe panel asks for Custom!FuelFlow gaugeI expected it to look at the simbase.document id "Custom" and then look at the gauges in the xml to find "FuelFlow"basicly I had expected the example to work outright and just change the variable it's going to display from fuel pressure to fuel flow/expected consumption and just my own flair to make a nicer background then the brown rectangle in the example and adapt the naming conventions in the example to my needs.EDITha one step closer.I figured part of it out, first timer mistake I guessI assumed the gauge and all my future temp/testing gauges would be in Custom.xmlI've renamed custom.xml to FuelFlow.xml inside the Custom subdir and changed the gauge id to Gauge and the art dir back to /I now have a visible gauge showing me my background and 0.00 fuel flow (I start cold and dark so that's okay)So YES! I just made my first visible gauge lol now for the next tiny bit.As far as I know with my very limited knowledge the variable to get the aircraft fuel consumption data is set right according to the SDK. But after I start my engine it remains at 0.00Just to make sure I revved up the engine a few times but it's stuck at 0.00.Thanks for your help so far :) it's what has led me to find this part of what is wrong with my gauge. :)

Share this post


Link to post
Share on other sites

Haven't progressed yet from getting it to display to getting it to display the actual data aswell but I've tried some other variables that seemd to be closer to what I'm afterENG FUEL FLOW PPH:index (would ENG FUEL FLOW PPH:1 then be correct? the spitfire is a single prop plane just in case. I don't expect anyone to not know the Spitfire though :) )Regardless the value on the gauge itself ingame is still stuck at 0.00 (it looks neat now though lol... )Is it necessary to specifiy the unit of measurement like the GENERAL ENG FUEL PRESSURE:1, psi example? it states ENG FUEL FLOW PPH comes in pounds per hour so I figured that it was redundant (I don't mind doing the conversion to the spits british units, imperial gallons, by hand.)EDITworking :)I guess it needs the unit stated regardless. adding ,pounds per hour after A:ENG FUEL FLOW PPH:1 got it working now.I'm idling at a parking space showing 15.06 pounds per hour. which sounds about right but need to check the pilot manual.Eberhart thank you very much for thinking along with me and helping out. I don't think I would have delved at the right spots in the xml and file structure without your tips.So happy. only delved into sdk first time yesterday and got my working gauge today yippie!!!!!!!! :)

Share this post


Link to post
Share on other sites

Hi LuggageGlad you figured things out. I know the feeling of elation, when one figured out what went wrong.------------------------------------Eberhard Haberkornbetatesterbanner.jpg

Share this post


Link to post
Share on other sites