March 13, 200323 yr Are there any default variables that FS uses to keep track of fuel used (..per engine)?or.. is this something I need to create my own variables to track?can anyone show me a formula for converting one of the FS fuel flow variables into a fuel used value?Thanks,John
March 13, 200323 yr XML or C?Try to figure out how much seconds have passed since the last drawing cycle, delta_time*fuelflow is the fuel consumed in this time, the sum over this is the fule used by the engine.Arne Bartels
March 13, 200323 yr I'm just typing this down from scratch, I haven't checked:<Value> (P:ABSOLUTE TIME,seconds) (L:Last time1,number) d 0 > if{ - 3600.0 / (A:ENG1 FUEL FLOW PPH,pounds per hour) * (L:fuel used1, number) + (>L:fuel used1, number) } (P:ABSOLUTE TIME,seconds) (>L:Last time1,number) (L:fuel used1, number) </Value>(P:ABSOLUTE TIME,seconds) (L:Last time1,number) - is the difference in time from last drawing cycle3600.0 / (A:ENG1 FUEL FLOW PPH,pounds per hour) *transfers the time difference to hours and multiplies with the fuel flow(L:fuel used1, number) + (>L:fuel used1, number) adds the used fuel amount to the total fuel used amountthe (L:Last time1,number) ... 0 > if{..}check is introduced to avoid wrong calculations at the start of the gauge (P:ABSOLUTE TIME,seconds) (>L:Last time1,number)sets the present time to the last time variable for the next drawing cycle(L:fuel used1, number) displays the fuel usedArne Bartels
March 18, 200323 yr 2 more questions on this topic.QUESTION 1:When using the above code and switching FS from from "night" to "day", the fuel used counters report values over 3600+ Why does this happen?QUESTION 2:You listed two global variables per gauge. L:FUEL USED1 & L:LAST TIME1. If I change L:LAST TIME1 to a local gauge variable G:VAR1, it seems to calculate fuel consumption at double time. Why does this happen just by changing the "LAST TIME1" counter from global to local?Thanks,John
March 20, 200323 yr Sorry I was three days off to a conference.To Q1:If you switch from night to day and vice versa you adjust the time, and therefore the time difference gets very huge. Maybe you should set the time difference to zero if it is too high (>1s or so).To Q2:I'm not too sure, but if you reuse G:VAR1 in any way in this gauge you can get cross-effects. There might be other reasons also.Arne Bartels
March 22, 200323 yr >XML or C? >Try to figure out how much seconds have passed since the >last drawing cycle, delta_time*fuelflow is the fuel consumed >in this time, the sum over this is the fule used by the >engine. >Arne Bartels Arne, We are figuring out how to use the FS token 'Corrected Fuel Flow' to make fuel flow more accurate in turbine AC. 'PPH' is always a direct function of 'thrust'. However, I always figured one would have to cludge the fuel level in the tanks, since FS uses the incorrect 'PPH' to empty the tanks. I've heard FSUIPC now lets one control some internal FS variables more directly than otherwise possible. I haven't checked to see if current fuel in each tank is possible to control without the normal fuel flow additionally changing it (and, draining tanks one doesn't want to drain). Do you think it would be feasible to drain tanks increment by incrment in a reliable way? Where one could still use the FS menue to check and set the levels? As a minimum, it wouldn't be hard to generate a much more accurate 'PPH flow' gauge. Based on "CFF" and other variables. But, one would also want the tank(s) to have the correct amount of fuel based on the calculated, rather than the FS 'PPH' variable. MS either cut out the use of 'Corrected Fuel Flow' in calculating 'PPH' in FS2K+, or accepted flight model code that wasn't complete. Thus, if turbine fuel flow is appropriate for cruise, it is too high for TO run and initial climb (even when the 'fuel_flow_scalar' is set the the 'best' value).Ron
Create an account or sign in to comment