December 31, 200916 yr Commercial Member I wish this forum had a better search routine because I'm sure the answer's here somewhere. Unfortunately, advanced searching on 'fuel', 'fuel level', 'fuel remaining' and 'fuel level remaining' all return pages and pages of identical results.When calculating the fuel remaining in any one tank, I have seen the following two figures quoted: divide by 8088322.0 and divide by 8388608.0 (quoted in the SDK) e.g.lookup_var(&fuel_level_leftaux);lookup_var(&fuel_cap_leftaux);dblfuelstate=fuel_level_leftaux.var_value.n/[figure];dblfuelstate=fuel_cap_leftaux.var_value.n * dblfuelstate;However, I find that when comparing a full tank to the fuel capacity as stated in the aircraft.cfg file, I find that 8088322.0 gives a figure that is too high and 8388608.0 gives a figure that is too low. So I checked the direct return fromlookup_var(&fuel_cap_leftaux);and it gave me 83618 (I suspect I truncated it early and it should actually be 8361800.0 - see below). So, if the figure in the cfg file is (e.g. 3757) and the tank in question is full,lookup_var(&fuel_level_leftaux);lookup_var(&fuel_cap_leftaux);dblfuelstate=(fuel_level_leftaux.var_value.n/83618.0)/100;dblfuelstate=fuel_cap_leftaux.var_value.n * dblfuelstate;gives 3757 as expected.So which figure is right? 8088322.0, 8388608.0 or 8361800.0? Or did I really do something stupid and overlook the obvious again?-Dai
January 1, 201016 yr Commercial Member I just did a real quick test... full tank returns 8388608 for me. Ed Wilson Mindstar AviationMy Playland - I69
January 1, 201016 yr Author Commercial Member Hi EdI gave up on this one in the end. I queried all four tanks in this aircraft and got four different results, three above and one below 8388608. I have no idea what's going on, so for the sake of being inaccurate to the tune of about seven gallons in a multi-thousand gallon tank, I'm going to ignore it and use the SDK figure for conversions. Thank you for checking.-Dai
January 2, 201016 yr Dai,I'm not shure but are the values in the .cfg file of your a/c correct?Greetz Slammer
January 2, 201016 yr Commercial Member Or you could just use XML and have it solve all you problems... :( Engjell BerishaGood Day! Good Day, Engjell Berisha
January 2, 201016 yr Author Commercial Member @ Slammer:Yes, the aircraft.cfg file is correct. I entered the tanks and quantities myself.@ Engjell:I was starting to seriously consider doing just that, but a seven gallon inaccuracy in an almost 4000-gallon tank isn't really worth changing the code now I've completed it. It was just that the inaccuracy between tank capacity and tank contents niggled at me sufficiently (at the time) to want to find an answer to it.-Dai
Create an account or sign in to comment